diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 00000000..198309d4 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,26 @@ +# EditorConfig: https://editorconfig.org/ + +# top-most EditorConfig file +root = true + +# Unix-style newlines with a newline ending every file +[*] +end_of_line = lf +insert_final_newline = true +charset = utf-8 + +# 2 space indentation for java, xml and yml files +[*.{java,xml,yml,sh}] +indent_style = space +indent_size = 2 + +[*.java] +# $ = static, | = blank line +ij_java_imports_layout = $*, |, java.**, javax.**, |, org.**, | * +# no * imports +ij_java_class_count_to_use_import_on_demand = 999 +ij_java_names_count_to_use_import_on_demand = 999 + +# Maven POM code convention +[pom.xml] +max_line_length = 205 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c757cfb9..eee6835c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -14,25 +14,20 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: fetch-depth: 0 - - uses: actions/cache@v2 - with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-maven- - - name: Set up JDK 11 - uses: actions/setup-java@v2 + - name: Set up JDK 21 + uses: actions/setup-java@v4 with: distribution: 'temurin' - java-version: '11' + java-version: '21' + cache: 'maven' - name: Build with Maven - run: ./mvnw -B clean verify javadoc:javadoc --file pom.xml + run: ./mvnw -B verify javadoc:javadoc - name: Sonar Analysis if: ${{ github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository }} - run: ./mvnw -B sonar:sonar --file pom.xml + run: ./mvnw -B sonar:sonar env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} diff --git a/.mvn/wrapper/MavenWrapperDownloader.java b/.mvn/wrapper/MavenWrapperDownloader.java deleted file mode 100644 index b901097f..00000000 --- a/.mvn/wrapper/MavenWrapperDownloader.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Copyright 2007-present the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import java.net.*; -import java.io.*; -import java.nio.channels.*; -import java.util.Properties; - -public class MavenWrapperDownloader { - - private static final String WRAPPER_VERSION = "0.5.6"; - /** - * Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided. - */ - private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/" - + WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar"; - - /** - * Path to the maven-wrapper.properties file, which might contain a downloadUrl property to - * use instead of the default one. - */ - private static final String MAVEN_WRAPPER_PROPERTIES_PATH = - ".mvn/wrapper/maven-wrapper.properties"; - - /** - * Path where the maven-wrapper.jar will be saved to. - */ - private static final String MAVEN_WRAPPER_JAR_PATH = - ".mvn/wrapper/maven-wrapper.jar"; - - /** - * Name of the property which should be used to override the default download url for the wrapper. - */ - private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl"; - - public static void main(String args[]) { - System.out.println("- Downloader started"); - File baseDirectory = new File(args[0]); - System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath()); - - // If the maven-wrapper.properties exists, read it and check if it contains a custom - // wrapperUrl parameter. - File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH); - String url = DEFAULT_DOWNLOAD_URL; - if(mavenWrapperPropertyFile.exists()) { - FileInputStream mavenWrapperPropertyFileInputStream = null; - try { - mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile); - Properties mavenWrapperProperties = new Properties(); - mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream); - url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url); - } catch (IOException e) { - System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'"); - } finally { - try { - if(mavenWrapperPropertyFileInputStream != null) { - mavenWrapperPropertyFileInputStream.close(); - } - } catch (IOException e) { - // Ignore ... - } - } - } - System.out.println("- Downloading from: " + url); - - File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH); - if(!outputFile.getParentFile().exists()) { - if(!outputFile.getParentFile().mkdirs()) { - System.out.println( - "- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'"); - } - } - System.out.println("- Downloading to: " + outputFile.getAbsolutePath()); - try { - downloadFileFromURL(url, outputFile); - System.out.println("Done"); - System.exit(0); - } catch (Throwable e) { - System.out.println("- Error downloading"); - e.printStackTrace(); - System.exit(1); - } - } - - private static void downloadFileFromURL(String urlString, File destination) throws Exception { - if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) { - String username = System.getenv("MVNW_USERNAME"); - char[] password = System.getenv("MVNW_PASSWORD").toCharArray(); - Authenticator.setDefault(new Authenticator() { - @Override - protected PasswordAuthentication getPasswordAuthentication() { - return new PasswordAuthentication(username, password); - } - }); - } - URL website = new URL(urlString); - ReadableByteChannel rbc; - rbc = Channels.newChannel(website.openStream()); - FileOutputStream fos = new FileOutputStream(destination); - fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE); - fos.close(); - rbc.close(); - } - -} diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties index 642d572c..d58dfb70 100644 --- a/.mvn/wrapper/maven-wrapper.properties +++ b/.mvn/wrapper/maven-wrapper.properties @@ -1,2 +1,19 @@ -distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip -wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +wrapperVersion=3.3.2 +distributionType=only-script +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip diff --git a/licence-header.txt b/licence-header.txt deleted file mode 100644 index b96e314e..00000000 --- a/licence-header.txt +++ /dev/null @@ -1,10 +0,0 @@ -Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with -the License. You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on -an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the -specific language governing permissions and limitations under the License. - -Copyright ${inceptionYear}-${currentYear} the original author or authors. \ No newline at end of file diff --git a/mvnw b/mvnw index 41c0f0c2..19529ddf 100755 --- a/mvnw +++ b/mvnw @@ -19,292 +19,241 @@ # ---------------------------------------------------------------------------- # ---------------------------------------------------------------------------- -# Maven Start Up Batch script -# -# Required ENV vars: -# ------------------ -# JAVA_HOME - location of a JDK home dir +# Apache Maven Wrapper startup batch script, version 3.3.2 # # Optional ENV vars # ----------------- -# M2_HOME - location of maven2's installed home dir -# MAVEN_OPTS - parameters passed to the Java VM when running Maven -# e.g. to debug Maven itself, use -# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 -# MAVEN_SKIP_RC - flag to disable loading of mavenrc files +# JAVA_HOME - location of a JDK home dir, required when download maven via java source +# MVNW_REPOURL - repo url base for downloading maven distribution +# MVNW_USERNAME/MVNW_PASSWORD - user and password for downloading maven +# MVNW_VERBOSE - true: enable verbose log; debug: trace the mvnw script; others: silence the output # ---------------------------------------------------------------------------- -if [ -z "$MAVEN_SKIP_RC" ] ; then - - if [ -f /etc/mavenrc ] ; then - . /etc/mavenrc - fi +set -euf +[ "${MVNW_VERBOSE-}" != debug ] || set -x - if [ -f "$HOME/.mavenrc" ] ; then - . "$HOME/.mavenrc" - fi +# OS specific support. +native_path() { printf %s\\n "$1"; } +case "$(uname)" in +CYGWIN* | MINGW*) + [ -z "${JAVA_HOME-}" ] || JAVA_HOME="$(cygpath --unix "$JAVA_HOME")" + native_path() { cygpath --path --windows "$1"; } + ;; +esac -fi +# set JAVACMD and JAVACCMD +set_java_home() { + # For Cygwin and MinGW, ensure paths are in Unix format before anything is touched + if [ -n "${JAVA_HOME-}" ]; then + if [ -x "$JAVA_HOME/jre/sh/java" ]; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + JAVACCMD="$JAVA_HOME/jre/sh/javac" + else + JAVACMD="$JAVA_HOME/bin/java" + JAVACCMD="$JAVA_HOME/bin/javac" -# OS specific support. $var _must_ be set to either true or false. -cygwin=false; -darwin=false; -mingw=false -case "`uname`" in - CYGWIN*) cygwin=true ;; - MINGW*) mingw=true;; - Darwin*) darwin=true - # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home - # See https://developer.apple.com/library/mac/qa/qa1170/_index.html - if [ -z "$JAVA_HOME" ]; then - if [ -x "/usr/libexec/java_home" ]; then - export JAVA_HOME="`/usr/libexec/java_home`" - else - export JAVA_HOME="/Library/Java/Home" + if [ ! -x "$JAVACMD" ] || [ ! -x "$JAVACCMD" ]; then + echo "The JAVA_HOME environment variable is not defined correctly, so mvnw cannot run." >&2 + echo "JAVA_HOME is set to \"$JAVA_HOME\", but \"\$JAVA_HOME/bin/java\" or \"\$JAVA_HOME/bin/javac\" does not exist." >&2 + return 1 fi fi - ;; -esac - -if [ -z "$JAVA_HOME" ] ; then - if [ -r /etc/gentoo-release ] ; then - JAVA_HOME=`java-config --jre-home` + else + JAVACMD="$( + 'set' +e + 'unset' -f command 2>/dev/null + 'command' -v java + )" || : + JAVACCMD="$( + 'set' +e + 'unset' -f command 2>/dev/null + 'command' -v javac + )" || : + + if [ ! -x "${JAVACMD-}" ] || [ ! -x "${JAVACCMD-}" ]; then + echo "The java/javac command does not exist in PATH nor is JAVA_HOME set, so mvnw cannot run." >&2 + return 1 + fi fi -fi - -if [ -z "$M2_HOME" ] ; then - ## resolve links - $0 may be a link to maven's home - PRG="$0" +} - # need this for relative symlinks - while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG="`dirname "$PRG"`/$link" - fi +# hash string like Java String::hashCode +hash_string() { + str="${1:-}" h=0 + while [ -n "$str" ]; do + char="${str%"${str#?}"}" + h=$(((h * 31 + $(LC_CTYPE=C printf %d "'$char")) % 4294967296)) + str="${str#?}" done + printf %x\\n $h +} - saveddir=`pwd` +verbose() { :; } +[ "${MVNW_VERBOSE-}" != true ] || verbose() { printf %s\\n "${1-}"; } - M2_HOME=`dirname "$PRG"`/.. +die() { + printf %s\\n "$1" >&2 + exit 1 +} - # make it fully qualified - M2_HOME=`cd "$M2_HOME" && pwd` +trim() { + # MWRAPPER-139: + # Trims trailing and leading whitespace, carriage returns, tabs, and linefeeds. + # Needed for removing poorly interpreted newline sequences when running in more + # exotic environments such as mingw bash on Windows. + printf "%s" "${1}" | tr -d '[:space:]' +} - cd "$saveddir" - # echo Using m2 at $M2_HOME -fi +# parse distributionUrl and optional distributionSha256Sum, requires .mvn/wrapper/maven-wrapper.properties +while IFS="=" read -r key value; do + case "${key-}" in + distributionUrl) distributionUrl=$(trim "${value-}") ;; + distributionSha256Sum) distributionSha256Sum=$(trim "${value-}") ;; + esac +done <"${0%/*}/.mvn/wrapper/maven-wrapper.properties" +[ -n "${distributionUrl-}" ] || die "cannot read distributionUrl property in ${0%/*}/.mvn/wrapper/maven-wrapper.properties" + +case "${distributionUrl##*/}" in +maven-mvnd-*bin.*) + MVN_CMD=mvnd.sh _MVNW_REPO_PATTERN=/maven/mvnd/ + case "${PROCESSOR_ARCHITECTURE-}${PROCESSOR_ARCHITEW6432-}:$(uname -a)" in + *AMD64:CYGWIN* | *AMD64:MINGW*) distributionPlatform=windows-amd64 ;; + :Darwin*x86_64) distributionPlatform=darwin-amd64 ;; + :Darwin*arm64) distributionPlatform=darwin-aarch64 ;; + :Linux*x86_64*) distributionPlatform=linux-amd64 ;; + *) + echo "Cannot detect native platform for mvnd on $(uname)-$(uname -m), use pure java version" >&2 + distributionPlatform=linux-amd64 + ;; + esac + distributionUrl="${distributionUrl%-bin.*}-$distributionPlatform.zip" + ;; +maven-mvnd-*) MVN_CMD=mvnd.sh _MVNW_REPO_PATTERN=/maven/mvnd/ ;; +*) MVN_CMD="mvn${0##*/mvnw}" _MVNW_REPO_PATTERN=/org/apache/maven/ ;; +esac -# For Cygwin, ensure paths are in UNIX format before anything is touched -if $cygwin ; then - [ -n "$M2_HOME" ] && - M2_HOME=`cygpath --unix "$M2_HOME"` - [ -n "$JAVA_HOME" ] && - JAVA_HOME=`cygpath --unix "$JAVA_HOME"` - [ -n "$CLASSPATH" ] && - CLASSPATH=`cygpath --path --unix "$CLASSPATH"` -fi +# apply MVNW_REPOURL and calculate MAVEN_HOME +# maven home pattern: ~/.m2/wrapper/dists/{apache-maven-,maven-mvnd--}/ +[ -z "${MVNW_REPOURL-}" ] || distributionUrl="$MVNW_REPOURL$_MVNW_REPO_PATTERN${distributionUrl#*"$_MVNW_REPO_PATTERN"}" +distributionUrlName="${distributionUrl##*/}" +distributionUrlNameMain="${distributionUrlName%.*}" +distributionUrlNameMain="${distributionUrlNameMain%-bin}" +MAVEN_USER_HOME="${MAVEN_USER_HOME:-${HOME}/.m2}" +MAVEN_HOME="${MAVEN_USER_HOME}/wrapper/dists/${distributionUrlNameMain-}/$(hash_string "$distributionUrl")" + +exec_maven() { + unset MVNW_VERBOSE MVNW_USERNAME MVNW_PASSWORD MVNW_REPOURL || : + exec "$MAVEN_HOME/bin/$MVN_CMD" "$@" || die "cannot exec $MAVEN_HOME/bin/$MVN_CMD" +} -# For Mingw, ensure paths are in UNIX format before anything is touched -if $mingw ; then - [ -n "$M2_HOME" ] && - M2_HOME="`(cd "$M2_HOME"; pwd)`" - [ -n "$JAVA_HOME" ] && - JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`" +if [ -d "$MAVEN_HOME" ]; then + verbose "found existing MAVEN_HOME at $MAVEN_HOME" + exec_maven "$@" fi -if [ -z "$JAVA_HOME" ]; then - javaExecutable="`which javac`" - if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then - # readlink(1) is not available as standard on Solaris 10. - readLink=`which readlink` - if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then - if $darwin ; then - javaHome="`dirname \"$javaExecutable\"`" - javaExecutable="`cd \"$javaHome\" && pwd -P`/javac" - else - javaExecutable="`readlink -f \"$javaExecutable\"`" - fi - javaHome="`dirname \"$javaExecutable\"`" - javaHome=`expr "$javaHome" : '\(.*\)/bin'` - JAVA_HOME="$javaHome" - export JAVA_HOME - fi - fi -fi +case "${distributionUrl-}" in +*?-bin.zip | *?maven-mvnd-?*-?*.zip) ;; +*) die "distributionUrl is not valid, must match *-bin.zip or maven-mvnd-*.zip, but found '${distributionUrl-}'" ;; +esac -if [ -z "$JAVACMD" ] ; then - if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" - else - JAVACMD="$JAVA_HOME/bin/java" - fi - else - JAVACMD="`which java`" - fi +# prepare tmp dir +if TMP_DOWNLOAD_DIR="$(mktemp -d)" && [ -d "$TMP_DOWNLOAD_DIR" ]; then + clean() { rm -rf -- "$TMP_DOWNLOAD_DIR"; } + trap clean HUP INT TERM EXIT +else + die "cannot create temp dir" fi -if [ ! -x "$JAVACMD" ] ; then - echo "Error: JAVA_HOME is not defined correctly." >&2 - echo " We cannot execute $JAVACMD" >&2 - exit 1 -fi +mkdir -p -- "${MAVEN_HOME%/*}" + +# Download and Install Apache Maven +verbose "Couldn't find MAVEN_HOME, downloading and installing it ..." +verbose "Downloading from: $distributionUrl" +verbose "Downloading to: $TMP_DOWNLOAD_DIR/$distributionUrlName" -if [ -z "$JAVA_HOME" ] ; then - echo "Warning: JAVA_HOME environment variable is not set." +# select .zip or .tar.gz +if ! command -v unzip >/dev/null; then + distributionUrl="${distributionUrl%.zip}.tar.gz" + distributionUrlName="${distributionUrl##*/}" fi -CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher +# verbose opt +__MVNW_QUIET_WGET=--quiet __MVNW_QUIET_CURL=--silent __MVNW_QUIET_UNZIP=-q __MVNW_QUIET_TAR='' +[ "${MVNW_VERBOSE-}" != true ] || __MVNW_QUIET_WGET='' __MVNW_QUIET_CURL='' __MVNW_QUIET_UNZIP='' __MVNW_QUIET_TAR=v -# traverses directory structure from process work directory to filesystem root -# first directory with .mvn subdirectory is considered project base directory -find_maven_basedir() { +# normalize http auth +case "${MVNW_PASSWORD:+has-password}" in +'') MVNW_USERNAME='' MVNW_PASSWORD='' ;; +has-password) [ -n "${MVNW_USERNAME-}" ] || MVNW_USERNAME='' MVNW_PASSWORD='' ;; +esac - if [ -z "$1" ] - then - echo "Path not specified to find_maven_basedir" - return 1 - fi +if [ -z "${MVNW_USERNAME-}" ] && command -v wget >/dev/null; then + verbose "Found wget ... using wget" + wget ${__MVNW_QUIET_WGET:+"$__MVNW_QUIET_WGET"} "$distributionUrl" -O "$TMP_DOWNLOAD_DIR/$distributionUrlName" || die "wget: Failed to fetch $distributionUrl" +elif [ -z "${MVNW_USERNAME-}" ] && command -v curl >/dev/null; then + verbose "Found curl ... using curl" + curl ${__MVNW_QUIET_CURL:+"$__MVNW_QUIET_CURL"} -f -L -o "$TMP_DOWNLOAD_DIR/$distributionUrlName" "$distributionUrl" || die "curl: Failed to fetch $distributionUrl" +elif set_java_home; then + verbose "Falling back to use Java to download" + javaSource="$TMP_DOWNLOAD_DIR/Downloader.java" + targetZip="$TMP_DOWNLOAD_DIR/$distributionUrlName" + cat >"$javaSource" <<-END + public class Downloader extends java.net.Authenticator + { + protected java.net.PasswordAuthentication getPasswordAuthentication() + { + return new java.net.PasswordAuthentication( System.getenv( "MVNW_USERNAME" ), System.getenv( "MVNW_PASSWORD" ).toCharArray() ); + } + public static void main( String[] args ) throws Exception + { + setDefault( new Downloader() ); + java.nio.file.Files.copy( java.net.URI.create( args[0] ).toURL().openStream(), java.nio.file.Paths.get( args[1] ).toAbsolutePath().normalize() ); + } + } + END + # For Cygwin/MinGW, switch paths to Windows format before running javac and java + verbose " - Compiling Downloader.java ..." + "$(native_path "$JAVACCMD")" "$(native_path "$javaSource")" || die "Failed to compile Downloader.java" + verbose " - Running Downloader.java ..." + "$(native_path "$JAVACMD")" -cp "$(native_path "$TMP_DOWNLOAD_DIR")" Downloader "$distributionUrl" "$(native_path "$targetZip")" +fi - basedir="$1" - wdir="$1" - while [ "$wdir" != '/' ] ; do - if [ -d "$wdir"/.mvn ] ; then - basedir=$wdir - break +# If specified, validate the SHA-256 sum of the Maven distribution zip file +if [ -n "${distributionSha256Sum-}" ]; then + distributionSha256Result=false + if [ "$MVN_CMD" = mvnd.sh ]; then + echo "Checksum validation is not supported for maven-mvnd." >&2 + echo "Please disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." >&2 + exit 1 + elif command -v sha256sum >/dev/null; then + if echo "$distributionSha256Sum $TMP_DOWNLOAD_DIR/$distributionUrlName" | sha256sum -c >/dev/null 2>&1; then + distributionSha256Result=true fi - # workaround for JBEAP-8937 (on Solaris 10/Sparc) - if [ -d "${wdir}" ]; then - wdir=`cd "$wdir/.."; pwd` + elif command -v shasum >/dev/null; then + if echo "$distributionSha256Sum $TMP_DOWNLOAD_DIR/$distributionUrlName" | shasum -a 256 -c >/dev/null 2>&1; then + distributionSha256Result=true fi - # end of workaround - done - echo "${basedir}" -} - -# concatenates all lines of a file -concat_lines() { - if [ -f "$1" ]; then - echo "$(tr -s '\n' ' ' < "$1")" + else + echo "Checksum validation was requested but neither 'sha256sum' or 'shasum' are available." >&2 + echo "Please install either command, or disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." >&2 + exit 1 + fi + if [ $distributionSha256Result = false ]; then + echo "Error: Failed to validate Maven distribution SHA-256, your Maven distribution might be compromised." >&2 + echo "If you updated your Maven version, you need to update the specified distributionSha256Sum property." >&2 + exit 1 fi -} - -BASE_DIR=`find_maven_basedir "$(pwd)"` -if [ -z "$BASE_DIR" ]; then - exit 1; fi -########################################################################################## -# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central -# This allows using the maven wrapper in projects that prohibit checking in binary data. -########################################################################################## -if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then - if [ "$MVNW_VERBOSE" = true ]; then - echo "Found .mvn/wrapper/maven-wrapper.jar" - fi +# unzip and move +if command -v unzip >/dev/null; then + unzip ${__MVNW_QUIET_UNZIP:+"$__MVNW_QUIET_UNZIP"} "$TMP_DOWNLOAD_DIR/$distributionUrlName" -d "$TMP_DOWNLOAD_DIR" || die "failed to unzip" else - if [ "$MVNW_VERBOSE" = true ]; then - echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..." - fi - if [ -n "$MVNW_REPOURL" ]; then - jarUrl="$MVNW_REPOURL/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" - else - jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" - fi - while IFS="=" read key value; do - case "$key" in (wrapperUrl) jarUrl="$value"; break ;; - esac - done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties" - if [ "$MVNW_VERBOSE" = true ]; then - echo "Downloading from: $jarUrl" - fi - wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" - if $cygwin; then - wrapperJarPath=`cygpath --path --windows "$wrapperJarPath"` - fi - - if command -v wget > /dev/null; then - if [ "$MVNW_VERBOSE" = true ]; then - echo "Found wget ... using wget" - fi - if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then - wget "$jarUrl" -O "$wrapperJarPath" - else - wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath" - fi - elif command -v curl > /dev/null; then - if [ "$MVNW_VERBOSE" = true ]; then - echo "Found curl ... using curl" - fi - if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then - curl -o "$wrapperJarPath" "$jarUrl" -f - else - curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f - fi - - else - if [ "$MVNW_VERBOSE" = true ]; then - echo "Falling back to using Java to download" - fi - javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java" - # For Cygwin, switch paths to Windows format before running javac - if $cygwin; then - javaClass=`cygpath --path --windows "$javaClass"` - fi - if [ -e "$javaClass" ]; then - if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then - if [ "$MVNW_VERBOSE" = true ]; then - echo " - Compiling MavenWrapperDownloader.java ..." - fi - # Compiling the Java class - ("$JAVA_HOME/bin/javac" "$javaClass") - fi - if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then - # Running the downloader - if [ "$MVNW_VERBOSE" = true ]; then - echo " - Running MavenWrapperDownloader.java ..." - fi - ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR") - fi - fi - fi -fi -########################################################################################## -# End of extension -########################################################################################## - -export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"} -if [ "$MVNW_VERBOSE" = true ]; then - echo $MAVEN_PROJECTBASEDIR + tar xzf${__MVNW_QUIET_TAR:+"$__MVNW_QUIET_TAR"} "$TMP_DOWNLOAD_DIR/$distributionUrlName" -C "$TMP_DOWNLOAD_DIR" || die "failed to untar" fi -MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS" - -# For Cygwin, switch paths to Windows format before running java -if $cygwin; then - [ -n "$M2_HOME" ] && - M2_HOME=`cygpath --path --windows "$M2_HOME"` - [ -n "$JAVA_HOME" ] && - JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"` - [ -n "$CLASSPATH" ] && - CLASSPATH=`cygpath --path --windows "$CLASSPATH"` - [ -n "$MAVEN_PROJECTBASEDIR" ] && - MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"` -fi - -# Provide a "standardized" way to retrieve the CLI args that will -# work with both Windows and non-Windows executions. -MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@" -export MAVEN_CMD_LINE_ARGS - -WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain +printf %s\\n "$distributionUrl" >"$TMP_DOWNLOAD_DIR/$distributionUrlNameMain/mvnw.url" +mv -- "$TMP_DOWNLOAD_DIR/$distributionUrlNameMain" "$MAVEN_HOME" || [ -d "$MAVEN_HOME" ] || die "fail to move MAVEN_HOME" -exec "$JAVACMD" \ - $MAVEN_OPTS \ - -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \ - "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ - ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@" +clean || : +exec_maven "$@" diff --git a/mvnw.cmd b/mvnw.cmd index 86115719..249bdf38 100644 --- a/mvnw.cmd +++ b/mvnw.cmd @@ -1,3 +1,4 @@ +<# : batch portion @REM ---------------------------------------------------------------------------- @REM Licensed to the Apache Software Foundation (ASF) under one @REM or more contributor license agreements. See the NOTICE file @@ -18,165 +19,131 @@ @REM ---------------------------------------------------------------------------- @REM ---------------------------------------------------------------------------- -@REM Maven Start Up Batch script -@REM -@REM Required ENV vars: -@REM JAVA_HOME - location of a JDK home dir +@REM Apache Maven Wrapper startup batch script, version 3.3.2 @REM @REM Optional ENV vars -@REM M2_HOME - location of maven2's installed home dir -@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands -@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending -@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven -@REM e.g. to debug Maven itself, use -@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 -@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files +@REM MVNW_REPOURL - repo url base for downloading maven distribution +@REM MVNW_USERNAME/MVNW_PASSWORD - user and password for downloading maven +@REM MVNW_VERBOSE - true: enable verbose log; others: silence the output @REM ---------------------------------------------------------------------------- -@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on' -@echo off -@REM set title of command window -title %0 -@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on' -@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO% - -@REM set %HOME% to equivalent of $HOME -if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%") - -@REM Execute a user defined script before this one -if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre -@REM check for pre script, once with legacy .bat ending and once with .cmd ending -if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat" -if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd" -:skipRcPre - -@setlocal - -set ERROR_CODE=0 - -@REM To isolate internal variables from possible post scripts, we use another setlocal -@setlocal - -@REM ==== START VALIDATION ==== -if not "%JAVA_HOME%" == "" goto OkJHome - -echo. -echo Error: JAVA_HOME not found in your environment. >&2 -echo Please set the JAVA_HOME variable in your environment to match the >&2 -echo location of your Java installation. >&2 -echo. -goto error - -:OkJHome -if exist "%JAVA_HOME%\bin\java.exe" goto init - -echo. -echo Error: JAVA_HOME is set to an invalid directory. >&2 -echo JAVA_HOME = "%JAVA_HOME%" >&2 -echo Please set the JAVA_HOME variable in your environment to match the >&2 -echo location of your Java installation. >&2 -echo. -goto error - -@REM ==== END VALIDATION ==== - -:init - -@REM Find the project base dir, i.e. the directory that contains the folder ".mvn". -@REM Fallback to current working directory if not found. - -set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR% -IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir - -set EXEC_DIR=%CD% -set WDIR=%EXEC_DIR% -:findBaseDir -IF EXIST "%WDIR%"\.mvn goto baseDirFound -cd .. -IF "%WDIR%"=="%CD%" goto baseDirNotFound -set WDIR=%CD% -goto findBaseDir - -:baseDirFound -set MAVEN_PROJECTBASEDIR=%WDIR% -cd "%EXEC_DIR%" -goto endDetectBaseDir - -:baseDirNotFound -set MAVEN_PROJECTBASEDIR=%EXEC_DIR% -cd "%EXEC_DIR%" - -:endDetectBaseDir - -IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig - -@setlocal EnableExtensions EnableDelayedExpansion -for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a -@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS% - -:endReadAdditionalConfig - -SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" -set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" -set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain - -set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" - -FOR /F "tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO ( - IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B -) - -@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central -@REM This allows using the maven wrapper in projects that prohibit checking in binary data. -if exist %WRAPPER_JAR% ( - if "%MVNW_VERBOSE%" == "true" ( - echo Found %WRAPPER_JAR% - ) -) else ( - if not "%MVNW_REPOURL%" == "" ( - SET DOWNLOAD_URL="%MVNW_REPOURL%/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" - ) - if "%MVNW_VERBOSE%" == "true" ( - echo Couldn't find %WRAPPER_JAR%, downloading it ... - echo Downloading from: %DOWNLOAD_URL% - ) - - powershell -Command "&{"^ - "$webclient = new-object System.Net.WebClient;"^ - "if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^ - "$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^ - "}"^ - "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^ - "}" - if "%MVNW_VERBOSE%" == "true" ( - echo Finished downloading %WRAPPER_JAR% - ) +@IF "%__MVNW_ARG0_NAME__%"=="" (SET __MVNW_ARG0_NAME__=%~nx0) +@SET __MVNW_CMD__= +@SET __MVNW_ERROR__= +@SET __MVNW_PSMODULEP_SAVE=%PSModulePath% +@SET PSModulePath= +@FOR /F "usebackq tokens=1* delims==" %%A IN (`powershell -noprofile "& {$scriptDir='%~dp0'; $script='%__MVNW_ARG0_NAME__%'; icm -ScriptBlock ([Scriptblock]::Create((Get-Content -Raw '%~f0'))) -NoNewScope}"`) DO @( + IF "%%A"=="MVN_CMD" (set __MVNW_CMD__=%%B) ELSE IF "%%B"=="" (echo %%A) ELSE (echo %%A=%%B) ) -@REM End of extension - -@REM Provide a "standardized" way to retrieve the CLI args that will -@REM work with both Windows and non-Windows executions. -set MAVEN_CMD_LINE_ARGS=%* - -%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %* -if ERRORLEVEL 1 goto error -goto end - -:error -set ERROR_CODE=1 - -:end -@endlocal & set ERROR_CODE=%ERROR_CODE% - -if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost -@REM check for post script, once with legacy .bat ending and once with .cmd ending -if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat" -if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd" -:skipRcPost - -@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' -if "%MAVEN_BATCH_PAUSE%" == "on" pause - -if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE% - -exit /B %ERROR_CODE% +@SET PSModulePath=%__MVNW_PSMODULEP_SAVE% +@SET __MVNW_PSMODULEP_SAVE= +@SET __MVNW_ARG0_NAME__= +@SET MVNW_USERNAME= +@SET MVNW_PASSWORD= +@IF NOT "%__MVNW_CMD__%"=="" (%__MVNW_CMD__% %*) +@echo Cannot start maven from wrapper >&2 && exit /b 1 +@GOTO :EOF +: end batch / begin powershell #> + +$ErrorActionPreference = "Stop" +if ($env:MVNW_VERBOSE -eq "true") { + $VerbosePreference = "Continue" +} + +# calculate distributionUrl, requires .mvn/wrapper/maven-wrapper.properties +$distributionUrl = (Get-Content -Raw "$scriptDir/.mvn/wrapper/maven-wrapper.properties" | ConvertFrom-StringData).distributionUrl +if (!$distributionUrl) { + Write-Error "cannot read distributionUrl property in $scriptDir/.mvn/wrapper/maven-wrapper.properties" +} + +switch -wildcard -casesensitive ( $($distributionUrl -replace '^.*/','') ) { + "maven-mvnd-*" { + $USE_MVND = $true + $distributionUrl = $distributionUrl -replace '-bin\.[^.]*$',"-windows-amd64.zip" + $MVN_CMD = "mvnd.cmd" + break + } + default { + $USE_MVND = $false + $MVN_CMD = $script -replace '^mvnw','mvn' + break + } +} + +# apply MVNW_REPOURL and calculate MAVEN_HOME +# maven home pattern: ~/.m2/wrapper/dists/{apache-maven-,maven-mvnd--}/ +if ($env:MVNW_REPOURL) { + $MVNW_REPO_PATTERN = if ($USE_MVND) { "/org/apache/maven/" } else { "/maven/mvnd/" } + $distributionUrl = "$env:MVNW_REPOURL$MVNW_REPO_PATTERN$($distributionUrl -replace '^.*'+$MVNW_REPO_PATTERN,'')" +} +$distributionUrlName = $distributionUrl -replace '^.*/','' +$distributionUrlNameMain = $distributionUrlName -replace '\.[^.]*$','' -replace '-bin$','' +$MAVEN_HOME_PARENT = "$HOME/.m2/wrapper/dists/$distributionUrlNameMain" +if ($env:MAVEN_USER_HOME) { + $MAVEN_HOME_PARENT = "$env:MAVEN_USER_HOME/wrapper/dists/$distributionUrlNameMain" +} +$MAVEN_HOME_NAME = ([System.Security.Cryptography.MD5]::Create().ComputeHash([byte[]][char[]]$distributionUrl) | ForEach-Object {$_.ToString("x2")}) -join '' +$MAVEN_HOME = "$MAVEN_HOME_PARENT/$MAVEN_HOME_NAME" + +if (Test-Path -Path "$MAVEN_HOME" -PathType Container) { + Write-Verbose "found existing MAVEN_HOME at $MAVEN_HOME" + Write-Output "MVN_CMD=$MAVEN_HOME/bin/$MVN_CMD" + exit $? +} + +if (! $distributionUrlNameMain -or ($distributionUrlName -eq $distributionUrlNameMain)) { + Write-Error "distributionUrl is not valid, must end with *-bin.zip, but found $distributionUrl" +} + +# prepare tmp dir +$TMP_DOWNLOAD_DIR_HOLDER = New-TemporaryFile +$TMP_DOWNLOAD_DIR = New-Item -Itemtype Directory -Path "$TMP_DOWNLOAD_DIR_HOLDER.dir" +$TMP_DOWNLOAD_DIR_HOLDER.Delete() | Out-Null +trap { + if ($TMP_DOWNLOAD_DIR.Exists) { + try { Remove-Item $TMP_DOWNLOAD_DIR -Recurse -Force | Out-Null } + catch { Write-Warning "Cannot remove $TMP_DOWNLOAD_DIR" } + } +} + +New-Item -Itemtype Directory -Path "$MAVEN_HOME_PARENT" -Force | Out-Null + +# Download and Install Apache Maven +Write-Verbose "Couldn't find MAVEN_HOME, downloading and installing it ..." +Write-Verbose "Downloading from: $distributionUrl" +Write-Verbose "Downloading to: $TMP_DOWNLOAD_DIR/$distributionUrlName" + +$webclient = New-Object System.Net.WebClient +if ($env:MVNW_USERNAME -and $env:MVNW_PASSWORD) { + $webclient.Credentials = New-Object System.Net.NetworkCredential($env:MVNW_USERNAME, $env:MVNW_PASSWORD) +} +[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 +$webclient.DownloadFile($distributionUrl, "$TMP_DOWNLOAD_DIR/$distributionUrlName") | Out-Null + +# If specified, validate the SHA-256 sum of the Maven distribution zip file +$distributionSha256Sum = (Get-Content -Raw "$scriptDir/.mvn/wrapper/maven-wrapper.properties" | ConvertFrom-StringData).distributionSha256Sum +if ($distributionSha256Sum) { + if ($USE_MVND) { + Write-Error "Checksum validation is not supported for maven-mvnd. `nPlease disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." + } + Import-Module $PSHOME\Modules\Microsoft.PowerShell.Utility -Function Get-FileHash + if ((Get-FileHash "$TMP_DOWNLOAD_DIR/$distributionUrlName" -Algorithm SHA256).Hash.ToLower() -ne $distributionSha256Sum) { + Write-Error "Error: Failed to validate Maven distribution SHA-256, your Maven distribution might be compromised. If you updated your Maven version, you need to update the specified distributionSha256Sum property." + } +} + +# unzip and move +Expand-Archive "$TMP_DOWNLOAD_DIR/$distributionUrlName" -DestinationPath "$TMP_DOWNLOAD_DIR" | Out-Null +Rename-Item -Path "$TMP_DOWNLOAD_DIR/$distributionUrlNameMain" -NewName $MAVEN_HOME_NAME | Out-Null +try { + Move-Item -Path "$TMP_DOWNLOAD_DIR/$MAVEN_HOME_NAME" -Destination $MAVEN_HOME_PARENT | Out-Null +} catch { + if (! (Test-Path -Path "$MAVEN_HOME" -PathType Container)) { + Write-Error "fail to move MAVEN_HOME" + } +} finally { + try { Remove-Item $TMP_DOWNLOAD_DIR -Recurse -Force | Out-Null } + catch { Write-Warning "Cannot remove $TMP_DOWNLOAD_DIR" } +} + +Write-Output "MVN_CMD=$MAVEN_HOME/bin/$MVN_CMD" diff --git a/pom.xml b/pom.xml index b0172136..31bf642d 100644 --- a/pom.xml +++ b/pom.xml @@ -1,232 +1,219 @@ - 4.0.0 - assertj-db - 3.0.0-SNAPSHOT - jar - AssertJ-DB - Assertions for database - AssertJ-DB - Rich and fluent assertions for testing with database - - org.assertj - assertj-parent-pom - 2.2.10 - + 4.0.0 - - scm:git:ssh://git@github.com/assertj/assertj-db.git - scm:git:ssh://git@github.com/assertj/assertj-db.git - git@github.com:assertj/assertj-db - assertj-db-2.0.2 - + + org.assertj + assertj-parent + 3.26.3 + - - github - https://github.com/assertj/assertj-db/issues - + assertj-db + 3.0.0-SNAPSHOT - - --allow-script-in-comments - 2015 - 8 + AssertJ-DB - Assertions for database + AssertJ-DB - Rich and fluent assertions for testing with database + 2015 - - https://sonarcloud.io - assertj - joel-costigliola_assertj-db - + + scm:git:ssh://git@github.com/assertj/assertj-db.git + scm:git:ssh://git@github.com/assertj/assertj-db.git + git@github.com:assertj/assertj-db + HEAD + - - - org.assertj - assertj-core - 3.19.0 - - - net.bytebuddy - byte-buddy - 1.10.21 - true - - - junit - junit - test - - - org.springframework - spring-test - 5.3.4 - test - - - org.springframework - spring-context - 5.3.4 - test - - - org.springframework - spring-jdbc - 5.3.4 - test - - - com.h2database - h2 - 1.4.200 - test - - - org.hsqldb - hsqldb - 2.5.1 - test - - - org.xerial - sqlite-jdbc - 3.34.0 - test - - - org.apache.commons - commons-dbcp2 - 2.8.0 - test - - - com.ninja-squad - DbSetup - 2.1.0 - test - - - - - - org.apache.maven.plugins - maven-compiler-plugin - - - org.apache.maven.plugins - maven-shade-plugin - 3.2.4 - - - package - - shade - - - true - - - net.bytebuddy:byte-buddy - - - - - net.bytebuddy - org.assertj.db.internal.bytebuddy - - - - - net.bytebuddy:byte-buddy - - META-INF/** - - - - - - - - - - org.apache.maven.plugins - maven-dependency-plugin - - - unpack-shade - package - - unpack - - - - - ${project.groupId} - ${project.artifactId} - ${project.version} - - - ${project.build.directory}/classes - - - - - - - maven-surefire-plugin - - ${argLine} - true - - - - org.apache.maven.plugins - maven-javadoc-plugin - - - src/main/javadoc/assertj-javadoc.css - - - ]]> - -
- hljs.initHighlightingOnLoad(); - - ]]>
- ${javadocAdditionalOptions} -
-
- - org.jacoco - jacoco-maven-plugin - - org/assertj/db/internal/bytebuddy/**/* - - - - jacoco-report - prepare-package - - report - - - - default-check - prepare-package - - check - - - - -
- - - - org.sonarsource.scanner.maven - sonar-maven-plugin - 3.8.0.2131 - - - -
+ + github + https://github.com/assertj/assertj-db/issues + + + + + https://sonarcloud.io + assertj + joel-costigliola_assertj-db + + + + + org.assertj + assertj-core + 3.21.0 + + + net.bytebuddy + byte-buddy + 1.12.1 + true + + + junit + junit + test + + + org.springframework + spring-test + 5.3.39 + test + + + org.springframework + spring-context + 5.3.39 + test + + + org.springframework + spring-jdbc + 5.3.39 + test + + + com.h2database + h2 + 1.4.200 + test + + + org.hsqldb + hsqldb + 2.7.3 + test + + + org.xerial + sqlite-jdbc + 3.34.0 + test + + + org.apache.commons + commons-dbcp2 + 2.12.0 + test + + + com.ninja-squad + DbSetup + 2.1.0 + test + + + + + + org.apache.maven.plugins + maven-compiler-plugin + + + org.apache.maven.plugins + maven-shade-plugin + 3.2.4 + + + package + + shade + + + true + + + net.bytebuddy:byte-buddy + + + + + net.bytebuddy + org.assertj.db.internal.bytebuddy + + + + + net.bytebuddy:byte-buddy + + META-INF/** + + + + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + unpack-shade + package + + unpack + + + + + ${project.groupId} + ${project.artifactId} + ${project.version} + + + ${project.build.directory}/classes + + + + + + + maven-surefire-plugin + + ${argLine} + true + + + + org.apache.maven.plugins + maven-javadoc-plugin + + ${rootDirectory}/src/main/javadoc/ + + + + org.jacoco + jacoco-maven-plugin + + org/assertj/db/internal/bytebuddy/**/* + + + + jacoco-report + prepare-package + + report + + + + default-check + prepare-package + + check + + + + + + + + + org.sonarsource.scanner.maven + sonar-maven-plugin + 4.0.0.4121 + + + +
diff --git a/src/main/java/org/assertj/db/api/AbstractAssert.java b/src/main/java/org/assertj/db/api/AbstractAssert.java index a4c75082..577a13bc 100644 --- a/src/main/java/org/assertj/db/api/AbstractAssert.java +++ b/src/main/java/org/assertj/db/api/AbstractAssert.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api; @@ -16,15 +16,14 @@ /** * Base class for all assertions of assertj-db. - * - * @author Régis Pouiller - * + * * @param the "self" type of this assertion class. Please read "Emulating 'self types' using Java Generics to simplify fluent API implementation" - * for more details. + * target="_blank">Emulating 'self types' using Java Generics to simplify fluent API implementation" + * for more details. + * @author Régis Pouiller */ public abstract class AbstractAssert> - extends AbstractElement { + extends AbstractElement { /** * Constructor. diff --git a/src/main/java/org/assertj/db/api/AbstractAssertWithOrigin.java b/src/main/java/org/assertj/db/api/AbstractAssertWithOrigin.java index fd9eb924..d4f14da7 100644 --- a/src/main/java/org/assertj/db/api/AbstractAssertWithOrigin.java +++ b/src/main/java/org/assertj/db/api/AbstractAssertWithOrigin.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api; @@ -16,16 +16,15 @@ /** * Base class for all assertions with an {@link org.assertj.db.navigation.origin.Origin}. - * - * @author Régis Pouiller - * + * * @param The "self" type of this assertion class. Please read "Emulating 'self types' using Java Generics to simplify fluent API implementation" - * for more details. + * target="_blank">Emulating 'self types' using Java Generics to simplify fluent API implementation" + * for more details. * @param The type of the assertion class of {@link org.assertj.db.navigation.origin.Origin}. + * @author Régis Pouiller */ public abstract class AbstractAssertWithOrigin, O extends Origin> - extends AbstractAssert { + extends AbstractAssert { /** * The assertion of origin. @@ -34,9 +33,9 @@ public abstract class AbstractAssertWithOrigin selfType, O origin) { super(selfType); @@ -45,7 +44,7 @@ public abstract class AbstractAssertWithOrigin, O extends OriginWithChanges> - extends AbstractAssertWithOrigin - implements ToChanges, - ToChange { + extends AbstractAssertWithOrigin + implements ToChanges, + ToChange { /** * Constructor. * * @param selfType Type of this assertion class : a sub-class of {@code AbstractAssertWithOriginWithChanges}. - * @param origin The assertion of {@link org.assertj.db.navigation.origin.Origin}. + * @param origin The assertion of {@link org.assertj.db.navigation.origin.Origin}. */ AbstractAssertWithOriginWithChanges(Class selfType, O origin) { super(selfType, origin); diff --git a/src/main/java/org/assertj/db/api/AbstractAssertWithOriginWithColumnsAndRows.java b/src/main/java/org/assertj/db/api/AbstractAssertWithOriginWithColumnsAndRows.java index 1b46a083..9de2aa06 100644 --- a/src/main/java/org/assertj/db/api/AbstractAssertWithOriginWithColumnsAndRows.java +++ b/src/main/java/org/assertj/db/api/AbstractAssertWithOriginWithColumnsAndRows.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api; @@ -34,15 +34,15 @@ * @author Régis Pouiller */ public abstract class AbstractAssertWithOriginWithColumnsAndRows, O extends OriginWithColumnsAndRows, D extends AbstractDbData, A extends AbstractDbAssert, C extends AbstractColumnAssert, CV extends AbstractColumnValueAssert, R extends AbstractRowAssert, RV extends AbstractRowValueAssert> - extends AbstractAssertWithOrigin - implements ToColumn, - ToRow { + extends AbstractAssertWithOrigin + implements ToColumn, + ToRow { /** * Constructor. * * @param selfType Type of this assertion class : a sub-class of {@code AbstractAssertWithOriginWithColumnsAndRows}. - * @param origin The assertion of {@link org.assertj.db.navigation.origin.Origin}. + * @param origin The assertion of {@link org.assertj.db.navigation.origin.Origin}. */ AbstractAssertWithOriginWithColumnsAndRows(Class selfType, O origin) { super(selfType, origin); diff --git a/src/main/java/org/assertj/db/api/AbstractAssertWithOriginWithColumnsAndRowsFromChange.java b/src/main/java/org/assertj/db/api/AbstractAssertWithOriginWithColumnsAndRowsFromChange.java index af0e2995..581bed83 100644 --- a/src/main/java/org/assertj/db/api/AbstractAssertWithOriginWithColumnsAndRowsFromChange.java +++ b/src/main/java/org/assertj/db/api/AbstractAssertWithOriginWithColumnsAndRowsFromChange.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api; @@ -28,16 +28,16 @@ * @author Régis Pouiller */ public abstract class AbstractAssertWithOriginWithColumnsAndRowsFromChange, O extends OriginWithColumnsAndRowsFromChange> - extends AbstractAssertWithOriginWithChanges - implements ToColumn, - ToColumnFromChange, - ToRowFromChange { + extends AbstractAssertWithOriginWithChanges + implements ToColumn, + ToColumnFromChange, + ToRowFromChange { /** * Constructor. * * @param selfType Type of this assertion class : a sub-class of {@code AbstractAssertWithOriginWithColumnsAndRowsFromChange}. - * @param origin The assertion of {@link org.assertj.db.navigation.origin.Origin}. + * @param origin The assertion of {@link org.assertj.db.navigation.origin.Origin}. */ AbstractAssertWithOriginWithColumnsAndRowsFromChange(Class selfType, O origin) { super(selfType, origin); @@ -59,37 +59,49 @@ public ChangeRowAssert rowAtEndPoint() { return origin.rowAtEndPoint(); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ChangeColumnAssert column() { return origin.column(); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ChangeColumnAssert column(int index) { return origin.column(index); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ChangeColumnAssert column(String columnName) { return origin.column(columnName); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ChangeColumnAssert columnAmongTheModifiedOnes() { return origin.columnAmongTheModifiedOnes(); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ChangeColumnAssert columnAmongTheModifiedOnes(int index) { return origin.columnAmongTheModifiedOnes(index); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ChangeColumnAssert columnAmongTheModifiedOnes(String columnName) { return origin.columnAmongTheModifiedOnes(columnName); diff --git a/src/main/java/org/assertj/db/api/AbstractAssertWithValues.java b/src/main/java/org/assertj/db/api/AbstractAssertWithValues.java index 1ed1df2e..9bc74586 100644 --- a/src/main/java/org/assertj/db/api/AbstractAssertWithValues.java +++ b/src/main/java/org/assertj/db/api/AbstractAssertWithValues.java @@ -8,22 +8,42 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api; -import org.assertj.core.api.Condition; -import org.assertj.db.api.assertions.*; -import org.assertj.db.api.assertions.impl.*; -import org.assertj.db.navigation.element.ValueElement; -import org.assertj.db.navigation.origin.OriginWithColumnsAndRowsFromChange; -import org.assertj.db.type.*; - import java.time.LocalDate; import java.time.LocalDateTime; import java.time.LocalTime; import java.util.UUID; +import org.assertj.core.api.Condition; +import org.assertj.db.api.assertions.AssertOnValueChronology; +import org.assertj.db.api.assertions.AssertOnValueClass; +import org.assertj.db.api.assertions.AssertOnValueCloseness; +import org.assertj.db.api.assertions.AssertOnValueComparison; +import org.assertj.db.api.assertions.AssertOnValueCondition; +import org.assertj.db.api.assertions.AssertOnValueEquality; +import org.assertj.db.api.assertions.AssertOnValueInequality; +import org.assertj.db.api.assertions.AssertOnValueNullity; +import org.assertj.db.api.assertions.AssertOnValueType; +import org.assertj.db.api.assertions.impl.AssertionsOnValueChronology; +import org.assertj.db.api.assertions.impl.AssertionsOnValueClass; +import org.assertj.db.api.assertions.impl.AssertionsOnValueCloseness; +import org.assertj.db.api.assertions.impl.AssertionsOnValueComparison; +import org.assertj.db.api.assertions.impl.AssertionsOnValueCondition; +import org.assertj.db.api.assertions.impl.AssertionsOnValueEquality; +import org.assertj.db.api.assertions.impl.AssertionsOnValueInequality; +import org.assertj.db.api.assertions.impl.AssertionsOnValueNullity; +import org.assertj.db.api.assertions.impl.AssertionsOnValueType; +import org.assertj.db.navigation.element.ValueElement; +import org.assertj.db.navigation.origin.OriginWithColumnsAndRowsFromChange; +import org.assertj.db.type.DateTimeValue; +import org.assertj.db.type.DateValue; +import org.assertj.db.type.TimeValue; +import org.assertj.db.type.Value; +import org.assertj.db.type.ValueType; + /** * Base class for all values from a {@link org.assertj.db.type.Change} assertions. * @@ -36,17 +56,17 @@ * @author Julien Roy */ public abstract class AbstractAssertWithValues, O extends OriginWithColumnsAndRowsFromChange> - extends AbstractAssertWithOriginWithColumnsAndRowsFromChange - implements ValueElement, - AssertOnValueClass, - AssertOnValueType, - AssertOnValueNullity, - AssertOnValueEquality, - AssertOnValueInequality, - AssertOnValueComparison, - AssertOnValueChronology, - AssertOnValueCloseness, - AssertOnValueCondition { + extends AbstractAssertWithOriginWithColumnsAndRowsFromChange + implements ValueElement, + AssertOnValueClass, + AssertOnValueType, + AssertOnValueNullity, + AssertOnValueEquality, + AssertOnValueInequality, + AssertOnValueComparison, + AssertOnValueChronology, + AssertOnValueCloseness, + AssertOnValueCondition { /** * The actual value on which the assertion is. @@ -57,537 +77,713 @@ public abstract class AbstractAssertWithValues selfType, O origin, Value value) { super(selfType, origin); this.value = value; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public E isOfClass(Class expected) { return AssertionsOnValueClass.isOfClass(myself, info, value, expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public E isOfType(ValueType expected) { return AssertionsOnValueType.isOfType(myself, info, value, expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public E isOfAnyTypeIn(ValueType... expected) { return AssertionsOnValueType.isOfAnyTypeIn(myself, info, value, expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public E isNumber() { return AssertionsOnValueType.isNumber(myself, info, value); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public E isBoolean() { return AssertionsOnValueType.isBoolean(myself, info, value); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public E isDate() { return AssertionsOnValueType.isDate(myself, info, value); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public E isTime() { return AssertionsOnValueType.isTime(myself, info, value); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public E isDateTime() { return AssertionsOnValueType.isDateTime(myself, info, value); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public E isBytes() { return AssertionsOnValueType.isBytes(myself, info, value); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public E isText() { return AssertionsOnValueType.isText(myself, info, value); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public E isUUID() { return AssertionsOnValueType.isUUID(myself, info, value); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public E isNull() { return AssertionsOnValueNullity.isNull(myself, info, value); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public E isNotNull() { return AssertionsOnValueNullity.isNotNull(myself, info, value); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public E isEqualTo(Object expected) { return AssertionsOnValueEquality.isEqualTo(myself, info, value, expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public E isEqualTo(Boolean expected) { return AssertionsOnValueEquality.isEqualTo(myself, info, value, expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public E isTrue() { return AssertionsOnValueEquality.isTrue(myself, info, value); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public E isFalse() { return AssertionsOnValueEquality.isFalse(myself, info, value); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public E isEqualTo(Number expected) { return AssertionsOnValueEquality.isEqualTo(myself, info, value, expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public E isEqualTo(byte[] expected) { return AssertionsOnValueEquality.isEqualTo(myself, info, value, expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public E isEqualTo(String expected) { return AssertionsOnValueEquality.isEqualTo(myself, info, value, expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public E isEqualTo(Character expected) { return AssertionsOnValueEquality.isEqualTo(myself, info, value, expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public E isEqualTo(UUID expected) { return AssertionsOnValueEquality.isEqualTo(myself, info, value, expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public E isEqualTo(DateValue expected) { return AssertionsOnValueEquality.isEqualTo(myself, info, value, expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public E isEqualTo(TimeValue expected) { return AssertionsOnValueEquality.isEqualTo(myself, info, value, expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public E isEqualTo(DateTimeValue expected) { return AssertionsOnValueEquality.isEqualTo(myself, info, value, expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public E isEqualTo(LocalDate expected) { return isEqualTo(DateValue.from(expected)); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public E isEqualTo(LocalTime expected) { return isEqualTo(TimeValue.from(expected)); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public E isEqualTo(LocalDateTime expected) { return isEqualTo(DateTimeValue.from(expected)); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public E isNotEqualTo(Object expected) { return AssertionsOnValueInequality.isNotEqualTo(myself, info, value, expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public E isNotEqualTo(Boolean expected) { return AssertionsOnValueInequality.isNotEqualTo(myself, info, value, expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public E isNotEqualTo(byte[] expected) { return AssertionsOnValueInequality.isNotEqualTo(myself, info, value, expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public E isNotEqualTo(DateTimeValue expected) { return AssertionsOnValueInequality.isNotEqualTo(myself, info, value, expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public E isNotEqualTo(DateValue expected) { return AssertionsOnValueInequality.isNotEqualTo(myself, info, value, expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public E isNotEqualTo(Number expected) { return AssertionsOnValueInequality.isNotEqualTo(myself, info, value, expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public E isNotEqualTo(String expected) { return AssertionsOnValueInequality.isNotEqualTo(myself, info, value, expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public E isNotEqualTo(Character expected) { return AssertionsOnValueInequality.isNotEqualTo(myself, info, value, expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public E isNotEqualTo(UUID expected) { return AssertionsOnValueInequality.isNotEqualTo(myself, info, value, expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public E isNotEqualTo(TimeValue expected) { return AssertionsOnValueInequality.isNotEqualTo(myself, info, value, expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public E isNotEqualTo(LocalDate expected) { return isNotEqualTo(DateValue.from(expected)); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public E isNotEqualTo(LocalTime expected) { return isNotEqualTo(TimeValue.from(expected)); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public E isNotEqualTo(LocalDateTime expected) { return isNotEqualTo(DateTimeValue.from(expected)); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public E isBefore(DateValue date) { return AssertionsOnValueChronology.isBefore(myself, info, value, date); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public E isBefore(TimeValue time) { return AssertionsOnValueChronology.isBefore(myself, info, value, time); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public E isBefore(DateTimeValue dateTime) { return AssertionsOnValueChronology.isBefore(myself, info, value, dateTime); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public E isBefore(LocalDate date) { return isBefore(DateValue.from(date)); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public E isBefore(LocalTime time) { return isBefore(TimeValue.from(time)); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public E isBefore(LocalDateTime dateTime) { return isBefore(DateTimeValue.from(dateTime)); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public E isBefore(String expected) { return AssertionsOnValueChronology.isBefore(myself, info, value, expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public E isBeforeOrEqualTo(DateValue date) { return AssertionsOnValueChronology.isBeforeOrEqualTo(myself, info, value, date); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public E isBeforeOrEqualTo(TimeValue time) { return AssertionsOnValueChronology.isBeforeOrEqualTo(myself, info, value, time); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public E isBeforeOrEqualTo(DateTimeValue dateTime) { return AssertionsOnValueChronology.isBeforeOrEqualTo(myself, info, value, dateTime); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public E isBeforeOrEqualTo(LocalDate date) { return isBeforeOrEqualTo(DateValue.from(date)); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public E isBeforeOrEqualTo(LocalTime time) { return isBeforeOrEqualTo(TimeValue.from(time)); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public E isBeforeOrEqualTo(LocalDateTime dateTime) { return isBeforeOrEqualTo(DateTimeValue.from(dateTime)); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public E isBeforeOrEqualTo(String expected) { return AssertionsOnValueChronology.isBeforeOrEqualTo(myself, info, value, expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public E isAfter(DateValue date) { return AssertionsOnValueChronology.isAfter(myself, info, value, date); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public E isAfter(TimeValue time) { return AssertionsOnValueChronology.isAfter(myself, info, value, time); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public E isAfter(DateTimeValue dateTime) { return AssertionsOnValueChronology.isAfter(myself, info, value, dateTime); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public E isAfter(LocalDate date) { return isAfter(DateValue.from(date)); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public E isAfter(LocalTime time) { return isAfter(TimeValue.from(time)); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public E isAfter(LocalDateTime dateTime) { return isAfter(DateTimeValue.from(dateTime)); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public E isAfter(String expected) { return AssertionsOnValueChronology.isAfter(myself, info, value, expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public E isAfterOrEqualTo(DateValue date) { return AssertionsOnValueChronology.isAfterOrEqualTo(myself, info, value, date); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public E isAfterOrEqualTo(TimeValue time) { return AssertionsOnValueChronology.isAfterOrEqualTo(myself, info, value, time); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public E isAfterOrEqualTo(DateTimeValue dateTime) { return AssertionsOnValueChronology.isAfterOrEqualTo(myself, info, value, dateTime); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public E isAfterOrEqualTo(LocalDate date) { return isAfterOrEqualTo(DateValue.from(date)); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public E isAfterOrEqualTo(LocalTime time) { return isAfterOrEqualTo(TimeValue.from(time)); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public E isAfterOrEqualTo(LocalDateTime dateTime) { return isAfterOrEqualTo(DateTimeValue.from(dateTime)); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public E isAfterOrEqualTo(String expected) { return AssertionsOnValueChronology.isAfterOrEqualTo(myself, info, value, expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public E isZero() { return AssertionsOnValueEquality.isZero(myself, info, value); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public E isNotZero() { return AssertionsOnValueInequality.isNotZero(myself, info, value); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public E isGreaterThan(Number expected) { return AssertionsOnValueComparison.isGreaterThan(myself, info, value, expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public E isLessThan(Number expected) { return AssertionsOnValueComparison.isLessThan(myself, info, value, expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public E isGreaterThanOrEqualTo(Number expected) { return AssertionsOnValueComparison.isGreaterThanOrEqualTo(myself, info, value, expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public E isLessThanOrEqualTo(Number expected) { return AssertionsOnValueComparison.isLessThanOrEqualTo(myself, info, value, expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public E isCloseTo(Number expected, Number tolerance) { return AssertionsOnValueCloseness.isCloseTo(myself, info, value, expected, tolerance); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public E isCloseTo(DateValue expected, DateValue tolerance) { return AssertionsOnValueCloseness.isCloseTo(myself, info, value, expected, tolerance); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public E isCloseTo(DateValue expected, TimeValue tolerance) { return AssertionsOnValueCloseness.isCloseTo(myself, info, value, expected, tolerance); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public E isCloseTo(DateValue expected, DateTimeValue tolerance) { return AssertionsOnValueCloseness.isCloseTo(myself, info, value, expected, tolerance); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public E isCloseTo(TimeValue expected, TimeValue tolerance) { return AssertionsOnValueCloseness.isCloseTo(myself, info, value, expected, tolerance); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public E isCloseTo(DateTimeValue expected, DateValue tolerance) { return AssertionsOnValueCloseness.isCloseTo(myself, info, value, expected, tolerance); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public E isCloseTo(DateTimeValue expected, TimeValue tolerance) { return AssertionsOnValueCloseness.isCloseTo(myself, info, value, expected, tolerance); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public E isCloseTo(DateTimeValue expected, DateTimeValue tolerance) { return AssertionsOnValueCloseness.isCloseTo(myself, info, value, expected, tolerance); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public E is(Condition condition) { return AssertionsOnValueCondition.is(myself, info, value, condition); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public E isNot(Condition condition) { return AssertionsOnValueCondition.isNot(myself, info, value, condition); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public E has(Condition condition) { return AssertionsOnValueCondition.is(myself, info, value, condition); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public E doesNotHave(Condition condition) { return AssertionsOnValueCondition.isNot(myself, info, value, condition); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public E satisfies(Condition condition) { return AssertionsOnValueCondition.satisfies(myself, info, value, condition); diff --git a/src/main/java/org/assertj/db/api/AbstractColumnAssert.java b/src/main/java/org/assertj/db/api/AbstractColumnAssert.java index a9a987c0..dc3509c4 100644 --- a/src/main/java/org/assertj/db/api/AbstractColumnAssert.java +++ b/src/main/java/org/assertj/db/api/AbstractColumnAssert.java @@ -8,44 +8,61 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api; -import org.assertj.db.api.assertions.*; -import org.assertj.db.api.assertions.impl.*; -import org.assertj.db.navigation.Position; -import org.assertj.db.navigation.element.ColumnElement; -import org.assertj.db.type.*; +import static org.assertj.db.util.Descriptions.getColumnValueDescription; import java.util.List; import java.util.UUID; -import static org.assertj.db.util.Descriptions.getColumnValueDescription; +import org.assertj.db.api.assertions.AssertOnColumnClass; +import org.assertj.db.api.assertions.AssertOnColumnContent; +import org.assertj.db.api.assertions.AssertOnColumnEquality; +import org.assertj.db.api.assertions.AssertOnColumnName; +import org.assertj.db.api.assertions.AssertOnColumnNullity; +import org.assertj.db.api.assertions.AssertOnColumnType; +import org.assertj.db.api.assertions.AssertOnNumberOfRows; +import org.assertj.db.api.assertions.impl.AssertionsOnColumnClass; +import org.assertj.db.api.assertions.impl.AssertionsOnColumnContent; +import org.assertj.db.api.assertions.impl.AssertionsOnColumnEquality; +import org.assertj.db.api.assertions.impl.AssertionsOnColumnName; +import org.assertj.db.api.assertions.impl.AssertionsOnColumnType; +import org.assertj.db.api.assertions.impl.AssertionsOnNumberOfRows; +import org.assertj.db.api.assertions.impl.AssertionsOnValuesNullity; +import org.assertj.db.navigation.Position; +import org.assertj.db.navigation.element.ColumnElement; +import org.assertj.db.type.AbstractDbData; +import org.assertj.db.type.Column; +import org.assertj.db.type.DateTimeValue; +import org.assertj.db.type.DateValue; +import org.assertj.db.type.TimeValue; +import org.assertj.db.type.Value; +import org.assertj.db.type.ValueType; /** * Base class for all {@link Column}s assertions. * - * @author Régis Pouiller - * @author Otoniel Isidoro - * - * @param The class of the actual value (an sub-class of {@link AbstractDbData}). - * @param The class of the original assertion (an sub-class of {@link AbstractDbAssert}). - * @param The class of this assertion (an sub-class of {@link AbstractColumnAssert}). + * @param The class of the actual value (an sub-class of {@link AbstractDbData}). + * @param The class of the original assertion (an sub-class of {@link AbstractDbAssert}). + * @param The class of this assertion (an sub-class of {@link AbstractColumnAssert}). * @param The class of this assertion on the value (an sub-class of {@link AbstractColumnValueAssert}). - * @param The class of the equivalent row assertion (an sub-class of {@link AbstractRowAssert}). + * @param The class of the equivalent row assertion (an sub-class of {@link AbstractRowAssert}). * @param The class of the equivalent row assertion on the value (an sub-class of {@link AbstractRowValueAssert}). + * @author Régis Pouiller + * @author Otoniel Isidoro */ public abstract class AbstractColumnAssert, A extends AbstractDbAssert, C extends AbstractColumnAssert, CV extends AbstractColumnValueAssert, R extends AbstractRowAssert, RV extends AbstractRowValueAssert> - extends AbstractSubAssert - implements ColumnElement, - AssertOnColumnClass, - AssertOnColumnEquality, - AssertOnColumnContent, - AssertOnNumberOfRows, - AssertOnColumnName, - AssertOnColumnType, - AssertOnColumnNullity { + extends AbstractSubAssert + implements ColumnElement, + AssertOnColumnClass, + AssertOnColumnEquality, + AssertOnColumnContent, + AssertOnNumberOfRows, + AssertOnColumnName, + AssertOnColumnType, + AssertOnColumnNullity { /** * Position of navigation to value. @@ -59,275 +76,362 @@ public abstract class AbstractColumnAssert, A extend /** * Constructor. - * + * * @param originalDbAssert The original assert. That could be a {@link RequestAssert} or a {@link TableAssert}. - * @param selfType Type of this assertion class : a sub-class of {@code AbstractColumnAssert}. - * @param valueType Class of the assert on the value : a sub-class of {@code AbstractColumnValueAssert}. - * @param column The column. + * @param selfType Type of this assertion class : a sub-class of {@code AbstractColumnAssert}. + * @param valueType Class of the assert on the value : a sub-class of {@code AbstractColumnValueAssert}. + * @param column The column. */ AbstractColumnAssert(A originalDbAssert, Class selfType, Class valueType, Column column) { super(originalDbAssert, selfType); this.column = column; valuePosition = new Position(selfType.cast(this), valueType) { - @Override protected String getDescription(int index) { + @Override + protected String getDescription(int index) { return getValueDescription(index); } }; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override protected String getValueDescription(int index) { return getColumnValueDescription(info, index); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override protected Position getValuePosition() { return valuePosition; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override protected List getValuesList() { return column.getValuesList(); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public C isEmpty() { return hasNumberOfRows(0); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public C hasNumberOfRows(int expected) { return AssertionsOnNumberOfRows.hasNumberOfRows(myself, info, column.getValuesList().size(), expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public C hasNumberOfRowsGreaterThan(int expected) { return AssertionsOnNumberOfRows.hasNumberOfRowsGreaterThan(myself, info, column.getValuesList().size(), expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public C hasNumberOfRowsLessThan(int expected) { return AssertionsOnNumberOfRows.hasNumberOfRowsLessThan(myself, info, column.getValuesList().size(), expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public C hasNumberOfRowsGreaterThanOrEqualTo(int expected) { return AssertionsOnNumberOfRows.hasNumberOfRowsGreaterThanOrEqualTo(myself, info, column.getValuesList().size(), expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public C hasNumberOfRowsLessThanOrEqualTo(int expected) { return AssertionsOnNumberOfRows.hasNumberOfRowsLessThanOrEqualTo(myself, info, column.getValuesList().size(), expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public C isOfClass(Class expected, boolean lenient) { return AssertionsOnColumnClass.isOfClass(myself, info, getValuesList(), expected, lenient); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public C isOfType(ValueType expected, boolean lenient) { return AssertionsOnColumnType.isOfType(myself, info, getValuesList(), expected, lenient); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public C isOfAnyTypeIn(ValueType... expected) { return AssertionsOnColumnType.isOfAnyTypeIn(myself, info, getValuesList(), expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public C isNumber(boolean lenient) { return AssertionsOnColumnType.isNumber(myself, info, getValuesList(), lenient); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public C isBoolean(boolean lenient) { return AssertionsOnColumnType.isBoolean(myself, info, getValuesList(), lenient); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public C isDate(boolean lenient) { return AssertionsOnColumnType.isDate(myself, info, getValuesList(), lenient); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public C isTime(boolean lenient) { return AssertionsOnColumnType.isTime(myself, info, getValuesList(), lenient); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public C isDateTime(boolean lenient) { return AssertionsOnColumnType.isDateTime(myself, info, getValuesList(), lenient); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public C isBytes(boolean lenient) { return AssertionsOnColumnType.isBytes(myself, info, getValuesList(), lenient); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public C isText(boolean lenient) { return AssertionsOnColumnType.isText(myself, info, getValuesList(), lenient); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public C isUUID(boolean lenient) { return AssertionsOnColumnType.isUUID(myself, info, getValuesList(), lenient); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public C hasOnlyNullValues() { return AssertionsOnValuesNullity.hasOnlyNullValues(myself, info, getValuesList()); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public C hasOnlyNotNullValues() { return AssertionsOnValuesNullity.hasOnlyNotNullValues(myself, info, getValuesList()); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public C hasValues(Object... expected) { return AssertionsOnColumnEquality.hasValues(myself, info, getValuesList(), expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public C hasValues(Boolean... expected) { return AssertionsOnColumnEquality.hasValues(myself, info, getValuesList(), expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public C hasValues(Number... expected) { return AssertionsOnColumnEquality.hasValues(myself, info, getValuesList(), expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public C hasValues(byte[]... expected) { return AssertionsOnColumnEquality.hasValues(myself, info, getValuesList(), expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public C hasValues(String... expected) { return AssertionsOnColumnEquality.hasValues(myself, info, getValuesList(), expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public C hasValues(Character... expected) { return AssertionsOnColumnEquality.hasValues(myself, info, getValuesList(), expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public C hasValues(UUID... expected) { return AssertionsOnColumnEquality.hasValues(myself, info, getValuesList(), expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public C hasValues(DateValue... expected) { return AssertionsOnColumnEquality.hasValues(myself, info, getValuesList(), expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public C hasValues(TimeValue... expected) { return AssertionsOnColumnEquality.hasValues(myself, info, getValuesList(), expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public C hasValues(DateTimeValue... expected) { return AssertionsOnColumnEquality.hasValues(myself, info, getValuesList(), expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public C containsValues(Object... expected) { return AssertionsOnColumnContent.containsValues(myself, info, getValuesList(), expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public C containsValues(Boolean... expected) { return AssertionsOnColumnContent.containsValues(myself, info, getValuesList(), expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public C containsValues(Number... expected) { return AssertionsOnColumnContent.containsValues(myself, info, getValuesList(), expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public C containsValues(byte[]... expected) { return AssertionsOnColumnContent.containsValues(myself, info, getValuesList(), expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public C containsValues(String... expected) { return AssertionsOnColumnContent.containsValues(myself, info, getValuesList(), expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public C containsValues(Character... expected) { return AssertionsOnColumnContent.containsValues(myself, info, getValuesList(), expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public C containsValues(UUID... expected) { return AssertionsOnColumnContent.containsValues(myself, info, getValuesList(), expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public C containsValues(DateValue... expected) { return AssertionsOnColumnContent.containsValues(myself, info, getValuesList(), expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public C containsValues(TimeValue... expected) { return AssertionsOnColumnContent.containsValues(myself, info, getValuesList(), expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public C containsValues(DateTimeValue... expected) { return AssertionsOnColumnContent.containsValues(myself, info, getValuesList(), expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public C hasColumnName(String columnName) { String name = column.getName(); diff --git a/src/main/java/org/assertj/db/api/AbstractColumnValueAssert.java b/src/main/java/org/assertj/db/api/AbstractColumnValueAssert.java index bb40ee0a..06e9ac20 100644 --- a/src/main/java/org/assertj/db/api/AbstractColumnValueAssert.java +++ b/src/main/java/org/assertj/db/api/AbstractColumnValueAssert.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api; @@ -18,18 +18,17 @@ /** * Assertion methods about a value in a {@link Column}. - * - * @author Régis Pouiller - * - * @param The class of the actual value (an sub-class of {@link AbstractDbData}). - * @param The class of the original assertion (an sub-class of {@link AbstractDbAssert}). - * @param The class of this assertion (an sub-class of {@link AbstractColumnAssert}). + * + * @param The class of the actual value (an sub-class of {@link AbstractDbData}). + * @param The class of the original assertion (an sub-class of {@link AbstractDbAssert}). + * @param The class of this assertion (an sub-class of {@link AbstractColumnAssert}). * @param The class of this assertion on the value (an sub-class of {@link AbstractColumnValueAssert}). - * @param The class of the equivalent row assertion (an sub-class of {@link AbstractRowAssert}). + * @param The class of the equivalent row assertion (an sub-class of {@link AbstractRowAssert}). * @param The class of the equivalent row assertion on the value (an sub-class of {@link AbstractRowValueAssert}). + * @author Régis Pouiller */ public abstract class AbstractColumnValueAssert, A extends AbstractDbAssert, C extends AbstractColumnAssert, CV extends AbstractColumnValueAssert, R extends AbstractRowAssert, RV extends AbstractRowValueAssert> - extends AbstractValueAssert { + extends AbstractValueAssert { /** * Constructor. diff --git a/src/main/java/org/assertj/db/api/AbstractDbAssert.java b/src/main/java/org/assertj/db/api/AbstractDbAssert.java index fc0d5178..ad9c61f9 100644 --- a/src/main/java/org/assertj/db/api/AbstractDbAssert.java +++ b/src/main/java/org/assertj/db/api/AbstractDbAssert.java @@ -8,10 +8,15 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api; +import static org.assertj.db.util.Descriptions.getColumnDescription; +import static org.assertj.db.util.Descriptions.getRowDescription; + +import java.util.List; + import org.assertj.db.api.assertions.AssertOnNumberOfColumns; import org.assertj.db.api.assertions.AssertOnNumberOfRows; import org.assertj.db.api.assertions.impl.AssertionsOnNumberOfColumns; @@ -23,28 +28,22 @@ import org.assertj.db.type.Column; import org.assertj.db.type.Row; -import java.util.List; - -import static org.assertj.db.util.Descriptions.getColumnDescription; -import static org.assertj.db.util.Descriptions.getRowDescription; - /** * Base class for all data ({@code Table} or {@code Request}) assertions. * - * @author Régis Pouiller - * - * @param The class of the actual value (an sub-class of {@link AbstractDbData}). - * @param The class of the original assert (an sub-class of {@link AbstractDbAssert}). - * @param The class of this assert (an sub-class of {@link AbstractColumnAssert}). + * @param The class of the actual value (an sub-class of {@link AbstractDbData}). + * @param The class of the original assert (an sub-class of {@link AbstractDbAssert}). + * @param The class of this assert (an sub-class of {@link AbstractColumnAssert}). * @param The class of this assertion on the value (an sub-class of {@link AbstractColumnValueAssert}). - * @param The class of the equivalent row assert (an sub-class of {@link AbstractRowAssert}). + * @param The class of the equivalent row assert (an sub-class of {@link AbstractRowAssert}). * @param The class of the equivalent row assertion on the value (an sub-class of {@link AbstractRowValueAssert}). + * @author Régis Pouiller */ public abstract class AbstractDbAssert, A extends AbstractDbAssert, C extends AbstractColumnAssert, CV extends AbstractColumnValueAssert, R extends AbstractRowAssert, RV extends AbstractRowValueAssert> - extends AbstractAssert - implements OriginWithColumnsAndRows, - AssertOnNumberOfColumns, - AssertOnNumberOfRows { + extends AbstractAssert + implements OriginWithColumnsAndRows, + AssertOnNumberOfColumns, + AssertOnNumberOfRows { /** * The actual value on which the assertion is. @@ -62,66 +61,82 @@ public abstract class AbstractDbAssert, A extends Ab /** * Constructor of the database assertions. - * - * @param actualValue The actual value on which the assertion is. - * @param selfType Type of this assertion class. + * + * @param actualValue The actual value on which the assertion is. + * @param selfType Type of this assertion class. * @param columnAssertType Class of the assertion on the column. - * @param rowAssertType Class of the assertion on the row. + * @param rowAssertType Class of the assertion on the row. */ AbstractDbAssert(D actualValue, Class selfType, Class columnAssertType, Class rowAssertType) { super(selfType); actual = actualValue; columnPosition = new PositionWithColumns(selfType.cast(this), columnAssertType) { - @Override protected String getDescription(int index) { + @Override + protected String getDescription(int index) { List columnsNameList = actual.getColumnsNameList(); String columnName = columnsNameList.get(index); return getColumnDescription(myself.getInfo(), index, columnName); } }; rowPosition = new Position(selfType.cast(this), rowAssertType) { - @Override protected String getDescription(int index) { + @Override + protected String getDescription(int index) { return getRowDescription(myself.getInfo(), index); } }; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public R row() { return rowPosition.getInstance(actual.getRowsList()); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public R row(int index) { return rowPosition.getInstance(actual.getRowsList(), index); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public C column() { return columnPosition.getInstance(actual.getColumnsList()); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public C column(int index) { return columnPosition.getInstance(actual.getColumnsList(), index); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public C column(String columnName) { return columnPosition.getInstance(actual.getColumnsList(), actual.getColumnsNameList(), columnName, actual.getColumnLetterCase()); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public A isEmpty() { return hasNumberOfRows(0); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public A hasNumberOfRows(int expected) { List rowsList = actual.getRowsList(); @@ -129,7 +144,9 @@ public A hasNumberOfRows(int expected) { return AssertionsOnNumberOfRows.hasNumberOfRows(myself, info, size, expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public A hasNumberOfRowsGreaterThan(int expected) { List rowsList = actual.getRowsList(); @@ -137,7 +154,9 @@ public A hasNumberOfRowsGreaterThan(int expected) { return AssertionsOnNumberOfRows.hasNumberOfRowsGreaterThan(myself, info, size, expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public A hasNumberOfRowsLessThan(int expected) { List rowsList = actual.getRowsList(); @@ -145,7 +164,9 @@ public A hasNumberOfRowsLessThan(int expected) { return AssertionsOnNumberOfRows.hasNumberOfRowsLessThan(myself, info, size, expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public A hasNumberOfRowsGreaterThanOrEqualTo(int expected) { List rowsList = actual.getRowsList(); @@ -153,7 +174,9 @@ public A hasNumberOfRowsGreaterThanOrEqualTo(int expected) { return AssertionsOnNumberOfRows.hasNumberOfRowsGreaterThanOrEqualTo(myself, info, size, expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public A hasNumberOfRowsLessThanOrEqualTo(int expected) { List rowsList = actual.getRowsList(); @@ -161,7 +184,9 @@ public A hasNumberOfRowsLessThanOrEqualTo(int expected) { return AssertionsOnNumberOfRows.hasNumberOfRowsLessThanOrEqualTo(myself, info, size, expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public A hasNumberOfColumns(int expected) { List columnsNameList = actual.getColumnsNameList(); @@ -169,7 +194,9 @@ public A hasNumberOfColumns(int expected) { return AssertionsOnNumberOfColumns.hasNumberOfColumns(myself, info, size, expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public A hasNumberOfColumnsGreaterThan(int expected) { List columnsNameList = actual.getColumnsNameList(); @@ -177,7 +204,9 @@ public A hasNumberOfColumnsGreaterThan(int expected) { return AssertionsOnNumberOfColumns.hasNumberOfColumnsGreaterThan(myself, info, size, expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public A hasNumberOfColumnsLessThan(int expected) { List columnsNameList = actual.getColumnsNameList(); @@ -185,7 +214,9 @@ public A hasNumberOfColumnsLessThan(int expected) { return AssertionsOnNumberOfColumns.hasNumberOfColumnsLessThan(myself, info, size, expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public A hasNumberOfColumnsGreaterThanOrEqualTo(int expected) { List columnsNameList = actual.getColumnsNameList(); @@ -193,7 +224,9 @@ public A hasNumberOfColumnsGreaterThanOrEqualTo(int expected) { return AssertionsOnNumberOfColumns.hasNumberOfColumnsGreaterThanOrEqualTo(myself, info, size, expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public A hasNumberOfColumnsLessThanOrEqualTo(int expected) { List columnsNameList = actual.getColumnsNameList(); diff --git a/src/main/java/org/assertj/db/api/AbstractRowAssert.java b/src/main/java/org/assertj/db/api/AbstractRowAssert.java index 3c149ec2..8976247a 100644 --- a/src/main/java/org/assertj/db/api/AbstractRowAssert.java +++ b/src/main/java/org/assertj/db/api/AbstractRowAssert.java @@ -8,18 +8,22 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api; +import static org.assertj.db.util.Descriptions.getRowValueDescription; + +import java.util.List; + import org.assertj.db.api.assertions.AssertOnNumberOfColumns; import org.assertj.db.api.assertions.AssertOnRowCondition; import org.assertj.db.api.assertions.AssertOnRowEquality; import org.assertj.db.api.assertions.AssertOnRowNullity; -import org.assertj.db.api.assertions.impl.AssertionsOnRowCondition; -import org.assertj.db.api.assertions.impl.AssertionsOnValuesNullity; import org.assertj.db.api.assertions.impl.AssertionsOnNumberOfColumns; +import org.assertj.db.api.assertions.impl.AssertionsOnRowCondition; import org.assertj.db.api.assertions.impl.AssertionsOnRowEquality; +import org.assertj.db.api.assertions.impl.AssertionsOnValuesNullity; import org.assertj.db.navigation.Position; import org.assertj.db.navigation.PositionWithColumns; import org.assertj.db.navigation.ToValueFromRow; @@ -28,61 +32,58 @@ import org.assertj.db.type.Row; import org.assertj.db.type.Value; -import java.util.List; - -import static org.assertj.db.util.Descriptions.getRowValueDescription; - /** * Base class for all {@link Row}s assertions. * - * @author Régis Pouiller - * @author Julien Roy - * - * @param The class of the actual value (an sub-class of {@link AbstractDbData}). - * @param The class of the original assertion (an sub-class of {@link AbstractDbAssert}). - * @param The class of the equivalent column assertion (an sub-class of {@link AbstractColumnAssert}). + * @param The class of the actual value (an sub-class of {@link AbstractDbData}). + * @param The class of the original assertion (an sub-class of {@link AbstractDbAssert}). + * @param The class of the equivalent column assertion (an sub-class of {@link AbstractColumnAssert}). * @param The class of the equivalent column assertion on the value (an sub-class of {@link AbstractColumnValueAssert} - * ). - * @param The class of this assertion (an sub-class of {@link AbstractRowAssert}). + * ). + * @param The class of this assertion (an sub-class of {@link AbstractRowAssert}). * @param The class of this assertion on the value (an sub-class of {@link AbstractRowValueAssert}). + * @author Régis Pouiller + * @author Julien Roy */ public abstract class AbstractRowAssert, A extends AbstractDbAssert, C extends AbstractColumnAssert, CV extends AbstractColumnValueAssert, R extends AbstractRowAssert, RV extends AbstractRowValueAssert> - extends AbstractSubAssert - implements RowElement, - ToValueFromRow, - AssertOnRowEquality, - AssertOnNumberOfColumns, - AssertOnRowNullity, - AssertOnRowCondition { - - /** - * Position of navigation to value. - */ - private final PositionWithColumns valuePosition; + extends AbstractSubAssert + implements RowElement, + ToValueFromRow, + AssertOnRowEquality, + AssertOnNumberOfColumns, + AssertOnRowNullity, + AssertOnRowCondition { /** * Row on which do the assertion. */ protected final Row row; + /** + * Position of navigation to value. + */ + private final PositionWithColumns valuePosition; /** * Constructor. * * @param originalDbAssert The original assert. That could be a {@link RequestAssert} or a {@link TableAssert}. - * @param selfType Type of this assertion class : a sub-class of {@code AbstractRowAssert}. - * @param valueType Class of the assert on the value : a sub-class of {@code AbstractRowValueAssert}. + * @param selfType Type of this assertion class : a sub-class of {@code AbstractRowAssert}. + * @param valueType Class of the assert on the value : a sub-class of {@code AbstractRowValueAssert}. */ AbstractRowAssert(A originalDbAssert, Class selfType, Class valueType, Row row) { super(originalDbAssert, selfType); this.row = row; valuePosition = new PositionWithColumns(selfType.cast(this), valueType) { - @Override protected String getDescription(int index) { + @Override + protected String getDescription(int index) { return getValueDescription(index); } }; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override protected String getValueDescription(int index) { List columnsNameList = row.getColumnsNameList(); @@ -90,68 +91,90 @@ protected String getValueDescription(int index) { return getRowValueDescription(info, index, columnName); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override protected Position getValuePosition() { return valuePosition; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override protected List getValuesList() { return row.getValuesList(); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public RV value(String columnName) { return valuePosition.getInstance(getValuesList(), row.getColumnsNameList(), columnName, row.getColumnLetterCase()); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public R hasNumberOfColumns(int expected) { return AssertionsOnNumberOfColumns.hasNumberOfColumns(myself, info, getValuesList().size(), expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public R hasNumberOfColumnsGreaterThan(int expected) { return AssertionsOnNumberOfColumns.hasNumberOfColumnsGreaterThan(myself, info, getValuesList().size(), expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public R hasNumberOfColumnsLessThan(int expected) { return AssertionsOnNumberOfColumns.hasNumberOfColumnsLessThan(myself, info, getValuesList().size(), expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public R hasNumberOfColumnsGreaterThanOrEqualTo(int expected) { return AssertionsOnNumberOfColumns.hasNumberOfColumnsGreaterThanOrEqualTo(myself, info, getValuesList().size(), - expected); + expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public R hasNumberOfColumnsLessThanOrEqualTo(int expected) { return AssertionsOnNumberOfColumns.hasNumberOfColumnsLessThanOrEqualTo(myself, info, getValuesList().size(), expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public R hasValues(Object... expected) { return AssertionsOnRowEquality.hasValues(myself, info, getValuesList(), expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public R hasOnlyNotNullValues() { return AssertionsOnValuesNullity.hasOnlyNotNullValues(myself, info, getValuesList()); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public R hasValuesSatisfying(Object... expected) { return AssertionsOnRowCondition.hasValuesSatisfying(myself, info, getValuesList(), expected); diff --git a/src/main/java/org/assertj/db/api/AbstractRowValueAssert.java b/src/main/java/org/assertj/db/api/AbstractRowValueAssert.java index 32e5390d..64c4524d 100644 --- a/src/main/java/org/assertj/db/api/AbstractRowValueAssert.java +++ b/src/main/java/org/assertj/db/api/AbstractRowValueAssert.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api; @@ -21,40 +21,43 @@ /** * Assertion methods about a value in a {@link Row}. - * - * @author Régis Pouiller - * - * @param The class of the actual value (an sub-class of {@link AbstractDbData}). - * @param The class of the original assertion (an sub-class of {@link AbstractDbAssert}). - * @param The class of the equivalent row assertion (an sub-class of {@link AbstractColumnAssert}). + * + * @param The class of the actual value (an sub-class of {@link AbstractDbData}). + * @param The class of the original assertion (an sub-class of {@link AbstractDbAssert}). + * @param The class of the equivalent row assertion (an sub-class of {@link AbstractColumnAssert}). * @param The class of the equivalent row assertion on the value (an sub-class of {@link AbstractColumnValueAssert} - * ). - * @param The class of this assertion (an sub-class of {@link AbstractRowAssert}). + * ). + * @param The class of this assertion (an sub-class of {@link AbstractRowAssert}). * @param The class of this assertion on the value (an sub-class of {@link AbstractRowValueAssert}). + * @author Régis Pouiller */ public abstract class AbstractRowValueAssert, A extends AbstractDbAssert, C extends AbstractColumnAssert, CV extends AbstractColumnValueAssert, R extends AbstractRowAssert, RV extends AbstractRowValueAssert> - extends AbstractValueAssert - implements ToValueFromRow, - AssertOnColumnName { + extends AbstractValueAssert + implements ToValueFromRow, + AssertOnColumnName { /** * Constructor. - * - * @param selfType Type of this assertion class : a sub-class of {@code AbstractValueAssert}. - * @param origin The assertion of {@link org.assertj.db.navigation.origin.Origin}. + * + * @param selfType Type of this assertion class : a sub-class of {@code AbstractValueAssert}. + * @param origin The assertion of {@link org.assertj.db.navigation.origin.Origin}. * @param actualValue The value on which are the assertion methods. */ AbstractRowValueAssert(Class selfType, R origin, Value actualValue) { super(selfType, origin, actualValue); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public RV value(String columnName) { return returnToOrigin().value(columnName); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public RV hasColumnName(String columnName) { return AssertionsOnColumnName.hasColumnName(myself, info, value.getColumnName(), columnName, value.getColumnLetterCase()); diff --git a/src/main/java/org/assertj/db/api/AbstractSoftAssertions.java b/src/main/java/org/assertj/db/api/AbstractSoftAssertions.java index 51f3a7d5..e614dbb5 100644 --- a/src/main/java/org/assertj/db/api/AbstractSoftAssertions.java +++ b/src/main/java/org/assertj/db/api/AbstractSoftAssertions.java @@ -8,32 +8,32 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api; -import org.assertj.core.util.Lists; - import java.util.List; +import org.assertj.core.util.Lists; + /** * Base class of AssertJ-DB SoftAssertions. * * @author Julien Roy */ -public class AbstractSoftAssertions { +class AbstractSoftAssertions { - protected final SoftProxies proxies = new SoftProxies(); + private final SoftProxies proxies = new SoftProxies(); - public V proxy(Class assertClass, Class actualClass, T actual) { + V proxy(Class assertClass, Class actualClass, T actual) { return this.proxies.create(assertClass, actualClass, actual); } - public List errorsCollected() { + List errorsCollected() { return Lists.newArrayList(this.proxies.errorsCollected()); } - public boolean wasSuccess() { + boolean wasSuccess() { return this.proxies.wasSuccess(); } } diff --git a/src/main/java/org/assertj/db/api/AbstractSubAssert.java b/src/main/java/org/assertj/db/api/AbstractSubAssert.java index 00132749..df0ca5a0 100644 --- a/src/main/java/org/assertj/db/api/AbstractSubAssert.java +++ b/src/main/java/org/assertj/db/api/AbstractSubAssert.java @@ -8,10 +8,12 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api; +import java.util.List; + import org.assertj.db.navigation.Position; import org.assertj.db.navigation.ToValue; import org.assertj.db.navigation.origin.OriginWithColumnsAndRows; @@ -20,32 +22,29 @@ import org.assertj.db.type.Row; import org.assertj.db.type.Value; -import java.util.List; - /** * Assertion methods about {@link Column} or {@link Row}. - * - * @author Régis Pouiller - * - * @param The class of the actual value (an sub-class of {@link AbstractDbData}). - * @param The class of the original assertion (an sub-class of {@link AbstractDbAssert}). - * @param The class of this assertion (an sub-class of {@link AbstractSubAssert}). - * @param The class of this assertion on the value (an sub-class of {@link AbstractValueAssert}). - * @param The class of this assertion (an sub-class of {@link AbstractColumnAssert}). + * + * @param The class of the actual value (an sub-class of {@link AbstractDbData}). + * @param The class of the original assertion (an sub-class of {@link AbstractDbAssert}). + * @param The class of this assertion (an sub-class of {@link AbstractSubAssert}). + * @param The class of this assertion on the value (an sub-class of {@link AbstractValueAssert}). + * @param The class of this assertion (an sub-class of {@link AbstractColumnAssert}). * @param The class of this assertion on the value (an sub-class of {@link AbstractColumnValueAssert}). - * @param The class of the equivalent row assertion (an sub-class of {@link AbstractRowAssert}). + * @param The class of the equivalent row assertion (an sub-class of {@link AbstractRowAssert}). * @param The class of the equivalent row assertion on the value (an sub-class of {@link AbstractRowValueAssert}). + * @author Régis Pouiller */ public abstract class AbstractSubAssert, A extends AbstractDbAssert, S extends AbstractSubAssert, V extends AbstractValueAssert, C extends AbstractColumnAssert, CV extends AbstractColumnValueAssert, R extends AbstractRowAssert, RV extends AbstractRowValueAssert> - extends AbstractAssertWithOriginWithColumnsAndRows - implements OriginWithColumnsAndRows, - ToValue { + extends AbstractAssertWithOriginWithColumnsAndRows + implements OriginWithColumnsAndRows, + ToValue { /** * Constructor. - * + * * @param originalDbAssert The original assert. That could be a {@link RequestAssert} or a {@link TableAssert}. - * @param selfType Type of this assertion class : a sub-class of {@code AbstractSubAssert}. + * @param selfType Type of this assertion class : a sub-class of {@code AbstractSubAssert}. */ AbstractSubAssert(A originalDbAssert, Class selfType) { super(selfType, originalDbAssert); @@ -53,18 +52,23 @@ public abstract class AbstractSubAssert, A extends A /** * Returns the value description. + * * @param index The index of the value. * @return The description. */ protected abstract String getValueDescription(int index); - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V value() { return getValuePosition().getInstance(getValuesList()); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V value(int index) { return getValuePosition().getInstance(getValuesList(), index); @@ -72,13 +76,14 @@ public V value(int index) { /** * Returns the position of navigation to value. + * * @return The position of navigation to value. */ protected abstract Position getValuePosition(); /** * Returns the list of values. - * + * * @return The list of values. */ protected abstract List getValuesList(); diff --git a/src/main/java/org/assertj/db/api/AbstractValueAssert.java b/src/main/java/org/assertj/db/api/AbstractValueAssert.java index 4ab634d6..6a5522c0 100644 --- a/src/main/java/org/assertj/db/api/AbstractValueAssert.java +++ b/src/main/java/org/assertj/db/api/AbstractValueAssert.java @@ -8,52 +8,74 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api; -import org.assertj.core.api.Condition; -import org.assertj.db.api.assertions.*; -import org.assertj.db.api.assertions.impl.*; -import org.assertj.db.navigation.ToValue; -import org.assertj.db.navigation.element.ValueElement; -import org.assertj.db.type.*; - import java.time.LocalDate; import java.time.LocalDateTime; import java.time.LocalTime; import java.util.UUID; +import org.assertj.core.api.Condition; +import org.assertj.db.api.assertions.AssertOnValueChronology; +import org.assertj.db.api.assertions.AssertOnValueClass; +import org.assertj.db.api.assertions.AssertOnValueCloseness; +import org.assertj.db.api.assertions.AssertOnValueComparison; +import org.assertj.db.api.assertions.AssertOnValueCondition; +import org.assertj.db.api.assertions.AssertOnValueEquality; +import org.assertj.db.api.assertions.AssertOnValueInequality; +import org.assertj.db.api.assertions.AssertOnValueNullity; +import org.assertj.db.api.assertions.AssertOnValueType; +import org.assertj.db.api.assertions.impl.AssertionsOnValueChronology; +import org.assertj.db.api.assertions.impl.AssertionsOnValueClass; +import org.assertj.db.api.assertions.impl.AssertionsOnValueCloseness; +import org.assertj.db.api.assertions.impl.AssertionsOnValueComparison; +import org.assertj.db.api.assertions.impl.AssertionsOnValueCondition; +import org.assertj.db.api.assertions.impl.AssertionsOnValueEquality; +import org.assertj.db.api.assertions.impl.AssertionsOnValueInequality; +import org.assertj.db.api.assertions.impl.AssertionsOnValueNullity; +import org.assertj.db.api.assertions.impl.AssertionsOnValueType; +import org.assertj.db.navigation.ToValue; +import org.assertj.db.navigation.element.ValueElement; +import org.assertj.db.type.AbstractDbData; +import org.assertj.db.type.Column; +import org.assertj.db.type.DateTimeValue; +import org.assertj.db.type.DateValue; +import org.assertj.db.type.Row; +import org.assertj.db.type.TimeValue; +import org.assertj.db.type.Value; +import org.assertj.db.type.ValueType; + /** * Base class for all values assertions. * + * @param The class of the actual value (an sub-class of {@link AbstractDbData}). + * @param The class of the original assertion (an sub-class of {@link AbstractDbAssert}). + * @param The class of which contains assertion methods about {@link Column} or {@link Row} (an sub-class of + * {@link AbstractSubAssert}). + * @param The class of this assertion (an sub-class of {@link AbstractValueAssert}). + * @param The class of this assertion (an sub-class of {@link AbstractColumnAssert}). + * @param The class of this assertion on the value (an sub-class of {@link AbstractColumnValueAssert}). + * @param The class of the equivalent row assertion (an sub-class of {@link AbstractRowAssert}). + * @param The class of the equivalent row assertion on the value (an sub-class of {@link AbstractRowValueAssert}). * @author Régis Pouiller * @author Otoniel Isidoro * @author Julien Roy - * - * @param The class of the actual value (an sub-class of {@link AbstractDbData}). - * @param The class of the original assertion (an sub-class of {@link AbstractDbAssert}). - * @param The class of which contains assertion methods about {@link Column} or {@link Row} (an sub-class of - * {@link AbstractSubAssert}). - * @param The class of this assertion (an sub-class of {@link AbstractValueAssert}). - * @param The class of this assertion (an sub-class of {@link AbstractColumnAssert}). - * @param The class of this assertion on the value (an sub-class of {@link AbstractColumnValueAssert}). - * @param The class of the equivalent row assertion (an sub-class of {@link AbstractRowAssert}). - * @param The class of the equivalent row assertion on the value (an sub-class of {@link AbstractRowValueAssert}). */ public abstract class AbstractValueAssert, A extends AbstractDbAssert, S extends AbstractSubAssert, V extends AbstractValueAssert, C extends AbstractColumnAssert, CV extends AbstractColumnValueAssert, R extends AbstractRowAssert, RV extends AbstractRowValueAssert> - extends AbstractAssertWithOriginWithColumnsAndRows - implements ValueElement, - ToValue, - AssertOnValueClass, - AssertOnValueType, - AssertOnValueNullity, - AssertOnValueEquality, - AssertOnValueInequality, - AssertOnValueChronology, - AssertOnValueComparison, - AssertOnValueCloseness, - AssertOnValueCondition { + extends AbstractAssertWithOriginWithColumnsAndRows + implements ValueElement, + ToValue, + AssertOnValueClass, + AssertOnValueType, + AssertOnValueNullity, + AssertOnValueEquality, + AssertOnValueInequality, + AssertOnValueChronology, + AssertOnValueComparison, + AssertOnValueCloseness, + AssertOnValueCondition { /** * The actual value on which this assertion is. @@ -62,550 +84,731 @@ public abstract class AbstractValueAssert, A extends /** * Constructor. + * * @param selfType Type of this assertion class : a sub-class of {@code AbstractValueAssert}. - * @param origin The assertion of {@link org.assertj.db.navigation.origin.Origin}. - * @param value The value on which are the assertion methods. + * @param origin The assertion of {@link org.assertj.db.navigation.origin.Origin}. + * @param value The value on which are the assertion methods. */ AbstractValueAssert(Class selfType, S origin, Value value) { super(selfType, origin); this.value = value; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V value() { return returnToOrigin().value(); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V value(int index) { return returnToOrigin().value(index); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V isOfClass(Class expected) { return AssertionsOnValueClass.isOfClass(myself, info, value, expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V isOfType(ValueType expected) { return AssertionsOnValueType.isOfType(myself, info, value, expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V isOfAnyTypeIn(ValueType... expected) { return AssertionsOnValueType.isOfAnyTypeIn(myself, info, value, expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V isNumber() { return AssertionsOnValueType.isNumber(myself, info, value); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V isBoolean() { return AssertionsOnValueType.isBoolean(myself, info, value); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V isDate() { return AssertionsOnValueType.isDate(myself, info, value); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V isTime() { return AssertionsOnValueType.isTime(myself, info, value); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V isDateTime() { return AssertionsOnValueType.isDateTime(myself, info, value); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V isBytes() { return AssertionsOnValueType.isBytes(myself, info, value); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V isText() { return AssertionsOnValueType.isText(myself, info, value); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V isUUID() { return AssertionsOnValueType.isUUID(myself, info, value); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V isNull() { return AssertionsOnValueNullity.isNull(myself, info, value); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V isNotNull() { return AssertionsOnValueNullity.isNotNull(myself, info, value); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V isEqualTo(Object expected) { return AssertionsOnValueEquality.isEqualTo(myself, info, value, expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V isEqualTo(Boolean expected) { return AssertionsOnValueEquality.isEqualTo(myself, info, value, expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V isTrue() { return AssertionsOnValueEquality.isTrue(myself, info, value); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V isFalse() { return AssertionsOnValueEquality.isFalse(myself, info, value); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V isEqualTo(Number expected) { return AssertionsOnValueEquality.isEqualTo(myself, info, value, expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V isEqualTo(byte[] expected) { return AssertionsOnValueEquality.isEqualTo(myself, info, value, expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V isEqualTo(String expected) { return AssertionsOnValueEquality.isEqualTo(myself, info, value, expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V isEqualTo(Character expected) { return AssertionsOnValueEquality.isEqualTo(myself, info, value, expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V isEqualTo(UUID expected) { return AssertionsOnValueEquality.isEqualTo(myself, info, value, expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V isEqualTo(DateValue expected) { return AssertionsOnValueEquality.isEqualTo(myself, info, value, expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V isEqualTo(TimeValue expected) { return AssertionsOnValueEquality.isEqualTo(myself, info, value, expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V isEqualTo(DateTimeValue expected) { return AssertionsOnValueEquality.isEqualTo(myself, info, value, expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V isEqualTo(LocalDate expected) { return isEqualTo(DateValue.from(expected)); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V isEqualTo(LocalTime expected) { return isEqualTo(TimeValue.from(expected)); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V isEqualTo(LocalDateTime expected) { return isEqualTo(DateTimeValue.from(expected)); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V isNotEqualTo(Object expected) { return AssertionsOnValueInequality.isNotEqualTo(myself, info, value, expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V isNotEqualTo(Boolean expected) { return AssertionsOnValueInequality.isNotEqualTo(myself, info, value, expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V isNotEqualTo(byte[] expected) { return AssertionsOnValueInequality.isNotEqualTo(myself, info, value, expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V isNotEqualTo(DateTimeValue expected) { return AssertionsOnValueInequality.isNotEqualTo(myself, info, value, expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V isNotEqualTo(DateValue expected) { return AssertionsOnValueInequality.isNotEqualTo(myself, info, value, expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V isNotEqualTo(Number expected) { return AssertionsOnValueInequality.isNotEqualTo(myself, info, value, expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V isNotEqualTo(String expected) { return AssertionsOnValueInequality.isNotEqualTo(myself, info, value, expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V isNotEqualTo(Character expected) { return AssertionsOnValueInequality.isNotEqualTo(myself, info, value, expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V isNotEqualTo(UUID expected) { return AssertionsOnValueInequality.isNotEqualTo(myself, info, value, expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V isNotEqualTo(TimeValue expected) { return AssertionsOnValueInequality.isNotEqualTo(myself, info, value, expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V isNotEqualTo(LocalDate expected) { return isNotEqualTo(DateValue.from(expected)); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V isNotEqualTo(LocalTime expected) { return isNotEqualTo(TimeValue.from(expected)); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V isNotEqualTo(LocalDateTime expected) { return isNotEqualTo(DateTimeValue.from(expected)); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V isBefore(DateValue date) { return AssertionsOnValueChronology.isBefore(myself, info, value, date); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V isBefore(TimeValue time) { return AssertionsOnValueChronology.isBefore(myself, info, value, time); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V isBefore(DateTimeValue dateTime) { return AssertionsOnValueChronology.isBefore(myself, info, value, dateTime); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V isBefore(LocalDate date) { return isBefore(DateValue.from(date)); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V isBefore(LocalTime time) { return isBefore(TimeValue.from(time)); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V isBefore(LocalDateTime dateTime) { return isBefore(DateTimeValue.from(dateTime)); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V isBefore(String expected) { return AssertionsOnValueChronology.isBefore(myself, info, value, expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V isBeforeOrEqualTo(DateValue date) { return AssertionsOnValueChronology.isBeforeOrEqualTo(myself, info, value, date); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V isBeforeOrEqualTo(TimeValue time) { return AssertionsOnValueChronology.isBeforeOrEqualTo(myself, info, value, time); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V isBeforeOrEqualTo(DateTimeValue dateTime) { return AssertionsOnValueChronology.isBeforeOrEqualTo(myself, info, value, dateTime); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V isBeforeOrEqualTo(LocalDate date) { return isBeforeOrEqualTo(DateValue.from(date)); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V isBeforeOrEqualTo(LocalTime time) { return isBeforeOrEqualTo(TimeValue.from(time)); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V isBeforeOrEqualTo(LocalDateTime dateTime) { return isBeforeOrEqualTo(DateTimeValue.from(dateTime)); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V isBeforeOrEqualTo(String expected) { return AssertionsOnValueChronology.isBeforeOrEqualTo(myself, info, value, expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V isAfter(DateValue date) { return AssertionsOnValueChronology.isAfter(myself, info, value, date); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V isAfter(TimeValue time) { return AssertionsOnValueChronology.isAfter(myself, info, value, time); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V isAfter(DateTimeValue dateTime) { return AssertionsOnValueChronology.isAfter(myself, info, value, dateTime); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V isAfter(LocalDate date) { return isAfter(DateValue.from(date)); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V isAfter(LocalTime time) { return isAfter(TimeValue.from(time)); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V isAfter(LocalDateTime dateTime) { return isAfter(DateTimeValue.from(dateTime)); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V isAfter(String expected) { return AssertionsOnValueChronology.isAfter(myself, info, value, expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V isAfterOrEqualTo(DateValue date) { return AssertionsOnValueChronology.isAfterOrEqualTo(myself, info, value, date); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V isAfterOrEqualTo(TimeValue time) { return AssertionsOnValueChronology.isAfterOrEqualTo(myself, info, value, time); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V isAfterOrEqualTo(DateTimeValue dateTime) { return AssertionsOnValueChronology.isAfterOrEqualTo(myself, info, value, dateTime); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V isAfterOrEqualTo(LocalDate date) { return isAfterOrEqualTo(DateValue.from(date)); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V isAfterOrEqualTo(LocalTime time) { return isAfterOrEqualTo(TimeValue.from(time)); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V isAfterOrEqualTo(LocalDateTime dateTime) { return isAfterOrEqualTo(DateTimeValue.from(dateTime)); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V isAfterOrEqualTo(String expected) { return AssertionsOnValueChronology.isAfterOrEqualTo(myself, info, value, expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V isZero() { return AssertionsOnValueEquality.isZero(myself, info, value); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V isNotZero() { return AssertionsOnValueInequality.isNotZero(myself, info, value); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V isGreaterThan(Number expected) { return AssertionsOnValueComparison.isGreaterThan(myself, info, value, expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V isLessThan(Number expected) { return AssertionsOnValueComparison.isLessThan(myself, info, value, expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V isGreaterThanOrEqualTo(Number expected) { return AssertionsOnValueComparison.isGreaterThanOrEqualTo(myself, info, value, expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V isLessThanOrEqualTo(Number expected) { return AssertionsOnValueComparison.isLessThanOrEqualTo(myself, info, value, expected); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V isCloseTo(Number expected, Number tolerance) { return AssertionsOnValueCloseness.isCloseTo(myself, info, value, expected, tolerance); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V isCloseTo(DateValue expected, DateValue tolerance) { return AssertionsOnValueCloseness.isCloseTo(myself, info, value, expected, tolerance); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V isCloseTo(DateValue expected, TimeValue tolerance) { return AssertionsOnValueCloseness.isCloseTo(myself, info, value, expected, tolerance); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V isCloseTo(DateValue expected, DateTimeValue tolerance) { return AssertionsOnValueCloseness.isCloseTo(myself, info, value, expected, tolerance); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V isCloseTo(TimeValue expected, TimeValue tolerance) { return AssertionsOnValueCloseness.isCloseTo(myself, info, value, expected, tolerance); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V isCloseTo(DateTimeValue expected, DateValue tolerance) { return AssertionsOnValueCloseness.isCloseTo(myself, info, value, expected, tolerance); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V isCloseTo(DateTimeValue expected, TimeValue tolerance) { return AssertionsOnValueCloseness.isCloseTo(myself, info, value, expected, tolerance); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V isCloseTo(DateTimeValue expected, DateTimeValue tolerance) { return AssertionsOnValueCloseness.isCloseTo(myself, info, value, expected, tolerance); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V is(Condition condition) { return AssertionsOnValueCondition.is(myself, info, value, condition); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V isNot(Condition condition) { return AssertionsOnValueCondition.isNot(myself, info, value, condition); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V has(Condition condition) { return AssertionsOnValueCondition.is(myself, info, value, condition); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V doesNotHave(Condition condition) { return AssertionsOnValueCondition.isNot(myself, info, value, condition); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V satisfies(Condition condition) { return AssertionsOnValueCondition.satisfies(myself, info, value, condition); diff --git a/src/main/java/org/assertj/db/api/Assertions.java b/src/main/java/org/assertj/db/api/Assertions.java index 8941e305..aa1cccd8 100644 --- a/src/main/java/org/assertj/db/api/Assertions.java +++ b/src/main/java/org/assertj/db/api/Assertions.java @@ -8,31 +8,35 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api; +import static org.assertj.db.util.Descriptions.getDescription; + +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.io.InputStream; + import org.assertj.db.exception.AssertJDBException; import org.assertj.db.type.Changes; import org.assertj.db.type.Request; import org.assertj.db.type.Source; import org.assertj.db.type.Table; -import java.io.*; - -import static org.assertj.db.util.Descriptions.getDescription; - /** * Entry point of all the assertions. * *

* Example with a {@link Source} and a {@link Table} with test on the content on the first row of the {@code movie} * table that the {@code title} column contains "Alien" like text and the next column contains 1979 like number : *

- * + * *
  * 
  * Source source = new Source("jdbc:h2:mem:test", "sa", "");
@@ -46,11 +50,11 @@
  *            .isEqualTo(1979);
  * 
  * 
- * + * *

* It is possible to chain assertion on a value : *

- * + * *
  * 
  * assertThat(table)
@@ -60,11 +64,11 @@
  *             .isEqualTo("Alien");
  * 
  * 
- * + * *

* It is not necessary to use the returnToXxxx methods. The next example is equivalent to the first : *

- * + * *
  * 
  * Source source = new Source("jdbc:h2:mem:test", "sa", "");
@@ -77,11 +81,11 @@
  *            .isEqualTo(1979);
  * 
  * 
- * + * *

* It is possible to do the same thing with column and the row : *

- * + * *
  * 
  * assertThat(table)
@@ -96,9 +100,8 @@
  *            .equalTo(2004);
  * 
  * 
- * + * * @author Régis Pouiller - * */ public final class Assertions { @@ -111,7 +114,7 @@ private Assertions() { /** * Creates a new instance of {@link TableAssert}. - * + * * @param table The table to assert on. * @return The created assertion object. */ @@ -121,7 +124,7 @@ public static TableAssert assertThat(Table table) { /** * Creates a new instance of {@link RequestAssert}. - * + * * @param request The request to assert on. * @return The created assertion object. */ @@ -131,7 +134,7 @@ public static RequestAssert assertThat(Request request) { /** * Creates a new instance of {@link ChangesAssert}. - * + * * @param changes The changes to assert on. * @return The created assertion object. */ @@ -141,7 +144,7 @@ public static ChangesAssert assertThat(Changes changes) { /** * Reads the bytes from an {@link InputStream}. - * + * * @param inputStream The {@link InputStream} * @return A array of {@code byte} * @throws AssertJDBException If triggered, this exception wrap a possible {@link IOException} during the loading. @@ -164,11 +167,11 @@ private static byte[] read(InputStream inputStream) { /** * Reads the bytes from a file and returns them. - * + * * @param file The {@link File} * @return The bytes of the file. * @throws NullPointerException If the {@code file} field is {@code null}. - * @throws AssertJDBException If triggered, this exception wrap a possible {@link IOException} during the loading. + * @throws AssertJDBException If triggered, this exception wrap a possible {@link IOException} during the loading. */ public static byte[] bytesContentOf(File file) { if (file == null) { @@ -184,7 +187,7 @@ public static byte[] bytesContentOf(File file) { /** * Reads the bytes from a file in the classpath and returns them. - * + * * @param resource The name of the file in the classpath. * @return The bytes of the file. * @throws NullPointerException If the {@code resource} field is {@code null}. diff --git a/src/main/java/org/assertj/db/api/BDDAssertions.java b/src/main/java/org/assertj/db/api/BDDAssertions.java index d6c42a18..7cb7e902 100644 --- a/src/main/java/org/assertj/db/api/BDDAssertions.java +++ b/src/main/java/org/assertj/db/api/BDDAssertions.java @@ -8,34 +8,35 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api; +import static org.assertj.db.util.Descriptions.getDescription; + +import java.io.File; +import java.io.IOException; + import org.assertj.db.exception.AssertJDBException; import org.assertj.db.type.Changes; import org.assertj.db.type.Request; import org.assertj.db.type.Source; import org.assertj.db.type.Table; -import java.io.*; - -import static org.assertj.db.util.Descriptions.getDescription; - /** * Behavior Driven Development style entry point for all assertion methods. *

* The difference with the {@link Assertions} class is that the entry point methods are named then * instead of assertThat. *

- * The navigation methods are defined in navigation package.
- * The assertion methods are defined in assertions package. + * The navigation methods are defined in navigation package.
+ * The assertion methods are defined in assertions package. *

*

* Example with a {@link Source} and a {@link Table} with test on the content on the first row of the {@code movie} * table that the {@code title} column contains "Alien" as text and the next column contains 1979 as a number : *

- * + * *
  * 
  * Source source = new Source("jdbc:h2:mem:test", "sa", "");
@@ -49,11 +50,11 @@
  *            .isEqualTo(1979);
  * 
  * 
- * + * *

* It is possible to chain assertion on a value : *

- * + * *
  * 
  * then(table)
@@ -63,11 +64,11 @@
  *             .isEqualTo("Alien");
  * 
  * 
- * + * *

* It is not necessary to use the returnToXxxx methods. The next example is equivalent to the first : *

- * + * *
  * 
  * Source source = new Source("jdbc:h2:mem:test", "sa", "");
@@ -80,11 +81,11 @@
  *            .isEqualTo(1979);
  * 
  * 
- * + * *

* It is possible to do the same thing with column and the row : *

- * + * *
  * 
  * then(table)
@@ -111,7 +112,7 @@ private BDDAssertions() {
 
   /**
    * Creates a new instance of {@link TableAssert}.
-   * 
+   *
    * @param table The table to assert on.
    * @return The created assertion object.
    */
@@ -121,7 +122,7 @@ public static TableAssert then(Table table) {
 
   /**
    * Creates a new instance of {@link RequestAssert}.
-   * 
+   *
    * @param request The request to assert on.
    * @return The created assertion object.
    */
@@ -131,7 +132,7 @@ public static RequestAssert then(Request request) {
 
   /**
    * Creates a new instance of {@link ChangesAssert}.
-   * 
+   *
    * @param changes The changes to assert on.
    * @return The created assertion object.
    */
@@ -141,11 +142,11 @@ public static ChangesAssert then(Changes changes) {
 
   /**
    * Reads the bytes from a file and returns them.
-   * 
+   *
    * @param file The {@link File}
    * @return The bytes of the file.
    * @throws NullPointerException If the {@code file} field is {@code null}.
-   * @throws AssertJDBException If triggered, this exception wrap a possible {@link IOException} during the loading.
+   * @throws AssertJDBException   If triggered, this exception wrap a possible {@link IOException} during the loading.
    */
   public static byte[] bytesContentOf(File file) {
     return Assertions.bytesContentOf(file);
@@ -153,7 +154,7 @@ public static byte[] bytesContentOf(File file) {
 
   /**
    * Reads the bytes from a file in the classpath and returns them.
-   * 
+   *
    * @param resource The name of the file in the classpath.
    * @return The bytes of the file.
    * @throws NullPointerException If the {@code resource} field is {@code null}.
diff --git a/src/main/java/org/assertj/db/api/ChangeAssert.java b/src/main/java/org/assertj/db/api/ChangeAssert.java
index d1c1fd83..83617394 100644
--- a/src/main/java/org/assertj/db/api/ChangeAssert.java
+++ b/src/main/java/org/assertj/db/api/ChangeAssert.java
@@ -8,12 +8,24 @@
  * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations under the License.
  *
- * Copyright 2015-2021 the original author or authors.
+ * Copyright 2015-2024 the original author or authors.
  */
 package org.assertj.db.api;
 
-import org.assertj.db.api.assertions.*;
-import org.assertj.db.api.assertions.impl.*;
+import static org.assertj.db.util.Descriptions.getColumnDescription;
+import static org.assertj.db.util.Descriptions.getRowAtEndPointDescription;
+import static org.assertj.db.util.Descriptions.getRowAtStartPointDescription;
+
+import org.assertj.db.api.assertions.AssertOnChangeType;
+import org.assertj.db.api.assertions.AssertOnDataType;
+import org.assertj.db.api.assertions.AssertOnModifiedColumns;
+import org.assertj.db.api.assertions.AssertOnNumberOfColumns;
+import org.assertj.db.api.assertions.AssertOnPrimaryKey;
+import org.assertj.db.api.assertions.impl.AssertionsOnChangeType;
+import org.assertj.db.api.assertions.impl.AssertionsOnDataType;
+import org.assertj.db.api.assertions.impl.AssertionsOnModifiedColumns;
+import org.assertj.db.api.assertions.impl.AssertionsOnNumberOfColumns;
+import org.assertj.db.api.assertions.impl.AssertionsOnPrimaryKey;
 import org.assertj.db.navigation.PositionWithColumnsChange;
 import org.assertj.db.navigation.PositionWithPoints;
 import org.assertj.db.navigation.element.ChangeElement;
@@ -24,22 +36,20 @@
 import org.assertj.db.type.Row;
 import org.assertj.db.util.Changes;
 
-import static org.assertj.db.util.Descriptions.*;
-
 /**
  * Assertion methods for a {@link Change}.
  *
  * @author Régis Pouiller
  */
 public class ChangeAssert
-        extends AbstractAssertWithOriginWithChanges
-        implements ChangeElement,
-                   OriginWithColumnsAndRowsFromChange,
-                   AssertOnDataType,
-                   AssertOnPrimaryKey,
-                   AssertOnChangeType,
-                   AssertOnModifiedColumns,
-                   AssertOnNumberOfColumns {
+  extends AbstractAssertWithOriginWithChanges
+  implements ChangeElement,
+  OriginWithColumnsAndRowsFromChange,
+  AssertOnDataType,
+  AssertOnPrimaryKey,
+  AssertOnChangeType,
+  AssertOnModifiedColumns,
+  AssertOnNumberOfColumns {
 
   /**
    * The actual change on which the assertion is.
@@ -67,198 +77,261 @@ public ChangeAssert(ChangesAssert origin, Change change) {
     this.change = change;
     rowPosition = new PositionWithPoints(this, ChangeRowAssert.class, Row.class, change.getRowAtStartPoint(), change.getRowAtEndPoint()) {
 
-      @Override protected String getDescriptionAtStartPoint() {
+      @Override
+      protected String getDescriptionAtStartPoint() {
         return getRowAtStartPointDescription(info);
       }
 
-      @Override protected String getDescriptionAtEndPoint() {
+      @Override
+      protected String getDescriptionAtEndPoint() {
         return getRowAtEndPointDescription(info);
       }
     };
-    columnPosition = new PositionWithColumnsChange(this, ChangeColumnAssert.class){
+    columnPosition = new PositionWithColumnsChange(this, ChangeColumnAssert.class) {
 
-      @Override protected String getDescription(int index, String columnName) {
+      @Override
+      protected String getDescription(int index, String columnName) {
         return getColumnDescription(info, index, columnName);
       }
     };
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeRowAssert rowAtStartPoint() {
     return rowPosition.getInstanceAtStartPoint();
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeRowAssert rowAtEndPoint() {
     return rowPosition.getInstanceAtEndPoint();
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeColumnAssert column() {
     return columnPosition.getChangeColumnInstance(change);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeColumnAssert column(int index) {
     return columnPosition.getChangeColumnInstance(change, index);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeColumnAssert column(String columnName) {
     return columnPosition.getChangeColumnInstance(change, columnName, change.getColumnLetterCase());
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeColumnAssert columnAmongTheModifiedOnes() {
     return columnPosition.getModifiedChangeColumnInstance(change);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeColumnAssert columnAmongTheModifiedOnes(int index) {
     return columnPosition.getModifiedChangeColumnInstance(change, index);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeColumnAssert columnAmongTheModifiedOnes(String columnName) {
     return columnPosition.getModifiedChangeColumnInstance(change, columnName, change.getColumnLetterCase());
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeAssert isOnDataType(DataType expected) {
     return AssertionsOnDataType.isOnDataType(myself, info, change, expected);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeAssert isOnTable() {
     return AssertionsOnDataType.isOnTable(myself, info, change);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeAssert isOnRequest() {
     return AssertionsOnDataType.isOnRequest(myself, info, change);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeAssert isOnTable(String name) {
     return AssertionsOnDataType.isOnTable(myself, info, change, change.getTableLetterCase(), name);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeAssert hasPksNames(String... names) {
     return AssertionsOnPrimaryKey.hasPksNames(myself, info, change, change.getPrimaryKeyLetterCase(), names);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeAssert hasPksValues(Object... values) {
     return AssertionsOnPrimaryKey.hasPksValues(myself, info, change, values);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeAssert isOfType(ChangeType expected) {
     return AssertionsOnChangeType.isOfType(myself, info, change, expected);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeAssert isCreation() {
     return AssertionsOnChangeType.isCreation(myself, info, change);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeAssert isModification() {
     return AssertionsOnChangeType.isModification(myself, info, change);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeAssert isDeletion() {
     return AssertionsOnChangeType.isDeletion(myself, info, change);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeAssert hasNumberOfModifiedColumns(int number) {
     return AssertionsOnModifiedColumns.hasNumberOfModifiedColumns(myself, info, change, number);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeAssert hasNumberOfModifiedColumnsGreaterThan(int number) {
     return AssertionsOnModifiedColumns.hasNumberOfModifiedColumnsGreaterThan(myself, info, change, number);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeAssert hasNumberOfModifiedColumnsLessThan(int number) {
     return AssertionsOnModifiedColumns.hasNumberOfModifiedColumnsLessThan(myself, info, change, number);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeAssert hasNumberOfModifiedColumnsGreaterThanOrEqualTo(int number) {
     return AssertionsOnModifiedColumns.hasNumberOfModifiedColumnsGreaterThanOrEqualTo(myself, info, change, number);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeAssert hasNumberOfModifiedColumnsLessThanOrEqualTo(int number) {
     return AssertionsOnModifiedColumns.hasNumberOfModifiedColumnsLessThanOrEqualTo(myself, info, change, number);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeAssert hasModifiedColumns(Integer... indexes) {
     return AssertionsOnModifiedColumns.hasModifiedColumns(myself, info, change, indexes);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeAssert hasModifiedColumns(String... names) {
     return AssertionsOnModifiedColumns.hasModifiedColumns(myself, info, change, change.getColumnLetterCase(), names);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeAssert hasNumberOfColumns(int expected) {
     return AssertionsOnNumberOfColumns.hasNumberOfColumns(myself, info, change.getColumnsNameList().size(), expected);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeAssert hasNumberOfColumnsGreaterThan(int expected) {
     return AssertionsOnNumberOfColumns.hasNumberOfColumnsGreaterThan(myself, info, change.getColumnsNameList().size(), expected);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeAssert hasNumberOfColumnsLessThan(int expected) {
     return AssertionsOnNumberOfColumns.hasNumberOfColumnsLessThan(myself, info, change.getColumnsNameList().size(), expected);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeAssert hasNumberOfColumnsGreaterThanOrEqualTo(int expected) {
     return AssertionsOnNumberOfColumns.hasNumberOfColumnsGreaterThanOrEqualTo(myself, info, change.getColumnsNameList().size(),
-                                                                              expected);
+      expected);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeAssert hasNumberOfColumnsLessThanOrEqualTo(int expected) {
     return AssertionsOnNumberOfColumns.hasNumberOfColumnsLessThanOrEqualTo(myself, info, change.getColumnsNameList().size(), expected);
diff --git a/src/main/java/org/assertj/db/api/ChangeColumnAssert.java b/src/main/java/org/assertj/db/api/ChangeColumnAssert.java
index 4e472232..389fea54 100644
--- a/src/main/java/org/assertj/db/api/ChangeColumnAssert.java
+++ b/src/main/java/org/assertj/db/api/ChangeColumnAssert.java
@@ -8,21 +8,33 @@
  * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations under the License.
  *
- * Copyright 2015-2021 the original author or authors.
+ * Copyright 2015-2024 the original author or authors.
  */
 package org.assertj.db.api;
 
-import org.assertj.db.api.assertions.*;
-import org.assertj.db.api.assertions.impl.*;
-import org.assertj.db.navigation.PositionWithPoints;
-import org.assertj.db.navigation.element.ColumnElement;
-import org.assertj.db.navigation.origin.OriginWithValuesFromColumn;
-import org.assertj.db.type.*;
+import static org.assertj.db.util.Descriptions.getColumnValueAtEndPointDescription;
+import static org.assertj.db.util.Descriptions.getColumnValueAtStartPointDescription;
 
 import java.util.UUID;
 
-import static org.assertj.db.util.Descriptions.getColumnValueAtEndPointDescription;
-import static org.assertj.db.util.Descriptions.getColumnValueAtStartPointDescription;
+import org.assertj.db.api.assertions.AssertOnColumnClass;
+import org.assertj.db.api.assertions.AssertOnColumnName;
+import org.assertj.db.api.assertions.AssertOnColumnOfChangeEquality;
+import org.assertj.db.api.assertions.AssertOnColumnType;
+import org.assertj.db.api.assertions.AssertOnModifiedColumn;
+import org.assertj.db.api.assertions.impl.AssertionsOnColumnName;
+import org.assertj.db.api.assertions.impl.AssertionsOnColumnOfChangeClass;
+import org.assertj.db.api.assertions.impl.AssertionsOnColumnOfChangeEquality;
+import org.assertj.db.api.assertions.impl.AssertionsOnColumnOfChangeType;
+import org.assertj.db.api.assertions.impl.AssertionsOnModifiedColumn;
+import org.assertj.db.navigation.PositionWithPoints;
+import org.assertj.db.navigation.element.ColumnElement;
+import org.assertj.db.navigation.origin.OriginWithValuesFromColumn;
+import org.assertj.db.type.DateTimeValue;
+import org.assertj.db.type.DateValue;
+import org.assertj.db.type.TimeValue;
+import org.assertj.db.type.Value;
+import org.assertj.db.type.ValueType;
 
 /**
  * Assertion methods for a {@code Column} of a {@code Change}.
@@ -31,14 +43,14 @@
  * @author Otoniel Isidoro
  */
 public class ChangeColumnAssert
-        extends AbstractAssertWithOriginWithColumnsAndRowsFromChange
-        implements ColumnElement,
-                   OriginWithValuesFromColumn,
-                   AssertOnColumnClass,
-                   AssertOnColumnOfChangeEquality,
-                   AssertOnModifiedColumn,
-                   AssertOnColumnName,
-                   AssertOnColumnType {
+  extends AbstractAssertWithOriginWithColumnsAndRowsFromChange
+  implements ColumnElement,
+  OriginWithValuesFromColumn,
+  AssertOnColumnClass,
+  AssertOnColumnOfChangeEquality,
+  AssertOnModifiedColumn,
+  AssertOnColumnName,
+  AssertOnColumnType {
 
   /**
    * The name of the column.
@@ -62,10 +74,10 @@ public class ChangeColumnAssert
   /**
    * Constructor.
    *
-   * @param columnName The column name.
-   * @param origin The assertion of {@link org.assertj.db.navigation.origin.Origin}.
+   * @param columnName        The column name.
+   * @param origin            The assertion of {@link org.assertj.db.navigation.origin.Origin}.
    * @param valueAtStartPoint The value at start point.
-   * @param valueAtEndPoint The value at end point.
+   * @param valueAtEndPoint   The value at end point.
    */
   public ChangeColumnAssert(ChangeAssert origin, String columnName, Value valueAtStartPoint, Value valueAtEndPoint) {
     super(ChangeColumnAssert.class, origin);
@@ -74,253 +86,331 @@ public ChangeColumnAssert(ChangeAssert origin, String columnName, Value valueAtS
     this.valueAtEndPoint = valueAtEndPoint;
     valuePosition = new PositionWithPoints(this, ChangeColumnValueAssert.class, Value.class, valueAtStartPoint, valueAtEndPoint) {
 
-      @Override protected String getDescriptionAtStartPoint() {
+      @Override
+      protected String getDescriptionAtStartPoint() {
         return getColumnValueAtStartPointDescription(info);
       }
 
-      @Override protected String getDescriptionAtEndPoint() {
+      @Override
+      protected String getDescriptionAtEndPoint() {
         return getColumnValueAtEndPointDescription(info);
       }
     };
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeColumnValueAssert valueAtStartPoint() {
     return valuePosition.getInstanceAtStartPoint();
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeColumnValueAssert valueAtEndPoint() {
     return valuePosition.getInstanceAtEndPoint();
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeColumnAssert isModified() {
     return AssertionsOnModifiedColumn.isModified(myself, info, valueAtStartPoint, valueAtEndPoint);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeColumnAssert isNotModified() {
     return AssertionsOnModifiedColumn.isNotModified(myself, info, valueAtStartPoint, valueAtEndPoint);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeColumnAssert hasValues(Object expected) {
     return AssertionsOnColumnOfChangeEquality
-            .hasValues(myself, info, valueAtStartPoint, valueAtEndPoint, expected);
+      .hasValues(myself, info, valueAtStartPoint, valueAtEndPoint, expected);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeColumnAssert hasValues(Object expectedAtStartPoint, Object expectedAtEndPoint) {
     return AssertionsOnColumnOfChangeEquality
-            .hasValues(myself, info, valueAtStartPoint, valueAtEndPoint, expectedAtStartPoint,
-                       expectedAtEndPoint);
+      .hasValues(myself, info, valueAtStartPoint, valueAtEndPoint, expectedAtStartPoint,
+        expectedAtEndPoint);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeColumnAssert hasValues(Boolean expected) {
     return AssertionsOnColumnOfChangeEquality
-            .hasValues(myself, info, valueAtStartPoint, valueAtEndPoint, expected);
+      .hasValues(myself, info, valueAtStartPoint, valueAtEndPoint, expected);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeColumnAssert hasValues(Boolean expectedAtStartPoint, Boolean expectedAtEndPoint) {
     return AssertionsOnColumnOfChangeEquality
-            .hasValues(myself, info, valueAtStartPoint, valueAtEndPoint, expectedAtStartPoint,
-                    expectedAtEndPoint);
+      .hasValues(myself, info, valueAtStartPoint, valueAtEndPoint, expectedAtStartPoint,
+        expectedAtEndPoint);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeColumnAssert hasValues(Number expected) {
     return AssertionsOnColumnOfChangeEquality
-            .hasValues(myself, info, valueAtStartPoint, valueAtEndPoint, expected);
+      .hasValues(myself, info, valueAtStartPoint, valueAtEndPoint, expected);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeColumnAssert hasValues(Number expectedAtStartPoint, Number expectedAtEndPoint) {
     return AssertionsOnColumnOfChangeEquality
-            .hasValues(myself, info, valueAtStartPoint, valueAtEndPoint, expectedAtStartPoint,
-                       expectedAtEndPoint);
+      .hasValues(myself, info, valueAtStartPoint, valueAtEndPoint, expectedAtStartPoint,
+        expectedAtEndPoint);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeColumnAssert hasValues(byte[] expected) {
     return AssertionsOnColumnOfChangeEquality
-            .hasValues(myself, info, valueAtStartPoint, valueAtEndPoint, expected);
+      .hasValues(myself, info, valueAtStartPoint, valueAtEndPoint, expected);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeColumnAssert hasValues(byte[] expectedAtStartPoint, byte[] expectedAtEndPoint) {
     return AssertionsOnColumnOfChangeEquality
-            .hasValues(myself, info, valueAtStartPoint, valueAtEndPoint, expectedAtStartPoint,
-                       expectedAtEndPoint);
+      .hasValues(myself, info, valueAtStartPoint, valueAtEndPoint, expectedAtStartPoint,
+        expectedAtEndPoint);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeColumnAssert hasValues(String expected) {
     return AssertionsOnColumnOfChangeEquality
-            .hasValues(myself, info, valueAtStartPoint, valueAtEndPoint, expected);
+      .hasValues(myself, info, valueAtStartPoint, valueAtEndPoint, expected);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeColumnAssert hasValues(String expectedAtStartPoint, String expectedAtEndPoint) {
     return AssertionsOnColumnOfChangeEquality
-            .hasValues(myself, info, valueAtStartPoint, valueAtEndPoint, expectedAtStartPoint,
-                       expectedAtEndPoint);
+      .hasValues(myself, info, valueAtStartPoint, valueAtEndPoint, expectedAtStartPoint,
+        expectedAtEndPoint);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeColumnAssert hasValues(Character expected) {
     return AssertionsOnColumnOfChangeEquality
-            .hasValues(myself, info, valueAtStartPoint, valueAtEndPoint, expected);
+      .hasValues(myself, info, valueAtStartPoint, valueAtEndPoint, expected);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeColumnAssert hasValues(Character expectedAtStartPoint, Character expectedAtEndPoint) {
     return AssertionsOnColumnOfChangeEquality
-            .hasValues(myself, info, valueAtStartPoint, valueAtEndPoint, expectedAtStartPoint,
-                       expectedAtEndPoint);
+      .hasValues(myself, info, valueAtStartPoint, valueAtEndPoint, expectedAtStartPoint,
+        expectedAtEndPoint);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeColumnAssert hasValues(UUID expected) {
     return AssertionsOnColumnOfChangeEquality
-            .hasValues(myself, info, valueAtStartPoint, valueAtEndPoint, expected);
+      .hasValues(myself, info, valueAtStartPoint, valueAtEndPoint, expected);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeColumnAssert hasValues(UUID expectedAtStartPoint, UUID expectedAtEndPoint) {
     return AssertionsOnColumnOfChangeEquality
-            .hasValues(myself, info, valueAtStartPoint, valueAtEndPoint, expectedAtStartPoint,
-                    expectedAtEndPoint);
+      .hasValues(myself, info, valueAtStartPoint, valueAtEndPoint, expectedAtStartPoint,
+        expectedAtEndPoint);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeColumnAssert hasValues(DateValue expected) {
     return AssertionsOnColumnOfChangeEquality
-            .hasValues(myself, info, valueAtStartPoint, valueAtEndPoint, expected);
+      .hasValues(myself, info, valueAtStartPoint, valueAtEndPoint, expected);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeColumnAssert hasValues(DateValue expectedAtStartPoint, DateValue expectedAtEndPoint) {
     return AssertionsOnColumnOfChangeEquality
-            .hasValues(myself, info, valueAtStartPoint, valueAtEndPoint, expectedAtStartPoint,
-                       expectedAtEndPoint);
+      .hasValues(myself, info, valueAtStartPoint, valueAtEndPoint, expectedAtStartPoint,
+        expectedAtEndPoint);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeColumnAssert hasValues(TimeValue expected) {
     return AssertionsOnColumnOfChangeEquality
-            .hasValues(myself, info, valueAtStartPoint, valueAtEndPoint, expected);
+      .hasValues(myself, info, valueAtStartPoint, valueAtEndPoint, expected);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeColumnAssert hasValues(TimeValue expectedAtStartPoint, TimeValue expectedAtEndPoint) {
     return AssertionsOnColumnOfChangeEquality
-            .hasValues(myself, info, valueAtStartPoint, valueAtEndPoint, expectedAtStartPoint,
-                       expectedAtEndPoint);
+      .hasValues(myself, info, valueAtStartPoint, valueAtEndPoint, expectedAtStartPoint,
+        expectedAtEndPoint);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeColumnAssert hasValues(DateTimeValue expected) {
     return AssertionsOnColumnOfChangeEquality
-            .hasValues(myself, info, valueAtStartPoint, valueAtEndPoint, expected);
+      .hasValues(myself, info, valueAtStartPoint, valueAtEndPoint, expected);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeColumnAssert hasValues(DateTimeValue expectedAtStartPoint, DateTimeValue expectedAtEndPoint) {
     return AssertionsOnColumnOfChangeEquality
-            .hasValues(myself, info, valueAtStartPoint, valueAtEndPoint, expectedAtStartPoint,
-                       expectedAtEndPoint);
+      .hasValues(myself, info, valueAtStartPoint, valueAtEndPoint, expectedAtStartPoint,
+        expectedAtEndPoint);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeColumnAssert hasColumnName(String columnName) {
     return AssertionsOnColumnName.hasColumnName(myself, info, this.columnName, columnName, valueAtStartPoint.getColumnLetterCase());
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeColumnAssert isOfClass(Class expected, boolean lenient) {
     return AssertionsOnColumnOfChangeClass.isOfClass(myself, info, valueAtStartPoint, valueAtEndPoint, expected, lenient);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeColumnAssert isOfType(ValueType expected, boolean lenient) {
     return AssertionsOnColumnOfChangeType.isOfType(myself, info, valueAtStartPoint, valueAtEndPoint, expected, lenient);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeColumnAssert isOfAnyTypeIn(ValueType... expected) {
     return AssertionsOnColumnOfChangeType.isOfAnyTypeIn(myself, info, valueAtStartPoint, valueAtEndPoint, expected);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeColumnAssert isNumber(boolean lenient) {
     return AssertionsOnColumnOfChangeType.isNumber(myself, info, valueAtStartPoint, valueAtEndPoint, lenient);
   }
-  /** {@inheritDoc} */
+
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeColumnAssert isBoolean(boolean lenient) {
     return AssertionsOnColumnOfChangeType.isBoolean(myself, info, valueAtStartPoint, valueAtEndPoint, lenient);
   }
-  /** {@inheritDoc} */
+
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeColumnAssert isDate(boolean lenient) {
     return AssertionsOnColumnOfChangeType.isDate(myself, info, valueAtStartPoint, valueAtEndPoint, lenient);
   }
-  /** {@inheritDoc} */
+
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeColumnAssert isTime(boolean lenient) {
     return AssertionsOnColumnOfChangeType.isTime(myself, info, valueAtStartPoint, valueAtEndPoint, lenient);
   }
-  /** {@inheritDoc} */
+
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeColumnAssert isDateTime(boolean lenient) {
     return AssertionsOnColumnOfChangeType.isDateTime(myself, info, valueAtStartPoint, valueAtEndPoint, lenient);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeColumnAssert isBytes(boolean lenient) {
     return AssertionsOnColumnOfChangeType.isBytes(myself, info, valueAtStartPoint, valueAtEndPoint, lenient);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeColumnAssert isText(boolean lenient) {
     return AssertionsOnColumnOfChangeType.isText(myself, info, valueAtStartPoint, valueAtEndPoint, lenient);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeColumnAssert isUUID(boolean lenient) {
     return AssertionsOnColumnOfChangeType.isUUID(myself, info, valueAtStartPoint, valueAtEndPoint, lenient);
diff --git a/src/main/java/org/assertj/db/api/ChangeColumnValueAssert.java b/src/main/java/org/assertj/db/api/ChangeColumnValueAssert.java
index 555afd7c..5206ab59 100644
--- a/src/main/java/org/assertj/db/api/ChangeColumnValueAssert.java
+++ b/src/main/java/org/assertj/db/api/ChangeColumnValueAssert.java
@@ -8,7 +8,7 @@
  * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations under the License.
  *
- * Copyright 2015-2021 the original author or authors.
+ * Copyright 2015-2024 the original author or authors.
  */
 package org.assertj.db.api;
 
@@ -19,29 +19,32 @@
  * Assertion methods for a value of a {@code Column} of a {@code Change}.
  *
  * @author Régis Pouiller
- *
  */
 public class ChangeColumnValueAssert
-        extends AbstractAssertWithValues
-        implements ToValueFromColumn {
+  extends AbstractAssertWithValues
+  implements ToValueFromColumn {
 
   /**
    * Constructor.
    *
    * @param origin The assertion of {@link org.assertj.db.navigation.origin.Origin}.
-   * @param value The value on which are the assertions.
+   * @param value  The value on which are the assertions.
    */
   public ChangeColumnValueAssert(ChangeColumnAssert origin, Value value) {
     super(ChangeColumnValueAssert.class, origin, value);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeColumnValueAssert valueAtStartPoint() {
     return origin.valueAtStartPoint();
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeColumnValueAssert valueAtEndPoint() {
     return origin.valueAtEndPoint();
diff --git a/src/main/java/org/assertj/db/api/ChangeRowAssert.java b/src/main/java/org/assertj/db/api/ChangeRowAssert.java
index 63c595b7..1aed543b 100644
--- a/src/main/java/org/assertj/db/api/ChangeRowAssert.java
+++ b/src/main/java/org/assertj/db/api/ChangeRowAssert.java
@@ -8,10 +8,14 @@
  * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations under the License.
  *
- * Copyright 2015-2021 the original author or authors.
+ * Copyright 2015-2024 the original author or authors.
  */
 package org.assertj.db.api;
 
+import static org.assertj.db.util.Descriptions.getRowValueDescription;
+
+import java.util.List;
+
 import org.assertj.db.api.assertions.AssertOnNumberOfColumns;
 import org.assertj.db.api.assertions.AssertOnRowCondition;
 import org.assertj.db.api.assertions.AssertOnRowEquality;
@@ -27,10 +31,6 @@
 import org.assertj.db.type.Row;
 import org.assertj.db.type.Value;
 
-import java.util.List;
-
-import static org.assertj.db.util.Descriptions.getRowValueDescription;
-
 /**
  * Assertion methods for a {@code Row} of a {@code Change}.
  *
@@ -38,13 +38,13 @@
  * @author Julien Roy
  */
 public class ChangeRowAssert
-        extends AbstractAssertWithOriginWithColumnsAndRowsFromChange
-        implements RowElement,
-                   OriginWithValuesFromRow,
-                   AssertOnRowEquality,
-                   AssertOnNumberOfColumns,
-                   AssertOnRowOfChangeExistence,
-                   AssertOnRowCondition {
+  extends AbstractAssertWithOriginWithColumnsAndRowsFromChange
+  implements RowElement,
+  OriginWithValuesFromRow,
+  AssertOnRowEquality,
+  AssertOnNumberOfColumns,
+  AssertOnRowOfChangeExistence,
+  AssertOnRowCondition {
 
   /**
    * Position of navigation to value.
@@ -60,13 +60,14 @@ public class ChangeRowAssert
    * Constructor.
    *
    * @param origin The assertion of {@link org.assertj.db.navigation.origin.Origin}.
-   * @param row The {@link Row} on which are the assertions.
+   * @param row    The {@link Row} on which are the assertions.
    */
   public ChangeRowAssert(ChangeAssert origin, Row row) {
     super(ChangeRowAssert.class, origin);
     this.row = row;
     valuePosition = new PositionWithColumns(this, ChangeRowValueAssert.class) {
-      @Override protected String getDescription(int index) {
+      @Override
+      protected String getDescription(int index) {
         List columnsNameList = ChangeRowAssert.this.row.getColumnsNameList();
         String columnName = columnsNameList.get(index);
         return getRowValueDescription(info, index, columnName);
@@ -74,7 +75,9 @@ public ChangeRowAssert(ChangeAssert origin, Row row) {
     };
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeRowValueAssert value() {
     if (row == null) {
@@ -83,7 +86,9 @@ public ChangeRowValueAssert value() {
     return valuePosition.getInstance(row.getValuesList());
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeRowValueAssert value(int index) {
     if (row == null) {
@@ -92,17 +97,21 @@ public ChangeRowValueAssert value(int index) {
     return valuePosition.getInstance(row.getValuesList(), index);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeRowValueAssert value(String columnName) {
     if (row == null) {
       throw new AssertJDBException("Row do not exist");
     }
     return valuePosition.getInstance(row.getValuesList(), row.getColumnsNameList(),
-                                     columnName, row.getColumnLetterCase());
+      columnName, row.getColumnLetterCase());
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeRowAssert hasNumberOfColumns(int expected) {
     exists();
@@ -111,7 +120,9 @@ public ChangeRowAssert hasNumberOfColumns(int expected) {
     return AssertionsOnNumberOfColumns.hasNumberOfColumns(myself, info, size, expected);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeRowAssert hasNumberOfColumnsGreaterThan(int expected) {
     exists();
@@ -120,7 +131,9 @@ public ChangeRowAssert hasNumberOfColumnsGreaterThan(int expected) {
     return AssertionsOnNumberOfColumns.hasNumberOfColumnsGreaterThan(myself, info, size, expected);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeRowAssert hasNumberOfColumnsLessThan(int expected) {
     exists();
@@ -129,17 +142,21 @@ public ChangeRowAssert hasNumberOfColumnsLessThan(int expected) {
     return AssertionsOnNumberOfColumns.hasNumberOfColumnsLessThan(myself, info, size, expected);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeRowAssert hasNumberOfColumnsGreaterThanOrEqualTo(int expected) {
     exists();
     List columnsNameList = row.getColumnsNameList();
     int size = columnsNameList.size();
     return AssertionsOnNumberOfColumns.hasNumberOfColumnsGreaterThanOrEqualTo(myself, info, size,
-                                                                              expected);
+      expected);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeRowAssert hasNumberOfColumnsLessThanOrEqualTo(int expected) {
     exists();
@@ -148,26 +165,34 @@ public ChangeRowAssert hasNumberOfColumnsLessThanOrEqualTo(int expected) {
     return AssertionsOnNumberOfColumns.hasNumberOfColumnsLessThanOrEqualTo(myself, info, size, expected);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeRowAssert hasValues(Object... expected) {
     exists();
     return AssertionsOnRowEquality.hasValues(myself, info, row.getValuesList(), expected);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeRowAssert exists() {
     return AssertionsOnRowOfChangeExistence.exists(myself, info, row);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeRowAssert doesNotExist() {
     return AssertionsOnRowOfChangeExistence.doesNotExist(myself, info, row);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeRowAssert hasValuesSatisfying(Object... expected) {
     exists();
diff --git a/src/main/java/org/assertj/db/api/ChangeRowValueAssert.java b/src/main/java/org/assertj/db/api/ChangeRowValueAssert.java
index 669f193b..24547616 100644
--- a/src/main/java/org/assertj/db/api/ChangeRowValueAssert.java
+++ b/src/main/java/org/assertj/db/api/ChangeRowValueAssert.java
@@ -8,7 +8,7 @@
  * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations under the License.
  *
- * Copyright 2015-2021 the original author or authors.
+ * Copyright 2015-2024 the original author or authors.
  */
 package org.assertj.db.api;
 
@@ -22,43 +22,50 @@
  * Assertion methods for a value of a {@code Row} of a {@code Change}.
  *
  * @author Régis Pouiller
- *
  */
 public class ChangeRowValueAssert
-        extends AbstractAssertWithValues
-        implements ToValue,
-                   ToValueFromRow,
-                   AssertOnColumnName {
+  extends AbstractAssertWithValues
+  implements ToValue,
+  ToValueFromRow,
+  AssertOnColumnName {
 
   /**
    * Constructor.
    *
    * @param origin The assertion of {@link org.assertj.db.navigation.origin.Origin}.
-   * @param value The value on which are the assertions.
+   * @param value  The value on which are the assertions.
    */
   public ChangeRowValueAssert(ChangeRowAssert origin, Value value) {
     super(ChangeRowValueAssert.class, origin, value);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeRowValueAssert value() {
     return origin.value();
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeRowValueAssert value(int index) {
     return origin.value(index);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeRowValueAssert value(String columnName) {
     return origin.value(columnName);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeRowValueAssert hasColumnName(String columnName) {
     return AssertionsOnColumnName.hasColumnName(myself, info, value.getColumnName(), columnName, value.getColumnLetterCase());
diff --git a/src/main/java/org/assertj/db/api/ChangesAssert.java b/src/main/java/org/assertj/db/api/ChangesAssert.java
index 8ce42f33..2dc7843c 100644
--- a/src/main/java/org/assertj/db/api/ChangesAssert.java
+++ b/src/main/java/org/assertj/db/api/ChangesAssert.java
@@ -8,7 +8,7 @@
  * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations under the License.
  *
- * Copyright 2015-2021 the original author or authors.
+ * Copyright 2015-2024 the original author or authors.
  */
 package org.assertj.db.api;
 
@@ -28,10 +28,10 @@
  * @author Régis Pouiller
  */
 public class ChangesAssert
-        extends AbstractAssertWithOrigin
-        implements ChangesElement,
-                   OriginWithChanges,
-                   AssertOnNumberOfChanges {
+  extends AbstractAssertWithOrigin
+  implements ChangesElement,
+  OriginWithChanges,
+  AssertOnNumberOfChanges {
 
   /**
    * The actual changes on which the assertion is.
@@ -55,14 +55,14 @@ public ChangesAssert(Changes changes) {
   /**
    * Constructor.
    *
-   * @param origin The assertion of {@link org.assertj.db.navigation.origin.Origin}.
+   * @param origin  The assertion of {@link org.assertj.db.navigation.origin.Origin}.
    * @param changes The {@link Changes} on which are the assertions.
    */
   public ChangesAssert(ChangesAssert origin, Changes changes) {
     super(ChangesAssert.class, origin);
     this.changes = changes;
-    changesPosition = new PositionWithChanges(this, 
-                                                ChangesAssert.class, ChangeAssert.class) {
+    changesPosition = new PositionWithChanges(this,
+      ChangesAssert.class, ChangeAssert.class) {
 
       @Override
       protected String getChangesDescription(ChangeType changeType, String tableName) {
@@ -78,7 +78,9 @@ protected String getChangeDescription(Changes changes, Change change, int index,
     };
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangesAssert ofAll() {
     if (origin != null) {
@@ -87,7 +89,9 @@ public ChangesAssert ofAll() {
     return this;
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangesAssert ofCreation() {
     if (origin != null) {
@@ -96,7 +100,9 @@ public ChangesAssert ofCreation() {
     return changesPosition.getChangesInstance(changes, ChangeType.CREATION, null);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangesAssert ofModification() {
     if (origin != null) {
@@ -105,7 +111,9 @@ public ChangesAssert ofModification() {
     return changesPosition.getChangesInstance(changes, ChangeType.MODIFICATION, null);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangesAssert ofDeletion() {
     if (origin != null) {
@@ -114,7 +122,9 @@ public ChangesAssert ofDeletion() {
     return changesPosition.getChangesInstance(changes, ChangeType.DELETION, null);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangesAssert ofCreationOnTable(String tableName) {
     if (origin != null) {
@@ -123,7 +133,9 @@ public ChangesAssert ofCreationOnTable(String tableName) {
     return changesPosition.getChangesInstance(changes, ChangeType.CREATION, tableName);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangesAssert ofModificationOnTable(String tableName) {
     if (origin != null) {
@@ -132,7 +144,9 @@ public ChangesAssert ofModificationOnTable(String tableName) {
     return changesPosition.getChangesInstance(changes, ChangeType.MODIFICATION, tableName);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangesAssert ofDeletionOnTable(String tableName) {
     if (origin != null) {
@@ -141,7 +155,9 @@ public ChangesAssert ofDeletionOnTable(String tableName) {
     return changesPosition.getChangesInstance(changes, ChangeType.DELETION, tableName);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangesAssert onTable(String tableName) {
     if (origin != null) {
@@ -150,19 +166,25 @@ public ChangesAssert onTable(String tableName) {
     return changesPosition.getChangesInstance(changes, null, tableName);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeAssert change() {
     return changesPosition.getChangeInstance(changes, null, null);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeAssert change(int index) {
     return changesPosition.getChangeInstance(changes, null, null, index);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeAssert changeOfCreation() {
     if (origin != null) {
@@ -171,7 +193,9 @@ public ChangeAssert changeOfCreation() {
     return changesPosition.getChangeInstance(changes, ChangeType.CREATION, null);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeAssert changeOfCreation(int index) {
     if (origin != null) {
@@ -180,7 +204,9 @@ public ChangeAssert changeOfCreation(int index) {
     return changesPosition.getChangeInstance(changes, ChangeType.CREATION, null, index);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeAssert changeOfModification() {
     if (origin != null) {
@@ -189,7 +215,9 @@ public ChangeAssert changeOfModification() {
     return changesPosition.getChangeInstance(changes, ChangeType.MODIFICATION, null);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeAssert changeOfModification(int index) {
     if (origin != null) {
@@ -198,7 +226,9 @@ public ChangeAssert changeOfModification(int index) {
     return changesPosition.getChangeInstance(changes, ChangeType.MODIFICATION, null, index);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeAssert changeOfDeletion() {
     if (origin != null) {
@@ -207,7 +237,9 @@ public ChangeAssert changeOfDeletion() {
     return changesPosition.getChangeInstance(changes, ChangeType.DELETION, null);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeAssert changeOfDeletion(int index) {
     if (origin != null) {
@@ -216,7 +248,9 @@ public ChangeAssert changeOfDeletion(int index) {
     return changesPosition.getChangeInstance(changes, ChangeType.DELETION, null, index);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeAssert changeOnTable(String tableName) {
     if (origin != null) {
@@ -225,7 +259,9 @@ public ChangeAssert changeOnTable(String tableName) {
     return changesPosition.getChangeInstance(changes, null, tableName);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeAssert changeOnTable(String tableName, int index) {
     if (origin != null) {
@@ -234,7 +270,9 @@ public ChangeAssert changeOnTable(String tableName, int index) {
     return changesPosition.getChangeInstance(changes, null, tableName, index);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeAssert changeOnTableWithPks(String tableName, Object... pksValues) {
     if (origin != null) {
@@ -243,7 +281,9 @@ public ChangeAssert changeOnTableWithPks(String tableName, Object... pksValues)
     return changesPosition.getChangeInstanceWithPK(changes, tableName, pksValues);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeAssert changeOfCreationOnTable(String tableName) {
     if (origin != null) {
@@ -252,7 +292,9 @@ public ChangeAssert changeOfCreationOnTable(String tableName) {
     return changesPosition.getChangeInstance(changes, ChangeType.CREATION, tableName);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeAssert changeOfCreationOnTable(String tableName, int index) {
     if (origin != null) {
@@ -261,7 +303,9 @@ public ChangeAssert changeOfCreationOnTable(String tableName, int index) {
     return changesPosition.getChangeInstance(changes, ChangeType.CREATION, tableName, index);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeAssert changeOfModificationOnTable(String tableName) {
     if (origin != null) {
@@ -270,7 +314,9 @@ public ChangeAssert changeOfModificationOnTable(String tableName) {
     return changesPosition.getChangeInstance(changes, ChangeType.MODIFICATION, tableName);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeAssert changeOfModificationOnTable(String tableName, int index) {
     if (origin != null) {
@@ -279,7 +325,9 @@ public ChangeAssert changeOfModificationOnTable(String tableName, int index) {
     return changesPosition.getChangeInstance(changes, ChangeType.MODIFICATION, tableName, index);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeAssert changeOfDeletionOnTable(String tableName) {
     if (origin != null) {
@@ -288,7 +336,9 @@ public ChangeAssert changeOfDeletionOnTable(String tableName) {
     return changesPosition.getChangeInstance(changes, ChangeType.DELETION, tableName);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangeAssert changeOfDeletionOnTable(String tableName, int index) {
     if (origin != null) {
@@ -297,31 +347,41 @@ public ChangeAssert changeOfDeletionOnTable(String tableName, int index) {
     return changesPosition.getChangeInstance(changes, ChangeType.DELETION, tableName, index);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangesAssert hasNumberOfChanges(int expected) {
     return AssertionsOnNumberOfChanges.hasNumberOfChanges(myself, info, changes, expected);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangesAssert hasNumberOfChangesGreaterThan(int expected) {
     return AssertionsOnNumberOfChanges.hasNumberOfChangesGreaterThan(myself, info, changes, expected);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangesAssert hasNumberOfChangesLessThan(int expected) {
     return AssertionsOnNumberOfChanges.hasNumberOfChangesLessThan(myself, info, changes, expected);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangesAssert hasNumberOfChangesGreaterThanOrEqualTo(int expected) {
     return AssertionsOnNumberOfChanges.hasNumberOfChangesGreaterThanOrEqualTo(myself, info, changes, expected);
   }
 
-  /** {@inheritDoc} */
+  /**
+   * {@inheritDoc}
+   */
   @Override
   public ChangesAssert hasNumberOfChangesLessThanOrEqualTo(int expected) {
     return AssertionsOnNumberOfChanges.hasNumberOfChangesLessThanOrEqualTo(myself, info, changes, expected);
diff --git a/src/main/java/org/assertj/db/api/ErrorCollector.java b/src/main/java/org/assertj/db/api/ErrorCollector.java
index dc192321..7bc4f7f4 100644
--- a/src/main/java/org/assertj/db/api/ErrorCollector.java
+++ b/src/main/java/org/assertj/db/api/ErrorCollector.java
@@ -8,36 +8,70 @@
  * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations under the License.
  *
- * Copyright 2015-2021 the original author or authors.
+ * Copyright 2015-2024 the original author or authors.
  */
 package org.assertj.db.api;
 
-import net.bytebuddy.implementation.bind.annotation.*;
-
 import java.lang.reflect.Method;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
 import java.util.concurrent.Callable;
 
-/** Collects error messages of all AssertionErrors thrown by the proxied method. */
+import net.bytebuddy.implementation.bind.annotation.RuntimeType;
+import net.bytebuddy.implementation.bind.annotation.StubValue;
+import net.bytebuddy.implementation.bind.annotation.SuperCall;
+import net.bytebuddy.implementation.bind.annotation.SuperMethod;
+import net.bytebuddy.implementation.bind.annotation.This;
+
+/**
+ * Collects error messages of all AssertionErrors thrown by the proxied method.
+ *
+ * @author Julien Roy
+ */
 public class ErrorCollector {
 
   private static final String INTERCEPT_METHOD_NAME = "intercept";
 
   private static final String CLASS_NAME = ErrorCollector.class.getName();
 
+  /**
+   * Construct empty error collector.
+   */
+  public ErrorCollector() {
+  }
+
   // scope : the current soft-assertion object
   private final List errors = new ArrayList<>();
   // scope : the last assertion call (might be nested)
   private final LastResult lastResult = new LastResult();
 
+  private static int countErrorCollectorProxyCalls() {
+    int nbCalls = 0;
+    for (StackTraceElement stackTraceElement : Thread.currentThread().getStackTrace()) {
+      if (CLASS_NAME.equals(stackTraceElement.getClassName())
+        && INTERCEPT_METHOD_NAME.equals(stackTraceElement.getMethodName()))
+        nbCalls++;
+    }
+    return nbCalls;
+  }
+
+  /**
+   * Apply interception of assertion method to collect exception and avoid stop the assertion flow on the first error.
+   *
+   * @param assertion The assertion object proxied
+   * @param proxy     The proxy of assertion
+   * @param method    The method of assertion called
+   * @param stub      The sub value if not assert method is found
+   * @return The current assertion object.
+   * @throws Exception When interception fail
+   */
   @RuntimeType
   public Object intercept(
-      @This Object assertion,
-      @SuperCall Callable proxy,
-      @SuperMethod(nullIfImpossible = true) Method method,
-      @StubValue Object stub) throws Exception {
+    @This Object assertion,
+    @SuperCall Callable proxy,
+    @SuperMethod(nullIfImpossible = true) Method method,
+    @StubValue Object stub) throws Exception {
     try {
       Object result = proxy.call();
       this.lastResult.setSuccess(true);
@@ -57,15 +91,30 @@ public Object intercept(
     return assertion;
   }
 
+  /**
+   * Append new error to collection of errors.
+   *
+   * @param error Any throwable
+   */
   public void addError(Throwable error) {
     errors.add(error);
     lastResult.recordError();
   }
 
+  /**
+   * Return all errors collected.
+   *
+   * @return List of exception
+   */
   public List errors() {
     return Collections.unmodifiableList(errors);
   }
 
+  /**
+   * Return if no error collected in this instance.
+   *
+   * @return true if no errors.
+   */
   public boolean wasSuccess() {
     return lastResult.wasSuccess();
   }
@@ -74,16 +123,6 @@ private boolean isNestedErrorCollectorProxyCall() {
     return countErrorCollectorProxyCalls() > 1;
   }
 
-  private static int countErrorCollectorProxyCalls() {
-    int nbCalls = 0;
-    for (StackTraceElement stackTraceElement : Thread.currentThread().getStackTrace()) {
-      if (CLASS_NAME.equals(stackTraceElement.getClassName())
-          && INTERCEPT_METHOD_NAME.equals(stackTraceElement.getMethodName()))
-        nbCalls++;
-    }
-    return nbCalls;
-  }
-
   private static class LastResult {
     private boolean wasSuccess = true;
     private boolean errorFound = false;
diff --git a/src/main/java/org/assertj/db/api/ProxifyPositionResult.java b/src/main/java/org/assertj/db/api/ProxifyPositionResult.java
index 8a52c57f..85244aac 100644
--- a/src/main/java/org/assertj/db/api/ProxifyPositionResult.java
+++ b/src/main/java/org/assertj/db/api/ProxifyPositionResult.java
@@ -8,22 +8,23 @@
  * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations under the License.
  *
- * Copyright 2015-2021 the original author or authors.
+ * Copyright 2015-2024 the original author or authors.
  */
 package org.assertj.db.api;
 
-import net.bytebuddy.implementation.bind.annotation.RuntimeType;
-import net.bytebuddy.implementation.bind.annotation.SuperCall;
+import static org.assertj.db.util.Proxies.isProxied;
+import static org.assertj.db.util.Proxies.unProxy;
+
+import java.util.concurrent.Callable;
+
 import org.assertj.core.util.Arrays;
 import org.assertj.db.type.Change;
 import org.assertj.db.type.Column;
 import org.assertj.db.type.Row;
 import org.assertj.db.type.Value;
 
-import java.util.concurrent.Callable;
-
-import static org.assertj.db.util.Proxies.isProxified;
-import static org.assertj.db.util.Proxies.unProxy;
+import net.bytebuddy.implementation.bind.annotation.RuntimeType;
+import net.bytebuddy.implementation.bind.annotation.SuperCall;
 
 /**
  * Method interceptor that proxify result of assertions methods.
@@ -38,44 +39,34 @@ public class ProxifyPositionResult {
     this.proxies = proxies;
   }
 
-  @RuntimeType
-  public Object intercept(@SuperCall Callable proxy) throws Exception {
-    Object result = proxy.call();
-
-    if (isProxified(result.getClass()) || Arrays.isNullOrEmpty(actual(result))) {
-      return result;
-    }
-    return this.proxies.create(result.getClass(), actualClass(result), actual(result));
-  }
-
   private static Class[] actualClass(Object result) {
 
     if (result instanceof AbstractColumnAssert) {
       return Arrays.array(
-          unProxy(((AbstractColumnAssert) result).origin.getClass()),
-          Column.class
+        unProxy(((AbstractColumnAssert) result).origin.getClass()),
+        Column.class
       );
     } else if (result instanceof AbstractRowAssert) {
       return Arrays.array(
-          unProxy(((AbstractRowAssert) result).origin.getClass()),
-          Row.class
+        unProxy(((AbstractRowAssert) result).origin.getClass()),
+        Row.class
       );
     } else if (result instanceof AbstractValueAssert) {
       return Arrays.array(
-          unProxy(((AbstractValueAssert) result).origin.getClass()),
-          Value.class
+        unProxy(((AbstractValueAssert) result).origin.getClass()),
+        Value.class
       );
     } else if (result instanceof ChangeAssert) {
       return Arrays.array(
-          unProxy(((ChangeAssert) result).origin.getClass()),
-          Change.class
+        unProxy(((ChangeAssert) result).origin.getClass()),
+        Change.class
       );
     } else if (result instanceof ChangeColumnAssert) {
       return Arrays.array(
-          unProxy(((ChangeColumnAssert) result).origin.getClass()),
-          String.class,
-          Value.class,
-          Value.class
+        unProxy(((ChangeColumnAssert) result).origin.getClass()),
+        String.class,
+        Value.class,
+        Value.class
       );
     } else {
       return Arrays.array();
@@ -85,33 +76,50 @@ private static Class[] actualClass(Object result) {
   private static Object[] actual(Object result) {
     if (result instanceof AbstractColumnAssert) {
       return Arrays.array(
-          ((AbstractColumnAssert) result).origin,
-          ((AbstractColumnAssert) result).column
+        ((AbstractColumnAssert) result).origin,
+        ((AbstractColumnAssert) result).column
       );
     } else if (result instanceof AbstractRowAssert) {
       return Arrays.array(
-          ((AbstractRowAssert) result).origin,
-          ((AbstractRowAssert) result).row
+        ((AbstractRowAssert) result).origin,
+        ((AbstractRowAssert) result).row
       );
     } else if (result instanceof AbstractValueAssert) {
       return Arrays.array(
-          ((AbstractValueAssert) result).origin,
-          ((AbstractValueAssert) result).value
+        ((AbstractValueAssert) result).origin,
+        ((AbstractValueAssert) result).value
       );
     } else if (result instanceof ChangeAssert) {
       return Arrays.array(
-          ((ChangeAssert) result).origin,
-          ((ChangeAssert) result).change
+        ((ChangeAssert) result).origin,
+        ((ChangeAssert) result).change
       );
     } else if (result instanceof ChangeColumnAssert) {
       return Arrays.array(
-          ((ChangeColumnAssert) result).origin,
-          ((ChangeColumnAssert) result).columnName,
-          ((ChangeColumnAssert) result).valueAtStartPoint,
-          ((ChangeColumnAssert) result).valueAtEndPoint
+        ((ChangeColumnAssert) result).origin,
+        ((ChangeColumnAssert) result).columnName,
+        ((ChangeColumnAssert) result).valueAtStartPoint,
+        ((ChangeColumnAssert) result).valueAtEndPoint
       );
     } else {
       return Arrays.array();
     }
   }
+
+  /**
+   * Method called during interception of positional method.
+   *
+   * @param proxy Proxy method to use
+   * @return the object result proxied
+   * @throws Exception When method call fail
+   */
+  @RuntimeType
+  public Object intercept(@SuperCall Callable proxy) throws Exception {
+    Object result = proxy.call();
+
+    if (isProxied(result.getClass()) || Arrays.isNullOrEmpty(actual(result))) {
+      return result;
+    }
+    return this.proxies.create(result.getClass(), actualClass(result), actual(result));
+  }
 }
diff --git a/src/main/java/org/assertj/db/api/RequestAssert.java b/src/main/java/org/assertj/db/api/RequestAssert.java
index 126b2a1c..e8dde733 100644
--- a/src/main/java/org/assertj/db/api/RequestAssert.java
+++ b/src/main/java/org/assertj/db/api/RequestAssert.java
@@ -8,7 +8,7 @@
  * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations under the License.
  *
- * Copyright 2015-2021 the original author or authors.
+ * Copyright 2015-2024 the original author or authors.
  */
 package org.assertj.db.api;
 
@@ -16,16 +16,15 @@
 
 /**
  * Assertion methods for a {@link Request}.
- * 
+ *
  * @author Régis Pouiller
- * 
  */
 public class RequestAssert
-        extends AbstractDbAssert {
+  extends AbstractDbAssert {
 
   /**
    * Constructor.
-   * 
+   *
    * @param request Request on which the assertion is.
    */
   public RequestAssert(Request request) {
diff --git a/src/main/java/org/assertj/db/api/RequestColumnAssert.java b/src/main/java/org/assertj/db/api/RequestColumnAssert.java
index 405fa135..aef0b84f 100644
--- a/src/main/java/org/assertj/db/api/RequestColumnAssert.java
+++ b/src/main/java/org/assertj/db/api/RequestColumnAssert.java
@@ -8,7 +8,7 @@
  * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations under the License.
  *
- * Copyright 2015-2021 the original author or authors.
+ * Copyright 2015-2024 the original author or authors.
  */
 package org.assertj.db.api;
 
@@ -17,16 +17,15 @@
 
 /**
  * Assertion methods for a {@link Column} of a {@link Request}.
- * 
+ *
  * @author Régis Pouiller
- * 
  */
 public class RequestColumnAssert
-        extends AbstractColumnAssert {
+  extends AbstractColumnAssert {
 
   /**
    * Constructor.
-   * 
+   *
    * @param origin The assertion of {@link org.assertj.db.navigation.origin.Origin}.
    * @param column The column on which do assertion.
    */
@@ -36,10 +35,10 @@ public RequestColumnAssert(RequestAssert origin, Column column) {
 
   /**
    * Returns to level of assertion methods on a {@link Request}.
-   * 
+   *
    * @return a object of assertion methods on a {@link Request}.
    */
   public RequestAssert returnToRequest() {
     return returnToOrigin();
   }
-}
\ No newline at end of file
+}
diff --git a/src/main/java/org/assertj/db/api/RequestColumnValueAssert.java b/src/main/java/org/assertj/db/api/RequestColumnValueAssert.java
index 3010745a..27bea252 100644
--- a/src/main/java/org/assertj/db/api/RequestColumnValueAssert.java
+++ b/src/main/java/org/assertj/db/api/RequestColumnValueAssert.java
@@ -8,7 +8,7 @@
  * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations under the License.
  *
- * Copyright 2015-2021 the original author or authors.
+ * Copyright 2015-2024 the original author or authors.
  */
 package org.assertj.db.api;
 
@@ -18,18 +18,17 @@
 
 /**
  * Assertion methods for a value in a {@link Column} of a {@link Request}.
- * 
+ *
  * @author Régis Pouiller
- * 
  */
 public class RequestColumnValueAssert
-        extends AbstractColumnValueAssert {
+  extends AbstractColumnValueAssert {
 
   /**
    * Constructor.
-   * 
+   *
    * @param origin The assertion of {@link org.assertj.db.navigation.origin.Origin}.
-   * @param value The value to assert.
+   * @param value  The value to assert.
    */
   public RequestColumnValueAssert(RequestColumnAssert origin, Value value) {
     super(RequestColumnValueAssert.class, origin, value);
diff --git a/src/main/java/org/assertj/db/api/RequestRowAssert.java b/src/main/java/org/assertj/db/api/RequestRowAssert.java
index 1ed6d1d6..51e83279 100644
--- a/src/main/java/org/assertj/db/api/RequestRowAssert.java
+++ b/src/main/java/org/assertj/db/api/RequestRowAssert.java
@@ -8,7 +8,7 @@
  * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations under the License.
  *
- * Copyright 2015-2021 the original author or authors.
+ * Copyright 2015-2024 the original author or authors.
  */
 package org.assertj.db.api;
 
@@ -18,18 +18,17 @@
 
 /**
  * Assertion methods for a {@link Row} of a {@link Table}.
- * 
+ *
  * @author Régis Pouiller
- * 
  */
 public class RequestRowAssert
-        extends AbstractRowAssert {
+  extends AbstractRowAssert {
 
   /**
    * Constructor.
-   * 
+   *
    * @param origin The assertion of {@link org.assertj.db.navigation.origin.Origin}.
-   * @param row The row on which do assertion.
+   * @param row    The row on which do assertion.
    */
   public RequestRowAssert(RequestAssert origin, Row row) {
     super(origin, RequestRowAssert.class, RequestRowValueAssert.class, row);
@@ -37,7 +36,7 @@ public RequestRowAssert(RequestAssert origin, Row row) {
 
   /**
    * Returns to level of assertion methods on a {@link Request}.
-   * 
+   *
    * @return a object of assertion methods on a {@link Request}.
    */
   public RequestAssert returnToRequest() {
diff --git a/src/main/java/org/assertj/db/api/RequestRowValueAssert.java b/src/main/java/org/assertj/db/api/RequestRowValueAssert.java
index 87ca9f05..b6a10d16 100644
--- a/src/main/java/org/assertj/db/api/RequestRowValueAssert.java
+++ b/src/main/java/org/assertj/db/api/RequestRowValueAssert.java
@@ -8,7 +8,7 @@
  * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations under the License.
  *
- * Copyright 2015-2021 the original author or authors.
+ * Copyright 2015-2024 the original author or authors.
  */
 package org.assertj.db.api;
 
@@ -20,10 +20,9 @@
  * Assertion methods for a value in a {@link Row} of a {@link Request}.
  *
  * @author Régis Pouiller
- *
  */
 public class RequestRowValueAssert
-        extends AbstractRowValueAssert {
+  extends AbstractRowValueAssert {
 
   /**
    * Constructor.
diff --git a/src/main/java/org/assertj/db/api/SoftAssertions.java b/src/main/java/org/assertj/db/api/SoftAssertions.java
index a0f1cef4..6cb17563 100644
--- a/src/main/java/org/assertj/db/api/SoftAssertions.java
+++ b/src/main/java/org/assertj/db/api/SoftAssertions.java
@@ -8,30 +8,37 @@
  * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations under the License.
  *
- * Copyright 2015-2021 the original author or authors.
+ * Copyright 2015-2024 the original author or authors.
  */
 package org.assertj.db.api;
 
+import java.util.List;
+
 import org.assertj.core.api.SoftAssertionError;
 import org.assertj.core.groups.Properties;
 import org.assertj.db.type.Changes;
 import org.assertj.db.type.Request;
 import org.assertj.db.type.Table;
 
-import java.util.List;
-
 /**
  * Implementation of AssertJ SoftAssertions for {@link Table}, {@link Request} and {@link Changes}.
- *
+ * 

* This implementation works like AssertJ SoftAssertions implementation by providing you with * proxies of the AssertJ-DB assertion objects. - * + *

* For more details see AssertJ implementation : {@link org.assertj.core.api.SoftAssertions} * * @author Julien Roy */ public final class SoftAssertions extends AbstractSoftAssertions { + /** + * Create a new SoftAssertions class that allow chain many assertion and detect all assertion failure ( not only the first one ). + */ + public SoftAssertions() { + super(); + } + /** * Creates a new instance of {@link TableAssert}. * @@ -62,6 +69,11 @@ public ChangesAssert assertThat(Changes changes) { return proxy(ChangesAssert.class, Changes.class, changes); } + /** + * Assert that all assertions succeed. + * + * @throws SoftAssertionError If any assertion failed. + */ public void assertAll() { List errors = this.errorsCollected(); if (!errors.isEmpty()) { diff --git a/src/main/java/org/assertj/db/api/SoftProxies.java b/src/main/java/org/assertj/db/api/SoftProxies.java index bd8f73c7..e759b0ad 100644 --- a/src/main/java/org/assertj/db/api/SoftProxies.java +++ b/src/main/java/org/assertj/db/api/SoftProxies.java @@ -8,10 +8,19 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api; +import static net.bytebuddy.matcher.ElementMatchers.any; +import static net.bytebuddy.matcher.ElementMatchers.nameContains; +import static net.bytebuddy.matcher.ElementMatchers.nameStartsWith; +import static net.bytebuddy.matcher.ElementMatchers.named; +import static net.bytebuddy.matcher.ElementMatchers.not; + +import java.lang.reflect.Constructor; +import java.util.List; + import net.bytebuddy.ByteBuddy; import net.bytebuddy.description.method.MethodDescription; import net.bytebuddy.dynamic.scaffold.TypeValidation; @@ -19,11 +28,6 @@ import net.bytebuddy.implementation.auxiliary.AuxiliaryType; import net.bytebuddy.matcher.ElementMatcher; -import java.lang.reflect.Constructor; -import java.util.List; - -import static net.bytebuddy.matcher.ElementMatchers.*; - /** * Proxy implementation utilities. * @@ -32,46 +36,46 @@ class SoftProxies { private static final ByteBuddy BYTE_BUDDY = new ByteBuddy() - .with(new AuxiliaryType.NamingStrategy.SuffixingRandom("AssertJDb$SoftProxies")) - .with(TypeValidation.DISABLED); + .with(new AuxiliaryType.NamingStrategy.SuffixingRandom("AssertJDb$SoftProxies")) + .with(TypeValidation.DISABLED); private static final ElementMatcher.Junction METHODS_TO_EXTRACT_PROXY = nameContains("change") - .or(nameContains("column")) - .or(nameContains("row")) - .or(nameContains("value")) - .or(nameStartsWith("changeOf")) - .or(nameStartsWith("of")) - .or(nameStartsWith("rowAt")); + .or(nameContains("column")) + .or(nameContains("row")) + .or(nameContains("value")) + .or(nameStartsWith("changeOf")) + .or(nameStartsWith("of")) + .or(nameStartsWith("rowAt")); private static final ElementMatcher.Junction METHODS_NOT_TO_PROXY = METHODS_TO_EXTRACT_PROXY - .or(named("equals")) - .or(named("hashCode")) - .or(named("clone")) - .or(named("as")) - .or(named("toString")) - .or(named("describedAs")) - .or(named("descriptionText")) - .or(named("getWritableAssertionInfo")) - .or(named("inBinary")) - .or(named("inHexadecimal")) - .or(named("newAbstractIterableAssert")) - .or(named("newObjectArrayAssert")) - .or(named("removeCustomAssertRelatedElementsFromStackTraceIfNeeded")) - .or(named("overridingErrorMessage")) - .or(named("usingComparator")) - .or(named("usingDefaultComparator")) - .or(named("usingElementComparator")) - .or(named("withComparatorsForElementPropertyOrFieldNames")) - .or(named("withComparatorsForElementPropertyOrFieldTypes")) - .or(named("withIterables")) - .or(named("withFailMessage")) - .or(named("withAssertionInfo")) - .or(named("withAssertionState")) - .or(named("withRepresentation")) - .or(named("withTypeComparators")) - .or(named("withThreadDumpOnError")) - .or(named("succeedsWithin")) - .or(named("isEmpty")); + .or(named("equals")) + .or(named("hashCode")) + .or(named("clone")) + .or(named("as")) + .or(named("toString")) + .or(named("describedAs")) + .or(named("descriptionText")) + .or(named("getWritableAssertionInfo")) + .or(named("inBinary")) + .or(named("inHexadecimal")) + .or(named("newAbstractIterableAssert")) + .or(named("newObjectArrayAssert")) + .or(named("removeCustomAssertRelatedElementsFromStackTraceIfNeeded")) + .or(named("overridingErrorMessage")) + .or(named("usingComparator")) + .or(named("usingDefaultComparator")) + .or(named("usingElementComparator")) + .or(named("withComparatorsForElementPropertyOrFieldNames")) + .or(named("withComparatorsForElementPropertyOrFieldTypes")) + .or(named("withIterables")) + .or(named("withFailMessage")) + .or(named("withAssertionInfo")) + .or(named("withAssertionState")) + .or(named("withRepresentation")) + .or(named("withTypeComparators")) + .or(named("withThreadDumpOnError")) + .or(named("succeedsWithin")) + .or(named("isEmpty")); private final ErrorCollector collector = new ErrorCollector(); @@ -110,13 +114,13 @@ public boolean wasSuccess() { @SuppressWarnings("unchecked") private Class createProxyClass(Class assertClass) { return (Class) BYTE_BUDDY - .subclass(assertClass) - .method(any().and(not(METHODS_NOT_TO_PROXY))) - .intercept(MethodDelegation.to(collector)) - .method(METHODS_TO_EXTRACT_PROXY) - .intercept(MethodDelegation.to(new ProxifyPositionResult(this))) - .make() - .load(assertClass.getClassLoader()) - .getLoaded(); + .subclass(assertClass) + .method(any().and(not(METHODS_NOT_TO_PROXY))) + .intercept(MethodDelegation.to(collector)) + .method(METHODS_TO_EXTRACT_PROXY) + .intercept(MethodDelegation.to(new ProxifyPositionResult(this))) + .make() + .load(assertClass.getClassLoader()) + .getLoaded(); } } diff --git a/src/main/java/org/assertj/db/api/TableAssert.java b/src/main/java/org/assertj/db/api/TableAssert.java index 090c2c9a..b9f6bb8e 100644 --- a/src/main/java/org/assertj/db/api/TableAssert.java +++ b/src/main/java/org/assertj/db/api/TableAssert.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api; @@ -20,11 +20,10 @@ * Assertion methods for a {@link Table}. * * @author Régis Pouiller - * */ public class TableAssert - extends AbstractDbAssert - implements AssertOnExistence { + extends AbstractDbAssert + implements AssertOnExistence { /** * Constructor. diff --git a/src/main/java/org/assertj/db/api/TableColumnAssert.java b/src/main/java/org/assertj/db/api/TableColumnAssert.java index dffb62b1..61692bcb 100644 --- a/src/main/java/org/assertj/db/api/TableColumnAssert.java +++ b/src/main/java/org/assertj/db/api/TableColumnAssert.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api; @@ -17,16 +17,15 @@ /** * Assertion methods for a {@link Column} of a {@link Table}. - * + * * @author Régis Pouiller - * */ public class TableColumnAssert - extends AbstractColumnAssert { + extends AbstractColumnAssert { /** * Constructor. - * + * * @param origin The assertion of {@link org.assertj.db.navigation.origin.Origin}. * @param column The column on which do assertion. */ @@ -36,7 +35,7 @@ public TableColumnAssert(TableAssert origin, Column column) { /** * Returns to level of assertion methods on a {@link Table}. - * + * * @return a object of assertion methods on a {@link Table}. */ public TableAssert returnToTable() { diff --git a/src/main/java/org/assertj/db/api/TableColumnValueAssert.java b/src/main/java/org/assertj/db/api/TableColumnValueAssert.java index 3ad26f42..0f02c785 100644 --- a/src/main/java/org/assertj/db/api/TableColumnValueAssert.java +++ b/src/main/java/org/assertj/db/api/TableColumnValueAssert.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api; @@ -18,18 +18,17 @@ /** * Assertion methods for a value in a {@link Column} of a {@link Table}. - * + * * @author Régis Pouiller - * */ public class TableColumnValueAssert - extends AbstractColumnValueAssert { + extends AbstractColumnValueAssert { /** * Constructor. - * + * * @param origin The assertion of {@link org.assertj.db.navigation.origin.Origin}. - * @param value The value to assert. + * @param value The value to assert. */ public TableColumnValueAssert(TableColumnAssert origin, Value value) { super(TableColumnValueAssert.class, origin, value); diff --git a/src/main/java/org/assertj/db/api/TableRowAssert.java b/src/main/java/org/assertj/db/api/TableRowAssert.java index 94da04f0..07609e22 100644 --- a/src/main/java/org/assertj/db/api/TableRowAssert.java +++ b/src/main/java/org/assertj/db/api/TableRowAssert.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api; @@ -17,18 +17,17 @@ /** * Assertion methods for a {@link Row} of a {@link Table}. - * + * * @author Régis Pouiller - * */ public class TableRowAssert - extends AbstractRowAssert { + extends AbstractRowAssert { /** * Constructor. - * + * * @param origin The assertion of {@link org.assertj.db.navigation.origin.Origin}. - * @param row The row on which do assertion. + * @param row The row on which do assertion. */ public TableRowAssert(TableAssert origin, Row row) { super(origin, TableRowAssert.class, TableRowValueAssert.class, row); @@ -36,7 +35,7 @@ public TableRowAssert(TableAssert origin, Row row) { /** * Returns to level of assertion methods on a {@link Table}. - * + * * @return a object of assertion methods on a {@link Table}. */ public TableAssert returnToTable() { diff --git a/src/main/java/org/assertj/db/api/TableRowValueAssert.java b/src/main/java/org/assertj/db/api/TableRowValueAssert.java index 3be7f48f..e136f086 100644 --- a/src/main/java/org/assertj/db/api/TableRowValueAssert.java +++ b/src/main/java/org/assertj/db/api/TableRowValueAssert.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api; @@ -18,16 +18,15 @@ /** * Assertion methods for a value in a {@link Row} of a {@link Table}. - * + * * @author Régis Pouiller - * */ public class TableRowValueAssert - extends AbstractRowValueAssert { + extends AbstractRowValueAssert { /** * Constructor. - * + * * @param origin The assertion of {@link org.assertj.db.navigation.origin.Origin}. * @param value The value to assert. */ diff --git a/src/main/java/org/assertj/db/api/assertions/AssertOnChangeType.java b/src/main/java/org/assertj/db/api/assertions/AssertOnChangeType.java index 16db6fc5..719b59b4 100644 --- a/src/main/java/org/assertj/db/api/assertions/AssertOnChangeType.java +++ b/src/main/java/org/assertj/db/api/assertions/AssertOnChangeType.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; diff --git a/src/main/java/org/assertj/db/api/assertions/AssertOnColumnClass.java b/src/main/java/org/assertj/db/api/assertions/AssertOnColumnClass.java index 1dd105c4..08d22053 100644 --- a/src/main/java/org/assertj/db/api/assertions/AssertOnColumnClass.java +++ b/src/main/java/org/assertj/db/api/assertions/AssertOnColumnClass.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; @@ -43,8 +43,8 @@ public interface AssertOnColumnClass> { *

* * @param expected The expected class to compare to. - * @param lenient {@code true} if the test is lenient : if the class of a value is not identified (for example when the - * value is {@code null}), it consider that it is ok. + * @param lenient {@code true} if the test is lenient : if the class of a value is not identified (for example when the + * value is {@code null}), it consider that it is ok. * @return {@code this} assertion object. * @throws AssertionError If the class of the column is different to the class in parameter. * @see org.assertj.db.api.AbstractColumnAssert#isOfClass(Class, boolean) diff --git a/src/main/java/org/assertj/db/api/assertions/AssertOnColumnContent.java b/src/main/java/org/assertj/db/api/assertions/AssertOnColumnContent.java index f9a788a5..a78e5be0 100644 --- a/src/main/java/org/assertj/db/api/assertions/AssertOnColumnContent.java +++ b/src/main/java/org/assertj/db/api/assertions/AssertOnColumnContent.java @@ -8,16 +8,16 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import java.util.UUID; + import org.assertj.db.type.DateTimeValue; import org.assertj.db.type.DateValue; import org.assertj.db.type.TimeValue; -import java.util.UUID; - /** * Defines the assertion methods on the content of a column. * diff --git a/src/main/java/org/assertj/db/api/assertions/AssertOnColumnEquality.java b/src/main/java/org/assertj/db/api/assertions/AssertOnColumnEquality.java index f45c95e6..ee64e812 100644 --- a/src/main/java/org/assertj/db/api/assertions/AssertOnColumnEquality.java +++ b/src/main/java/org/assertj/db/api/assertions/AssertOnColumnEquality.java @@ -8,16 +8,16 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import java.util.UUID; + import org.assertj.db.type.DateTimeValue; import org.assertj.db.type.DateValue; import org.assertj.db.type.TimeValue; -import java.util.UUID; - /** * Defines the assertion methods on the equality of a column. * diff --git a/src/main/java/org/assertj/db/api/assertions/AssertOnColumnName.java b/src/main/java/org/assertj/db/api/assertions/AssertOnColumnName.java index e6a96fb7..f2fbea2e 100644 --- a/src/main/java/org/assertj/db/api/assertions/AssertOnColumnName.java +++ b/src/main/java/org/assertj/db/api/assertions/AssertOnColumnName.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; diff --git a/src/main/java/org/assertj/db/api/assertions/AssertOnColumnNullity.java b/src/main/java/org/assertj/db/api/assertions/AssertOnColumnNullity.java index 08237c5f..0a1ab874 100644 --- a/src/main/java/org/assertj/db/api/assertions/AssertOnColumnNullity.java +++ b/src/main/java/org/assertj/db/api/assertions/AssertOnColumnNullity.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; diff --git a/src/main/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality.java b/src/main/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality.java index 8714663a..fa9bb8d0 100644 --- a/src/main/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality.java +++ b/src/main/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality.java @@ -8,16 +8,16 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import java.util.UUID; + import org.assertj.db.type.DateTimeValue; import org.assertj.db.type.DateValue; import org.assertj.db.type.TimeValue; -import java.util.UUID; - /** * Defines the assertion methods on the equality of a column of a change. * diff --git a/src/main/java/org/assertj/db/api/assertions/AssertOnColumnType.java b/src/main/java/org/assertj/db/api/assertions/AssertOnColumnType.java index 130da6d1..84787bf7 100644 --- a/src/main/java/org/assertj/db/api/assertions/AssertOnColumnType.java +++ b/src/main/java/org/assertj/db/api/assertions/AssertOnColumnType.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; @@ -46,8 +46,8 @@ public interface AssertOnColumnType> { * * * @param expected The expected type to compare to. - * @param lenient {@code true} if the test is lenient : if the type of a value is not identified (for example when the - * value is {@code null}), it consider that it is ok. + * @param lenient {@code true} if the test is lenient : if the type of a value is not identified (for example when the + * value is {@code null}), it consider that it is ok. * @return {@code this} assertion object. * @throws AssertionError If the type of the column is different to the type in parameter. * @see org.assertj.db.api.AbstractColumnAssert#isOfType(org.assertj.db.type.ValueType, boolean) @@ -94,7 +94,7 @@ public interface AssertOnColumnType> { * * * @param lenient {@code true} if the test is lenient : if the type of a value is not identified (for example when the - * value is {@code null}), it consider that it is ok. + * value is {@code null}), it consider that it is ok. * @return {@code this} assertion object. * @throws AssertionError If the type of the column is not number. * @see org.assertj.db.type.ValueType#NUMBER @@ -123,7 +123,7 @@ public interface AssertOnColumnType> { * * * @param lenient {@code true} if the test is lenient : if the type of a value is not identified (for example when the - * value is {@code null}), it consider that it is ok. + * value is {@code null}), it consider that it is ok. * @return {@code this} assertion object. * @throws AssertionError If the type of the column is not boolean. * @see org.assertj.db.type.ValueType#BOOLEAN @@ -152,7 +152,7 @@ public interface AssertOnColumnType> { * * * @param lenient {@code true} if the test is lenient : if the type of a value is not identified (for example when the - * value is {@code null}), it consider that it is ok. + * value is {@code null}), it consider that it is ok. * @return {@code this} assertion object. * @throws AssertionError If the type of the column is not date. * @see org.assertj.db.type.ValueType#DATE @@ -181,7 +181,7 @@ public interface AssertOnColumnType> { * * * @param lenient {@code true} if the test is lenient : if the type of a value is not identified (for example when the - * value is {@code null}), it consider that it is ok. + * value is {@code null}), it consider that it is ok. * @return {@code this} assertion object. * @throws AssertionError If the type of the column is not time. * @see org.assertj.db.type.ValueType#TIME @@ -210,7 +210,7 @@ public interface AssertOnColumnType> { * * * @param lenient {@code true} if the test is lenient : if the type of a value is not identified (for example when the - * value is {@code null}), it consider that it is ok. + * value is {@code null}), it consider that it is ok. * @return {@code this} assertion object. * @throws AssertionError If the type of the column is not date/time. * @see org.assertj.db.type.ValueType#DATE_TIME @@ -239,7 +239,7 @@ public interface AssertOnColumnType> { * * * @param lenient {@code true} if the test is lenient : if the type of a value is not identified (for example when the - * value is {@code null}), it consider that it is ok. + * value is {@code null}), it consider that it is ok. * @return {@code this} assertion object. * @throws AssertionError If the type of the column is not array of bytes. * @see org.assertj.db.type.ValueType#BYTES @@ -268,7 +268,7 @@ public interface AssertOnColumnType> { * * * @param lenient {@code true} if the test is lenient : if the type of a value is not identified (for example when the - * value is {@code null}), it consider that it is ok. + * value is {@code null}), it consider that it is ok. * @return {@code this} assertion object. * @throws AssertionError If the type of the column is not text. * @see org.assertj.db.type.ValueType#TEXT @@ -297,7 +297,7 @@ public interface AssertOnColumnType> { * * * @param lenient {@code true} if the test is lenient : if the type of a value is not identified (for example when the - * value is {@code null}), it consider that it is ok. + * value is {@code null}), it consider that it is ok. * @return {@code this} assertion object. * @throws AssertionError If the type of the column is not UUID. * @see org.assertj.db.type.ValueType#UUID diff --git a/src/main/java/org/assertj/db/api/assertions/AssertOnDataType.java b/src/main/java/org/assertj/db/api/assertions/AssertOnDataType.java index aa623dcc..e38365f0 100644 --- a/src/main/java/org/assertj/db/api/assertions/AssertOnDataType.java +++ b/src/main/java/org/assertj/db/api/assertions/AssertOnDataType.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; diff --git a/src/main/java/org/assertj/db/api/assertions/AssertOnExistence.java b/src/main/java/org/assertj/db/api/assertions/AssertOnExistence.java index b9d8f355..a184cde8 100644 --- a/src/main/java/org/assertj/db/api/assertions/AssertOnExistence.java +++ b/src/main/java/org/assertj/db/api/assertions/AssertOnExistence.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; diff --git a/src/main/java/org/assertj/db/api/assertions/AssertOnModifiedColumn.java b/src/main/java/org/assertj/db/api/assertions/AssertOnModifiedColumn.java index 3fe50f00..3910032b 100644 --- a/src/main/java/org/assertj/db/api/assertions/AssertOnModifiedColumn.java +++ b/src/main/java/org/assertj/db/api/assertions/AssertOnModifiedColumn.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; diff --git a/src/main/java/org/assertj/db/api/assertions/AssertOnModifiedColumns.java b/src/main/java/org/assertj/db/api/assertions/AssertOnModifiedColumns.java index 9c1aa6f3..fde498bb 100644 --- a/src/main/java/org/assertj/db/api/assertions/AssertOnModifiedColumns.java +++ b/src/main/java/org/assertj/db/api/assertions/AssertOnModifiedColumns.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; diff --git a/src/main/java/org/assertj/db/api/assertions/AssertOnNumberOfChanges.java b/src/main/java/org/assertj/db/api/assertions/AssertOnNumberOfChanges.java index ceef204a..2ba93cd4 100644 --- a/src/main/java/org/assertj/db/api/assertions/AssertOnNumberOfChanges.java +++ b/src/main/java/org/assertj/db/api/assertions/AssertOnNumberOfChanges.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; diff --git a/src/main/java/org/assertj/db/api/assertions/AssertOnNumberOfColumns.java b/src/main/java/org/assertj/db/api/assertions/AssertOnNumberOfColumns.java index 59d4612f..ee22695d 100644 --- a/src/main/java/org/assertj/db/api/assertions/AssertOnNumberOfColumns.java +++ b/src/main/java/org/assertj/db/api/assertions/AssertOnNumberOfColumns.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; diff --git a/src/main/java/org/assertj/db/api/assertions/AssertOnNumberOfRows.java b/src/main/java/org/assertj/db/api/assertions/AssertOnNumberOfRows.java index fbe345d3..8a7e92dc 100644 --- a/src/main/java/org/assertj/db/api/assertions/AssertOnNumberOfRows.java +++ b/src/main/java/org/assertj/db/api/assertions/AssertOnNumberOfRows.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; diff --git a/src/main/java/org/assertj/db/api/assertions/AssertOnPrimaryKey.java b/src/main/java/org/assertj/db/api/assertions/AssertOnPrimaryKey.java index 5486a924..4e8ceeb9 100644 --- a/src/main/java/org/assertj/db/api/assertions/AssertOnPrimaryKey.java +++ b/src/main/java/org/assertj/db/api/assertions/AssertOnPrimaryKey.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; diff --git a/src/main/java/org/assertj/db/api/assertions/AssertOnRowCondition.java b/src/main/java/org/assertj/db/api/assertions/AssertOnRowCondition.java index 5184e06f..efc42f87 100644 --- a/src/main/java/org/assertj/db/api/assertions/AssertOnRowCondition.java +++ b/src/main/java/org/assertj/db/api/assertions/AssertOnRowCondition.java @@ -8,12 +8,10 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; -import org.assertj.core.api.Condition; - /** * Defines the assertion method on the a row satisfy conditions. * diff --git a/src/main/java/org/assertj/db/api/assertions/AssertOnRowEquality.java b/src/main/java/org/assertj/db/api/assertions/AssertOnRowEquality.java index 71a2d60a..5c61f928 100644 --- a/src/main/java/org/assertj/db/api/assertions/AssertOnRowEquality.java +++ b/src/main/java/org/assertj/db/api/assertions/AssertOnRowEquality.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; diff --git a/src/main/java/org/assertj/db/api/assertions/AssertOnRowNullity.java b/src/main/java/org/assertj/db/api/assertions/AssertOnRowNullity.java index 974128eb..aeff568f 100644 --- a/src/main/java/org/assertj/db/api/assertions/AssertOnRowNullity.java +++ b/src/main/java/org/assertj/db/api/assertions/AssertOnRowNullity.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; @@ -18,27 +18,26 @@ * @param The "self" type of this assertion class. Please read "Emulating 'self types' using Java Generics to simplify fluent API implementation" * for more details. - * * @author fiery-phoenix * @since 1.2.0 */ public interface AssertOnRowNullity> { - /** - * Verifies that all the values of the row are not {@code null}. - *

- * Example where the assertion verifies that all the values in the first {@code Row} of the {@code Table} are not - * {@code null} : - *

- * - *

-     * assertThat(table).row().hasOnlyNotNullValues();
-     * 
- * - * @return {@code this} assertion object. - * @throws AssertionError If at least one of the values of the row is {@code null}. - * @see org.assertj.db.api.AbstractRowAssert#hasOnlyNotNullValues() - */ - T hasOnlyNotNullValues(); + /** + * Verifies that all the values of the row are not {@code null}. + *

+ * Example where the assertion verifies that all the values in the first {@code Row} of the {@code Table} are not + * {@code null} : + *

+ * + *

+   * assertThat(table).row().hasOnlyNotNullValues();
+   * 
+ * + * @return {@code this} assertion object. + * @throws AssertionError If at least one of the values of the row is {@code null}. + * @see org.assertj.db.api.AbstractRowAssert#hasOnlyNotNullValues() + */ + T hasOnlyNotNullValues(); } diff --git a/src/main/java/org/assertj/db/api/assertions/AssertOnRowOfChangeExistence.java b/src/main/java/org/assertj/db/api/assertions/AssertOnRowOfChangeExistence.java index 4777809a..4f942101 100644 --- a/src/main/java/org/assertj/db/api/assertions/AssertOnRowOfChangeExistence.java +++ b/src/main/java/org/assertj/db/api/assertions/AssertOnRowOfChangeExistence.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; @@ -21,7 +21,7 @@ * @author Régis Pouiller */ public interface AssertOnRowOfChangeExistence> extends - AssertOnExistence { + AssertOnExistence { /** * Verifies that the row of the change exists. diff --git a/src/main/java/org/assertj/db/api/assertions/AssertOnValueChronology.java b/src/main/java/org/assertj/db/api/assertions/AssertOnValueChronology.java index fd0b56cd..f9631f87 100644 --- a/src/main/java/org/assertj/db/api/assertions/AssertOnValueChronology.java +++ b/src/main/java/org/assertj/db/api/assertions/AssertOnValueChronology.java @@ -8,18 +8,18 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; -import org.assertj.db.type.DateTimeValue; -import org.assertj.db.type.DateValue; -import org.assertj.db.type.TimeValue; - import java.time.LocalDate; import java.time.LocalDateTime; import java.time.LocalTime; +import org.assertj.db.type.DateTimeValue; +import org.assertj.db.type.DateValue; +import org.assertj.db.type.TimeValue; + /** * Defines the assertion methods on the chronology of a value. * diff --git a/src/main/java/org/assertj/db/api/assertions/AssertOnValueClass.java b/src/main/java/org/assertj/db/api/assertions/AssertOnValueClass.java index 955c6b62..f82e56a3 100644 --- a/src/main/java/org/assertj/db/api/assertions/AssertOnValueClass.java +++ b/src/main/java/org/assertj/db/api/assertions/AssertOnValueClass.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; diff --git a/src/main/java/org/assertj/db/api/assertions/AssertOnValueCloseness.java b/src/main/java/org/assertj/db/api/assertions/AssertOnValueCloseness.java index 68d18240..ec539d47 100644 --- a/src/main/java/org/assertj/db/api/assertions/AssertOnValueCloseness.java +++ b/src/main/java/org/assertj/db/api/assertions/AssertOnValueCloseness.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; @@ -51,7 +51,7 @@ public interface AssertOnValueCloseness> { * * * - * @param expected The expected number value. + * @param expected The expected number value. * @param tolerance The tolerance of the closeness. * @return {@code this} assertion object. * @throws AssertionError If the value is not close to the number in parameter. @@ -83,7 +83,7 @@ public interface AssertOnValueCloseness> { * * * - * @param expected The expected date value. + * @param expected The expected date value. * @param tolerance The tolerance of the closeness. * @return {@code this} assertion object. * @throws AssertionError If the value is not close to the date in parameter. @@ -115,7 +115,7 @@ public interface AssertOnValueCloseness> { * * * - * @param expected The expected date value. + * @param expected The expected date value. * @param tolerance The tolerance of the closeness. * @return {@code this} assertion object. * @throws AssertionError If the value is not close to the date in parameter. @@ -149,7 +149,7 @@ public interface AssertOnValueCloseness> { * * * - * @param expected The expected date value. + * @param expected The expected date value. * @param tolerance The tolerance of the closeness. * @return {@code this} assertion object. * @throws AssertionError If the value is not close to the date in parameter. @@ -181,7 +181,7 @@ public interface AssertOnValueCloseness> { * * * - * @param expected The expected time value. + * @param expected The expected time value. * @param tolerance The tolerance of the closeness. * @return {@code this} assertion object. * @throws AssertionError If the value is not close to the time in parameter. @@ -216,7 +216,7 @@ public interface AssertOnValueCloseness> { * * * - * @param expected The expected date/time value. + * @param expected The expected date/time value. * @param tolerance The tolerance of the closeness. * @return {@code this} assertion object. * @throws AssertionError If the value is not close to the date/time in parameter. @@ -251,7 +251,7 @@ public interface AssertOnValueCloseness> { * * * - * @param expected The expected date/time value. + * @param expected The expected date/time value. * @param tolerance The tolerance of the closeness. * @return {@code this} assertion object. * @throws AssertionError If the value is not close to the date/time in parameter. @@ -286,7 +286,7 @@ public interface AssertOnValueCloseness> { * * * - * @param expected The expected date/time value. + * @param expected The expected date/time value. * @param tolerance The tolerance of the closeness. * @return {@code this} assertion object. * @throws AssertionError If the value is not close to the date/time in parameter. diff --git a/src/main/java/org/assertj/db/api/assertions/AssertOnValueComparison.java b/src/main/java/org/assertj/db/api/assertions/AssertOnValueComparison.java index e004b635..a6e1c355 100644 --- a/src/main/java/org/assertj/db/api/assertions/AssertOnValueComparison.java +++ b/src/main/java/org/assertj/db/api/assertions/AssertOnValueComparison.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; diff --git a/src/main/java/org/assertj/db/api/assertions/AssertOnValueCondition.java b/src/main/java/org/assertj/db/api/assertions/AssertOnValueCondition.java index ad78c99f..e504b319 100644 --- a/src/main/java/org/assertj/db/api/assertions/AssertOnValueCondition.java +++ b/src/main/java/org/assertj/db/api/assertions/AssertOnValueCondition.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; @@ -30,7 +30,7 @@ public interface AssertOnValueCondition> { * @param condition the given condition. * @return {@code this} assertion object. * @throws NullPointerException if the given condition is {@code null}. - * @throws AssertionError if the actual value does not satisfy the given condition. + * @throws AssertionError if the actual value does not satisfy the given condition. * @see org.assertj.db.api.AbstractValueAssert#is(Condition) * @see org.assertj.db.api.AbstractAssertWithValues#is(Condition) */ @@ -42,7 +42,7 @@ public interface AssertOnValueCondition> { * @param condition the given condition. * @return {@code this} assertion object. * @throws NullPointerException if the given condition is {@code null}. - * @throws AssertionError if the actual value satisfies the given condition. + * @throws AssertionError if the actual value satisfies the given condition. * @see org.assertj.db.api.AbstractValueAssert#isNot(Condition) * @see org.assertj.db.api.AbstractAssertWithValues#isNot(Condition) */ @@ -54,7 +54,7 @@ public interface AssertOnValueCondition> { * @param condition the given condition. * @return {@code this} assertion object. * @throws NullPointerException if the given condition is {@code null}. - * @throws AssertionError if the actual value does not satisfy the given condition. + * @throws AssertionError if the actual value does not satisfy the given condition. * @see org.assertj.db.api.AbstractValueAssert#has(Condition) * @see org.assertj.db.api.AbstractAssertWithValues#has(Condition) */ @@ -66,7 +66,7 @@ public interface AssertOnValueCondition> { * @param condition the given condition. * @return {@code this} assertion object. * @throws NullPointerException if the given condition is {@code null}. - * @throws AssertionError if the actual value satisfies the given condition. + * @throws AssertionError if the actual value satisfies the given condition. * @see org.assertj.db.api.AbstractValueAssert#doesNotHave(Condition) * @see org.assertj.db.api.AbstractAssertWithValues#doesNotHave(Condition) */ @@ -78,7 +78,7 @@ public interface AssertOnValueCondition> { * @param condition the given condition. * @return {@code this} assertion object. * @throws NullPointerException if the given condition is {@code null}. - * @throws AssertionError if the actual value does not satisfy the given condition. + * @throws AssertionError if the actual value does not satisfy the given condition. * @see org.assertj.db.api.AbstractValueAssert#satisfies(Condition) * @see org.assertj.db.api.AbstractAssertWithValues#satisfies(Condition) */ diff --git a/src/main/java/org/assertj/db/api/assertions/AssertOnValueEquality.java b/src/main/java/org/assertj/db/api/assertions/AssertOnValueEquality.java index 75903850..4eb16184 100644 --- a/src/main/java/org/assertj/db/api/assertions/AssertOnValueEquality.java +++ b/src/main/java/org/assertj/db/api/assertions/AssertOnValueEquality.java @@ -8,19 +8,19 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; -import org.assertj.db.type.DateTimeValue; -import org.assertj.db.type.DateValue; -import org.assertj.db.type.TimeValue; - import java.time.LocalDate; import java.time.LocalDateTime; import java.time.LocalTime; import java.util.UUID; +import org.assertj.db.type.DateTimeValue; +import org.assertj.db.type.DateValue; +import org.assertj.db.type.TimeValue; + /** * Defines the assertion methods on the equality of a value. * diff --git a/src/main/java/org/assertj/db/api/assertions/AssertOnValueInequality.java b/src/main/java/org/assertj/db/api/assertions/AssertOnValueInequality.java index 660d0654..e8dd3e5e 100644 --- a/src/main/java/org/assertj/db/api/assertions/AssertOnValueInequality.java +++ b/src/main/java/org/assertj/db/api/assertions/AssertOnValueInequality.java @@ -8,19 +8,19 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; -import org.assertj.db.type.DateTimeValue; -import org.assertj.db.type.DateValue; -import org.assertj.db.type.TimeValue; - import java.time.LocalDate; import java.time.LocalDateTime; import java.time.LocalTime; import java.util.UUID; +import org.assertj.db.type.DateTimeValue; +import org.assertj.db.type.DateValue; +import org.assertj.db.type.TimeValue; + /** * Defines the assertion methods on the non equality of a value. * diff --git a/src/main/java/org/assertj/db/api/assertions/AssertOnValueNullity.java b/src/main/java/org/assertj/db/api/assertions/AssertOnValueNullity.java index f19e2667..09dfaa3e 100644 --- a/src/main/java/org/assertj/db/api/assertions/AssertOnValueNullity.java +++ b/src/main/java/org/assertj/db/api/assertions/AssertOnValueNullity.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; diff --git a/src/main/java/org/assertj/db/api/assertions/AssertOnValueType.java b/src/main/java/org/assertj/db/api/assertions/AssertOnValueType.java index 96be2174..37d686c8 100644 --- a/src/main/java/org/assertj/db/api/assertions/AssertOnValueType.java +++ b/src/main/java/org/assertj/db/api/assertions/AssertOnValueType.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; diff --git a/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnChangeType.java b/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnChangeType.java index 01acc856..2e090fc7 100644 --- a/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnChangeType.java +++ b/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnChangeType.java @@ -8,18 +8,18 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions.impl; +import static org.assertj.db.error.ShouldBeChangeType.shouldBeChangeType; + import org.assertj.core.api.WritableAssertionInfo; import org.assertj.core.internal.Failures; import org.assertj.db.api.AbstractAssert; import org.assertj.db.type.Change; import org.assertj.db.type.ChangeType; -import static org.assertj.db.error.ShouldBeChangeType.shouldBeChangeType; - /** * Implements the assertion methods on the type of a change (creation, modification or deletion of a row). *

The different type of changes are enumerated in {@link org.assertj.db.type.ChangeType}.

@@ -53,7 +53,7 @@ private AssertionsOnChangeType() { * @throws AssertionError If the type is different to the type in parameter. */ public static > A isOfType(A assertion, WritableAssertionInfo info, Change change, - ChangeType expected) { + ChangeType expected) { ChangeType type = change.getChangeType(); if (type != expected) { throw failures.failure(info, shouldBeChangeType(expected, type)); diff --git a/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnClass.java b/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnClass.java index b2dc076b..bbeab2d2 100644 --- a/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnClass.java +++ b/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnClass.java @@ -8,20 +8,20 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions.impl; +import static org.assertj.db.error.ShouldBeValueClass.shouldBeValueClass; + +import java.util.List; + import org.assertj.core.api.WritableAssertionInfo; import org.assertj.core.internal.Failures; import org.assertj.db.api.AbstractAssert; import org.assertj.db.exception.AssertJDBException; import org.assertj.db.type.Value; -import java.util.List; - -import static org.assertj.db.error.ShouldBeValueClass.shouldBeValueClass; - /** * Implements the assertion methods on the class of a column. * @@ -68,7 +68,7 @@ public static > A isOfClass(A assertion, WritableAss for (Value value : valuesList) { Object object = value.getValue(); if ( - (object == null || !expected.isAssignableFrom(object.getClass())) && + (object == null || !expected.isAssignableFrom(object.getClass())) && (!lenient || object != null) ) { diff --git a/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnContent.java b/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnContent.java index c629a208..60a2a3db 100644 --- a/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnContent.java +++ b/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnContent.java @@ -8,21 +8,25 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions.impl; -import org.assertj.core.api.WritableAssertionInfo; -import org.assertj.core.internal.Failures; -import org.assertj.db.api.AbstractAssert; -import org.assertj.db.type.*; -import org.assertj.db.util.Values; +import static org.assertj.db.error.ShouldContainsValue.shouldContainsValue; import java.util.ArrayList; import java.util.List; import java.util.UUID; -import static org.assertj.db.error.ShouldContainsValue.shouldContainsValue; +import org.assertj.core.api.WritableAssertionInfo; +import org.assertj.core.internal.Failures; +import org.assertj.db.api.AbstractAssert; +import org.assertj.db.type.DateTimeValue; +import org.assertj.db.type.DateValue; +import org.assertj.db.type.TimeValue; +import org.assertj.db.type.Value; +import org.assertj.db.type.ValueType; +import org.assertj.db.util.Values; /** * Implements the assertion methods on the content of a column. @@ -52,12 +56,12 @@ private AssertionsOnColumnContent() { * @param assertion The assertion which call this method. * @param info Writable information about an assertion. * @param valuesList The list of values. - * @param expected The expected object values. + * @param expected The expected object values. * @return {@code this} assertion object. * @throws AssertionError If the column are not containing the objects in parameter. */ public static > A containsValues(A assertion, WritableAssertionInfo info, - List valuesList, Object... expected) { + List valuesList, Object... expected) { AssertionsOnNumberOfRows.hasNumberOfRows(assertion, info, valuesList.size(), expected.length); List list = new ArrayList<>(valuesList); int index = 0; @@ -67,8 +71,7 @@ public static > A containsValues(A assertion, Writab for (Value obj : list) { if (found || !Values.areEqual(obj, val)) { newList.add(obj); - } - else { + } else { found = true; } } @@ -92,12 +95,12 @@ public static > A containsValues(A assertion, Writab * @param assertion The assertion which call this method. * @param info Writable information about an assertion. * @param valuesList The list of values. - * @param expected The expected boolean values. + * @param expected The expected boolean values. * @return {@code this} assertion object. * @throws AssertionError If the column are not containing the booleans in parameter. */ public static > A containsValues(A assertion, WritableAssertionInfo info, - List valuesList, Boolean... expected) { + List valuesList, Boolean... expected) { AssertionsOnColumnType.isBoolean(assertion, info, valuesList, true); AssertionsOnNumberOfRows.hasNumberOfRows(assertion, info, valuesList.size(), expected.length); List list = new ArrayList<>(valuesList); @@ -108,8 +111,7 @@ public static > A containsValues(A assertion, Writab for (Value obj : list) { if (found || !Values.areEqual(obj, val)) { newList.add(obj); - } - else { + } else { found = true; } } @@ -133,12 +135,12 @@ public static > A containsValues(A assertion, Writab * @param assertion The assertion which call this method. * @param info Writable information about an assertion. * @param valuesList The list of values. - * @param expected The expected numbers values. + * @param expected The expected numbers values. * @return {@code this} assertion object. * @throws AssertionError If the column are not containing the numbers in parameter. */ public static > A containsValues(A assertion, WritableAssertionInfo info, - List valuesList, Number... expected) { + List valuesList, Number... expected) { AssertionsOnColumnType.isNumber(assertion, info, valuesList, true); AssertionsOnNumberOfRows.hasNumberOfRows(assertion, info, valuesList.size(), expected.length); List list = new ArrayList<>(valuesList); @@ -149,8 +151,7 @@ public static > A containsValues(A assertion, Writab for (Value obj : list) { if (found || !Values.areEqual(obj, val)) { newList.add(obj); - } - else { + } else { found = true; } } @@ -174,12 +175,12 @@ public static > A containsValues(A assertion, Writab * @param assertion The assertion which call this method. * @param info Writable information about an assertion. * @param valuesList The list of values. - * @param expected The expected bytes values. + * @param expected The expected bytes values. * @return {@code this} assertion object. * @throws AssertionError If the column are not containing the bytes in parameter. */ public static > A containsValues(A assertion, WritableAssertionInfo info, - List valuesList, byte[]... expected) { + List valuesList, byte[]... expected) { AssertionsOnColumnType.isBytes(assertion, info, valuesList, true); AssertionsOnNumberOfRows.hasNumberOfRows(assertion, info, valuesList.size(), expected.length); List list = new ArrayList<>(valuesList); @@ -190,8 +191,7 @@ public static > A containsValues(A assertion, Writab for (Value obj : list) { if (found || !Values.areEqual(obj, val)) { newList.add(obj); - } - else { + } else { found = true; } } @@ -211,14 +211,14 @@ public static > A containsValues(A assertion, Writab * @param assertion The assertion which call this method. * @param info Writable information about an assertion. * @param valuesList The list of values. - * @param expected The expected text values. + * @param expected The expected text values. * @return {@code this} assertion object. * @throws AssertionError If the column are not containing the texts in parameter. */ public static > A containsValues(A assertion, WritableAssertionInfo info, - List valuesList, String... expected) { + List valuesList, String... expected) { AssertionsOnColumnType.isOfAnyTypeIn(assertion, info, valuesList, ValueType.TEXT, ValueType.NUMBER, ValueType.DATE, - ValueType.TIME, ValueType.DATE_TIME, ValueType.UUID, ValueType.NOT_IDENTIFIED); + ValueType.TIME, ValueType.DATE_TIME, ValueType.UUID, ValueType.NOT_IDENTIFIED); AssertionsOnNumberOfRows.hasNumberOfRows(assertion, info, valuesList.size(), expected.length); List list = new ArrayList<>(valuesList); int index = 0; @@ -228,8 +228,7 @@ public static > A containsValues(A assertion, Writab for (Value obj : list) { if (found || !Values.areEqual(obj, val)) { newList.add(obj); - } - else { + } else { found = true; } } @@ -253,13 +252,13 @@ public static > A containsValues(A assertion, Writab * @param assertion The assertion which call this method. * @param info Writable information about an assertion. * @param valuesList The list of values. - * @param expected The expected character values. + * @param expected The expected character values. * @return {@code this} assertion object. * @throws AssertionError If the column are not containing the characters in parameter. * @since 1.2.0 */ public static > A containsValues(A assertion, WritableAssertionInfo info, - List valuesList, Character... expected) { + List valuesList, Character... expected) { AssertionsOnColumnType.isText(assertion, info, valuesList, true); AssertionsOnNumberOfRows.hasNumberOfRows(assertion, info, valuesList.size(), expected.length); List list = new ArrayList<>(valuesList); @@ -270,8 +269,7 @@ public static > A containsValues(A assertion, Writab for (Value obj : list) { if (found || !Values.areEqual(obj, val)) { newList.add(obj); - } - else { + } else { found = true; } } @@ -295,12 +293,12 @@ public static > A containsValues(A assertion, Writab * @param assertion The assertion which call this method. * @param info Writable information about an assertion. * @param valuesList The list of values. - * @param expected The expected UUIDs values. + * @param expected The expected UUIDs values. * @return {@code this} assertion object. * @throws AssertionError If the column are not containing the UUIDs in parameter. */ public static > A containsValues(A assertion, WritableAssertionInfo info, - List valuesList, UUID... expected) { + List valuesList, UUID... expected) { AssertionsOnColumnType.isOfAnyTypeIn(assertion, info, valuesList, ValueType.UUID, ValueType.NOT_IDENTIFIED); AssertionsOnNumberOfRows.hasNumberOfRows(assertion, info, valuesList.size(), expected.length); List list = new ArrayList<>(valuesList); @@ -311,8 +309,7 @@ public static > A containsValues(A assertion, Writab for (Value obj : list) { if (found || !Values.areEqual(obj, val)) { newList.add(obj); - } - else { + } else { found = true; } } @@ -336,14 +333,14 @@ public static > A containsValues(A assertion, Writab * @param assertion The assertion which call this method. * @param info Writable information about an assertion. * @param valuesList The list of values. - * @param expected The expected date values. + * @param expected The expected date values. * @return {@code this} assertion object. * @throws AssertionError If the column are not containing the date values in parameter. */ public static > A containsValues(A assertion, WritableAssertionInfo info, - List valuesList, DateValue... expected) { + List valuesList, DateValue... expected) { AssertionsOnColumnType - .isOfAnyTypeIn(assertion, info, valuesList, ValueType.DATE, ValueType.DATE_TIME, ValueType.NOT_IDENTIFIED); + .isOfAnyTypeIn(assertion, info, valuesList, ValueType.DATE, ValueType.DATE_TIME, ValueType.NOT_IDENTIFIED); AssertionsOnNumberOfRows.hasNumberOfRows(assertion, info, valuesList.size(), expected.length); List list = new ArrayList<>(valuesList); int index = 0; @@ -353,8 +350,7 @@ public static > A containsValues(A assertion, Writab for (Value obj : list) { if (found || !Values.areEqual(obj, val)) { newList.add(obj); - } - else { + } else { found = true; } } @@ -378,12 +374,12 @@ public static > A containsValues(A assertion, Writab * @param assertion The assertion which call this method. * @param info Writable information about an assertion. * @param valuesList The list of values. - * @param expected The expected time values. + * @param expected The expected time values. * @return {@code this} assertion object. * @throws AssertionError If the column are not containing the time values in parameter. */ public static > A containsValues(A assertion, WritableAssertionInfo info, - List valuesList, TimeValue... expected) { + List valuesList, TimeValue... expected) { AssertionsOnColumnType.isOfAnyTypeIn(assertion, info, valuesList, ValueType.TIME, ValueType.NOT_IDENTIFIED); AssertionsOnNumberOfRows.hasNumberOfRows(assertion, info, valuesList.size(), expected.length); List list = new ArrayList<>(valuesList); @@ -394,8 +390,7 @@ public static > A containsValues(A assertion, Writab for (Value obj : list) { if (found || !Values.areEqual(obj, val)) { newList.add(obj); - } - else { + } else { found = true; } } @@ -419,14 +414,14 @@ public static > A containsValues(A assertion, Writab * @param assertion The assertion which call this method. * @param info Writable information about an assertion. * @param valuesList The list of values. - * @param expected The expected date/time values. + * @param expected The expected date/time values. * @return {@code this} assertion object. * @throws AssertionError If the column are not containing the date/time values in parameter. */ public static > A containsValues(A assertion, WritableAssertionInfo info, - List valuesList, DateTimeValue... expected) { + List valuesList, DateTimeValue... expected) { AssertionsOnColumnType.isOfAnyTypeIn(assertion, info, valuesList, ValueType.DATE, ValueType.DATE_TIME, - ValueType.NOT_IDENTIFIED); + ValueType.NOT_IDENTIFIED); AssertionsOnNumberOfRows.hasNumberOfRows(assertion, info, valuesList.size(), expected.length); List list = new ArrayList<>(valuesList); int index = 0; @@ -436,8 +431,7 @@ public static > A containsValues(A assertion, Writab for (Value obj : list) { if (found || !Values.areEqual(obj, val)) { newList.add(obj); - } - else { + } else { found = true; } } diff --git a/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnEquality.java b/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnEquality.java index a7f978c0..3fd0b408 100644 --- a/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnEquality.java +++ b/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnEquality.java @@ -8,21 +8,25 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions.impl; -import org.assertj.core.api.WritableAssertionInfo; -import org.assertj.core.internal.Failures; -import org.assertj.db.api.AbstractAssert; -import org.assertj.db.type.*; -import org.assertj.db.util.Values; +import static org.assertj.db.error.ShouldBeEqual.shouldBeEqual; +import static org.assertj.db.util.Values.areEqual; import java.util.List; import java.util.UUID; -import static org.assertj.db.error.ShouldBeEqual.shouldBeEqual; -import static org.assertj.db.util.Values.areEqual; +import org.assertj.core.api.WritableAssertionInfo; +import org.assertj.core.internal.Failures; +import org.assertj.db.api.AbstractAssert; +import org.assertj.db.type.DateTimeValue; +import org.assertj.db.type.DateValue; +import org.assertj.db.type.TimeValue; +import org.assertj.db.type.Value; +import org.assertj.db.type.ValueType; +import org.assertj.db.util.Values; /** * Implements the assertion methods on the equality of a column. @@ -52,12 +56,12 @@ private AssertionsOnColumnEquality() { * @param assertion The assertion which call this method. * @param info Writable information about an assertion. * @param valuesList The list of values. - * @param expected The expected object values. + * @param expected The expected object values. * @return {@code this} assertion object. * @throws AssertionError If the values of the column are not equal to the objects in parameter. */ public static > A hasValues(A assertion, WritableAssertionInfo info, - List valuesList, Object... expected) { + List valuesList, Object... expected) { AssertionsOnNumberOfRows.hasNumberOfRows(assertion, info, valuesList.size(), expected.length); int index = 0; for (Value value : valuesList) { @@ -79,12 +83,12 @@ public static > A hasValues(A assertion, WritableAss * @param assertion The assertion which call this method. * @param info Writable information about an assertion. * @param valuesList The list of values. - * @param expected The expected boolean values. + * @param expected The expected boolean values. * @return {@code this} assertion object. * @throws AssertionError If the values of the column are not equal to the booleans in parameter. */ public static > A hasValues(A assertion, WritableAssertionInfo info, - List valuesList, Boolean... expected) { + List valuesList, Boolean... expected) { AssertionsOnColumnType.isBoolean(assertion, info, valuesList, true); AssertionsOnNumberOfRows.hasNumberOfRows(assertion, info, valuesList.size(), expected.length); int index = 0; @@ -104,21 +108,21 @@ public static > A hasValues(A assertion, WritableAss * @param assertion The assertion which call this method. * @param info Writable information about an assertion. * @param valuesList The list of values. - * @param expected The expected numbers values. + * @param expected The expected numbers values. * @return {@code this} assertion object. * @throws AssertionError If the values of the column are not equal to the numbers in parameter. */ public static > A hasValues(A assertion, WritableAssertionInfo info, - List valuesList, Number... expected) { + List valuesList, Number... expected) { AssertionsOnColumnType.isNumber(assertion, info, valuesList, true); AssertionsOnNumberOfRows.hasNumberOfRows(assertion, info, valuesList.size(), expected.length); int index = 0; for (Value value : valuesList) { if (!areEqual(value, expected[index])) { throw failures.failure(info, - shouldBeEqual(index, - Values.getRepresentationFromValueInFrontOfExpected(value, expected[index]), - expected[index])); + shouldBeEqual(index, + Values.getRepresentationFromValueInFrontOfExpected(value, expected[index]), + expected[index])); } index++; } @@ -132,12 +136,12 @@ public static > A hasValues(A assertion, WritableAss * @param assertion The assertion which call this method. * @param info Writable information about an assertion. * @param valuesList The list of values. - * @param expected The expected bytes values. + * @param expected The expected bytes values. * @return {@code this} assertion object. * @throws AssertionError If the values of the column are not equal to the bytes in parameter. */ public static > A hasValues(A assertion, WritableAssertionInfo info, - List valuesList, byte[]... expected) { + List valuesList, byte[]... expected) { AssertionsOnColumnType.isBytes(assertion, info, valuesList, true); AssertionsOnNumberOfRows.hasNumberOfRows(assertion, info, valuesList.size(), expected.length); int index = 0; @@ -157,21 +161,21 @@ public static > A hasValues(A assertion, WritableAss * @param assertion The assertion which call this method. * @param info Writable information about an assertion. * @param valuesList The list of values. - * @param expected The expected text values. + * @param expected The expected text values. * @return {@code this} assertion object. * @throws AssertionError If the values of the column are not equal to the texts in parameter. */ public static > A hasValues(A assertion, WritableAssertionInfo info, - List valuesList, String... expected) { + List valuesList, String... expected) { AssertionsOnColumnType.isOfAnyTypeIn(assertion, info, valuesList, ValueType.TEXT, ValueType.NUMBER, ValueType.DATE, - ValueType.TIME, ValueType.DATE_TIME, ValueType.UUID, ValueType.NOT_IDENTIFIED); + ValueType.TIME, ValueType.DATE_TIME, ValueType.UUID, ValueType.NOT_IDENTIFIED); AssertionsOnNumberOfRows.hasNumberOfRows(assertion, info, valuesList.size(), expected.length); int index = 0; for (Value value : valuesList) { if (!areEqual(value, expected[index])) { throw failures.failure(info, - shouldBeEqual(index, Values.getRepresentationFromValueInFrontOfExpected(value, expected[index]), - expected[index])); + shouldBeEqual(index, Values.getRepresentationFromValueInFrontOfExpected(value, expected[index]), + expected[index])); } index++; } @@ -185,13 +189,13 @@ public static > A hasValues(A assertion, WritableAss * @param assertion The assertion which call this method. * @param info Writable information about an assertion. * @param valuesList The list of values. - * @param expected The expected character values. + * @param expected The expected character values. * @return {@code this} assertion object. * @throws AssertionError If the values of the column are not equal to the characters in parameter. * @since 1.2.0 */ public static > A hasValues(A assertion, WritableAssertionInfo info, - List valuesList, Character... expected) { + List valuesList, Character... expected) { AssertionsOnColumnType.isText(assertion, info, valuesList, true); AssertionsOnNumberOfRows.hasNumberOfRows(assertion, info, valuesList.size(), expected.length); int index = 0; @@ -211,21 +215,21 @@ public static > A hasValues(A assertion, WritableAss * @param assertion The assertion which call this method. * @param info Writable information about an assertion. * @param valuesList The list of values. - * @param expected The expected UUIDs values. + * @param expected The expected UUIDs values. * @return {@code this} assertion object. * @throws AssertionError If the values of the column are not equal to the UUIDs in parameter. * @since 1.1.0 */ public static > A hasValues(A assertion, WritableAssertionInfo info, - List valuesList, UUID... expected) { + List valuesList, UUID... expected) { AssertionsOnColumnType.isOfAnyTypeIn(assertion, info, valuesList, ValueType.UUID, ValueType.NOT_IDENTIFIED); AssertionsOnNumberOfRows.hasNumberOfRows(assertion, info, valuesList.size(), expected.length); int index = 0; for (Value value : valuesList) { if (!areEqual(value, expected[index])) { throw failures.failure(info, - shouldBeEqual(index, Values.getRepresentationFromValueInFrontOfExpected(value, expected[index]), - expected[index])); + shouldBeEqual(index, Values.getRepresentationFromValueInFrontOfExpected(value, expected[index]), + expected[index])); } index++; } @@ -239,20 +243,20 @@ public static > A hasValues(A assertion, WritableAss * @param assertion The assertion which call this method. * @param info Writable information about an assertion. * @param valuesList The list of values. - * @param expected The expected date values. + * @param expected The expected date values. * @return {@code this} assertion object. * @throws AssertionError If the values of the column are not equal to the date values in parameter. */ public static > A hasValues(A assertion, WritableAssertionInfo info, - List valuesList, DateValue... expected) { + List valuesList, DateValue... expected) { AssertionsOnColumnType - .isOfAnyTypeIn(assertion, info, valuesList, ValueType.DATE, ValueType.DATE_TIME, ValueType.NOT_IDENTIFIED); + .isOfAnyTypeIn(assertion, info, valuesList, ValueType.DATE, ValueType.DATE_TIME, ValueType.NOT_IDENTIFIED); AssertionsOnNumberOfRows.hasNumberOfRows(assertion, info, valuesList.size(), expected.length); int index = 0; for (Value value : valuesList) { if (!areEqual(value, expected[index])) { throw failures.failure(info, - shouldBeEqual(index, Values.getRepresentationFromValueInFrontOfExpected(value, expected[index]), expected[index])); + shouldBeEqual(index, Values.getRepresentationFromValueInFrontOfExpected(value, expected[index]), expected[index])); } index++; } @@ -266,21 +270,21 @@ public static > A hasValues(A assertion, WritableAss * @param assertion The assertion which call this method. * @param info Writable information about an assertion. * @param valuesList The list of values. - * @param expected The expected time values. + * @param expected The expected time values. * @return {@code this} assertion object. * @throws AssertionError If the values of the column are not equal to the time values in parameter. */ public static > A hasValues(A assertion, WritableAssertionInfo info, - List valuesList, TimeValue... expected) { + List valuesList, TimeValue... expected) { AssertionsOnColumnType.isOfAnyTypeIn(assertion, info, valuesList, ValueType.TIME, ValueType.NOT_IDENTIFIED); AssertionsOnNumberOfRows.hasNumberOfRows(assertion, info, valuesList.size(), expected.length); int index = 0; for (Value value : valuesList) { if (!areEqual(value, expected[index])) { throw failures.failure(info, - shouldBeEqual(index, - Values.getRepresentationFromValueInFrontOfExpected(value, expected[index]), - expected[index])); + shouldBeEqual(index, + Values.getRepresentationFromValueInFrontOfExpected(value, expected[index]), + expected[index])); } index++; } @@ -294,22 +298,22 @@ public static > A hasValues(A assertion, WritableAss * @param assertion The assertion which call this method. * @param info Writable information about an assertion. * @param valuesList The list of values. - * @param expected The expected date/time values. + * @param expected The expected date/time values. * @return {@code this} assertion object. * @throws AssertionError If the values of the column are not equal to the date/time values in parameter. */ public static > A hasValues(A assertion, WritableAssertionInfo info, - List valuesList, DateTimeValue... expected) { + List valuesList, DateTimeValue... expected) { AssertionsOnColumnType.isOfAnyTypeIn(assertion, info, valuesList, ValueType.DATE, ValueType.DATE_TIME, - ValueType.NOT_IDENTIFIED); + ValueType.NOT_IDENTIFIED); AssertionsOnNumberOfRows.hasNumberOfRows(assertion, info, valuesList.size(), expected.length); int index = 0; for (Value value : valuesList) { if (!areEqual(value, expected[index])) { throw failures.failure(info, - shouldBeEqual(index, - Values.getRepresentationFromValueInFrontOfExpected(value, expected[index]), - expected[index])); + shouldBeEqual(index, + Values.getRepresentationFromValueInFrontOfExpected(value, expected[index]), + expected[index])); } index++; } diff --git a/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnName.java b/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnName.java index 4b118a8d..042d1c75 100644 --- a/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnName.java +++ b/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnName.java @@ -8,17 +8,17 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions.impl; +import static org.assertj.db.error.ShouldHaveName.shouldHaveName; + import org.assertj.core.api.WritableAssertionInfo; import org.assertj.core.internal.Failures; import org.assertj.db.api.AbstractAssert; import org.assertj.db.type.lettercase.LetterCase; -import static org.assertj.db.error.ShouldHaveName.shouldHaveName; - /** * Implements the assertion method on the name of a column. * @@ -42,17 +42,17 @@ private AssertionsOnColumnName() { /** * Verifies that the name of a column is equal to the parameter. * - * @param The type of the assertion which call this method. - * @param assertion The assertion which call this method. - * @param info Writable information about an assertion. - * @param columnName The column name. - * @param expected The expected column name. + * @param The type of the assertion which call this method. + * @param assertion The assertion which call this method. + * @param info Writable information about an assertion. + * @param columnName The column name. + * @param expected The expected column name. * @param columnLetterCase The letter case of column. * @return {@code this} assertion object. * @throws AssertionError If the column name is not equal to the parameter. */ public static > A hasColumnName(A assertion, WritableAssertionInfo info, String columnName, - String expected, LetterCase columnLetterCase) { + String expected, LetterCase columnLetterCase) { if (expected == null) { throw new NullPointerException("Column name must be not null"); } diff --git a/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeClass.java b/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeClass.java index 9eb46080..bcc3aa3c 100644 --- a/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeClass.java +++ b/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeClass.java @@ -8,19 +8,19 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions.impl; +import static org.assertj.db.error.ShouldBeValueClassWithEndPoint.shouldBeValueClassWithEndPoint; +import static org.assertj.db.error.ShouldBeValueClassWithStartPoint.shouldBeValueClassWithStartPoint; + import org.assertj.core.api.WritableAssertionInfo; import org.assertj.core.internal.Failures; import org.assertj.db.api.AbstractAssert; import org.assertj.db.exception.AssertJDBException; import org.assertj.db.type.Value; -import static org.assertj.db.error.ShouldBeValueClassWithEndPoint.shouldBeValueClassWithEndPoint; -import static org.assertj.db.error.ShouldBeValueClassWithStartPoint.shouldBeValueClassWithStartPoint; - /** * Implements the assertion methods on the class of a column of a change. * @@ -44,21 +44,21 @@ private AssertionsOnColumnOfChangeClass() { /** * Verifies that the class of the values of the column is equal to the class in parameter. * - * @param The type of the assertion which call this method. - * @param assertion The assertion which call this method. - * @param info Writable information about an assertion. + * @param The type of the assertion which call this method. + * @param assertion The assertion which call this method. + * @param info Writable information about an assertion. * @param valueAtStartPoint The value at start point. * @param valueAtEndPoint The value at end point. - * @param expected The expected class to compare to. - * @param lenient {@code true} if the test is lenient : if the class of a value is not identified (for example when the - * value is {@code null}), it consider that it is ok. + * @param expected The expected class to compare to. + * @param lenient {@code true} if the test is lenient : if the class of a value is not identified (for example when the + * value is {@code null}), it consider that it is ok. * @return {@code this} assertion object. * @throws AssertionError If the class of the column is different to the class in parameter. * @since 1.1.0 */ public static > A isOfClass(A assertion, WritableAssertionInfo info, - Value valueAtStartPoint, Value valueAtEndPoint, - Class expected, boolean lenient) { + Value valueAtStartPoint, Value valueAtEndPoint, + Class expected, boolean lenient) { if (expected == null) { throw new AssertJDBException("Class of the column is null"); diff --git a/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeEquality.java b/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeEquality.java index 9c1c247d..81bb81c6 100644 --- a/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeEquality.java +++ b/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeEquality.java @@ -8,22 +8,26 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions.impl; +import static org.assertj.db.error.ShouldBeEqualWithEndPoint.shouldBeEqualWithEndPoint; +import static org.assertj.db.error.ShouldBeEqualWithStartPoint.shouldBeEqualWithStartPoint; +import static org.assertj.db.util.Values.areEqual; + +import java.util.UUID; + import org.assertj.core.api.WritableAssertionInfo; import org.assertj.core.internal.Failures; import org.assertj.db.api.AbstractAssert; -import org.assertj.db.type.*; +import org.assertj.db.type.DateTimeValue; +import org.assertj.db.type.DateValue; +import org.assertj.db.type.TimeValue; +import org.assertj.db.type.Value; +import org.assertj.db.type.ValueType; import org.assertj.db.util.Values; -import java.util.UUID; - -import static org.assertj.db.error.ShouldBeEqualWithEndPoint.shouldBeEqualWithEndPoint; -import static org.assertj.db.error.ShouldBeEqualWithStartPoint.shouldBeEqualWithStartPoint; -import static org.assertj.db.util.Values.areEqual; - /** * Implements the assertion methods on the equality of a column of a change. * @@ -58,8 +62,8 @@ private AssertionsOnColumnOfChangeEquality() { * @throws AssertionError If the values at start point and at end point are not equal to the object. */ public static > A hasValues(A assertion, WritableAssertionInfo info, - Value valueAtStartPoint, Value valueAtEndPoint, - Object expected) { + Value valueAtStartPoint, Value valueAtEndPoint, + Object expected) { if (expected != null) { AssertionsOnColumnOfChangeClass.isOfClass(assertion, info, valueAtStartPoint, valueAtEndPoint, expected.getClass(), true); @@ -87,20 +91,20 @@ public static > A hasValues(A assertion, WritableAss * @throws AssertionError If the values at start point and at end point are not equal to the corresponding objects. */ public static > A hasValues(A assertion, WritableAssertionInfo info, - Value valueAtStartPoint, Value valueAtEndPoint, - Object expectedAtStartPoint, Object expectedAtEndPoint) { + Value valueAtStartPoint, Value valueAtEndPoint, + Object expectedAtStartPoint, Object expectedAtEndPoint) { if (expectedAtStartPoint != null) { AssertionsOnColumnOfChangeClass.isOfClass(assertion, info, valueAtStartPoint, - Value.getNullValue(valueAtEndPoint.getColumnName(), - valueAtEndPoint.getColumnLetterCase()), - expectedAtStartPoint.getClass(), true); + Value.getNullValue(valueAtEndPoint.getColumnName(), + valueAtEndPoint.getColumnLetterCase()), + expectedAtStartPoint.getClass(), true); } if (expectedAtEndPoint != null) { AssertionsOnColumnOfChangeClass.isOfClass(assertion, info, - Value.getNullValue(valueAtStartPoint.getColumnName(), - valueAtStartPoint.getColumnLetterCase()), - valueAtEndPoint, expectedAtEndPoint.getClass(), true); + Value.getNullValue(valueAtStartPoint.getColumnName(), + valueAtStartPoint.getColumnLetterCase()), + valueAtEndPoint, expectedAtEndPoint.getClass(), true); } if (!areEqual(valueAtStartPoint, expectedAtStartPoint)) { throw failures.failure(info, shouldBeEqualWithStartPoint(valueAtStartPoint.getValue(), expectedAtStartPoint)); @@ -124,8 +128,8 @@ public static > A hasValues(A assertion, WritableAss * @throws AssertionError If the values at start point and at end point are not equal to the boolean. */ public static > A hasValues(A assertion, WritableAssertionInfo info, - Value valueAtStartPoint, Value valueAtEndPoint, - Boolean expected) { + Value valueAtStartPoint, Value valueAtEndPoint, + Boolean expected) { AssertionsOnColumnOfChangeType.isBoolean(assertion, info, valueAtStartPoint, valueAtEndPoint, true); if (!areEqual(valueAtStartPoint, expected)) { @@ -151,8 +155,8 @@ public static > A hasValues(A assertion, WritableAss * @throws AssertionError If the values at start point and at end point are not equal to the corresponding booleans. */ public static > A hasValues(A assertion, WritableAssertionInfo info, - Value valueAtStartPoint, Value valueAtEndPoint, - Boolean expectedAtStartPoint, Boolean expectedAtEndPoint) { + Value valueAtStartPoint, Value valueAtEndPoint, + Boolean expectedAtStartPoint, Boolean expectedAtEndPoint) { AssertionsOnColumnOfChangeType.isBoolean(assertion, info, valueAtStartPoint, valueAtEndPoint, true); if (!areEqual(valueAtStartPoint, expectedAtStartPoint)) { @@ -177,17 +181,17 @@ public static > A hasValues(A assertion, WritableAss * @throws AssertionError If the values at start point and at end point are not equal to the number. */ public static > A hasValues(A assertion, WritableAssertionInfo info, - Value valueAtStartPoint, Value valueAtEndPoint, - Number expected) { + Value valueAtStartPoint, Value valueAtEndPoint, + Number expected) { AssertionsOnColumnOfChangeType.isNumber(assertion, info, valueAtStartPoint, valueAtEndPoint, true); if (!areEqual(valueAtStartPoint, expected)) { throw failures.failure(info, shouldBeEqualWithStartPoint( - Values.getRepresentationFromValueInFrontOfExpected(valueAtStartPoint, expected), expected)); + Values.getRepresentationFromValueInFrontOfExpected(valueAtStartPoint, expected), expected)); } if (!areEqual(valueAtEndPoint, expected)) { throw failures.failure(info, shouldBeEqualWithEndPoint( - Values.getRepresentationFromValueInFrontOfExpected(valueAtEndPoint, expected), expected)); + Values.getRepresentationFromValueInFrontOfExpected(valueAtEndPoint, expected), expected)); } return assertion; } @@ -206,17 +210,17 @@ public static > A hasValues(A assertion, WritableAss * @throws AssertionError If the values at start point and at end point are not equal to the corresponding numbers. */ public static > A hasValues(A assertion, WritableAssertionInfo info, - Value valueAtStartPoint, Value valueAtEndPoint, - Number expectedAtStartPoint, Number expectedAtEndPoint) { + Value valueAtStartPoint, Value valueAtEndPoint, + Number expectedAtStartPoint, Number expectedAtEndPoint) { AssertionsOnColumnOfChangeType.isNumber(assertion, info, valueAtStartPoint, valueAtEndPoint, true); if (!areEqual(valueAtStartPoint, expectedAtStartPoint)) { throw failures.failure(info, shouldBeEqualWithStartPoint( - Values.getRepresentationFromValueInFrontOfExpected(valueAtStartPoint, expectedAtStartPoint), expectedAtStartPoint)); + Values.getRepresentationFromValueInFrontOfExpected(valueAtStartPoint, expectedAtStartPoint), expectedAtStartPoint)); } if (!areEqual(valueAtEndPoint, expectedAtEndPoint)) { throw failures.failure(info, shouldBeEqualWithEndPoint( - Values.getRepresentationFromValueInFrontOfExpected(valueAtEndPoint, expectedAtEndPoint), expectedAtEndPoint)); + Values.getRepresentationFromValueInFrontOfExpected(valueAtEndPoint, expectedAtEndPoint), expectedAtEndPoint)); } return assertion; } @@ -234,8 +238,8 @@ public static > A hasValues(A assertion, WritableAss * @throws AssertionError If the values at start point and at end point are not equal to the bytes. */ public static > A hasValues(A assertion, WritableAssertionInfo info, - Value valueAtStartPoint, Value valueAtEndPoint, - byte[] expected) { + Value valueAtStartPoint, Value valueAtEndPoint, + byte[] expected) { AssertionsOnColumnOfChangeType.isBytes(assertion, info, valueAtStartPoint, valueAtEndPoint, true); if (!areEqual(valueAtStartPoint, expected)) { @@ -261,8 +265,8 @@ public static > A hasValues(A assertion, WritableAss * @throws AssertionError If the values at start point and at end point are not equal to the corresponding bytes. */ public static > A hasValues(A assertion, WritableAssertionInfo info, - Value valueAtStartPoint, Value valueAtEndPoint, - byte[] expectedAtStartPoint, byte[] expectedAtEndPoint) { + Value valueAtStartPoint, Value valueAtEndPoint, + byte[] expectedAtStartPoint, byte[] expectedAtEndPoint) { AssertionsOnColumnOfChangeType.isBytes(assertion, info, valueAtStartPoint, valueAtEndPoint, true); if (!areEqual(valueAtStartPoint, expectedAtStartPoint)) { @@ -287,19 +291,19 @@ public static > A hasValues(A assertion, WritableAss * @throws AssertionError If the values at start point and at end point are not equal to the text. */ public static > A hasValues(A assertion, WritableAssertionInfo info, - Value valueAtStartPoint, Value valueAtEndPoint, - String expected) { + Value valueAtStartPoint, Value valueAtEndPoint, + String expected) { AssertionsOnColumnOfChangeType.isOfAnyTypeIn(assertion, info, valueAtStartPoint, valueAtEndPoint, - ValueType.TEXT, ValueType.NUMBER, ValueType.DATE, - ValueType.TIME, ValueType.DATE_TIME, ValueType.UUID, ValueType.NOT_IDENTIFIED); + ValueType.TEXT, ValueType.NUMBER, ValueType.DATE, + ValueType.TIME, ValueType.DATE_TIME, ValueType.UUID, ValueType.NOT_IDENTIFIED); if (!areEqual(valueAtStartPoint, expected)) { throw failures.failure(info, shouldBeEqualWithStartPoint( - Values.getRepresentationFromValueInFrontOfExpected(valueAtStartPoint, expected), expected)); + Values.getRepresentationFromValueInFrontOfExpected(valueAtStartPoint, expected), expected)); } if (!areEqual(valueAtEndPoint, expected)) { throw failures.failure(info, shouldBeEqualWithEndPoint( - Values.getRepresentationFromValueInFrontOfExpected(valueAtEndPoint, expected), expected)); + Values.getRepresentationFromValueInFrontOfExpected(valueAtEndPoint, expected), expected)); } return assertion; } @@ -318,19 +322,19 @@ public static > A hasValues(A assertion, WritableAss * @throws AssertionError If the values at start point and at end point are not equal to the corresponding texts. */ public static > A hasValues(A assertion, WritableAssertionInfo info, - Value valueAtStartPoint, Value valueAtEndPoint, - String expectedAtStartPoint, String expectedAtEndPoint) { + Value valueAtStartPoint, Value valueAtEndPoint, + String expectedAtStartPoint, String expectedAtEndPoint) { AssertionsOnColumnOfChangeType.isOfAnyTypeIn(assertion, info, valueAtStartPoint, valueAtEndPoint, - ValueType.TEXT, ValueType.NUMBER, ValueType.DATE, - ValueType.TIME, ValueType.DATE_TIME, ValueType.UUID, ValueType.NOT_IDENTIFIED); + ValueType.TEXT, ValueType.NUMBER, ValueType.DATE, + ValueType.TIME, ValueType.DATE_TIME, ValueType.UUID, ValueType.NOT_IDENTIFIED); if (!areEqual(valueAtStartPoint, expectedAtStartPoint)) { throw failures.failure(info, shouldBeEqualWithStartPoint( - Values.getRepresentationFromValueInFrontOfExpected(valueAtStartPoint, expectedAtStartPoint), expectedAtStartPoint)); + Values.getRepresentationFromValueInFrontOfExpected(valueAtStartPoint, expectedAtStartPoint), expectedAtStartPoint)); } if (!areEqual(valueAtEndPoint, expectedAtEndPoint)) { throw failures.failure(info, shouldBeEqualWithEndPoint( - Values.getRepresentationFromValueInFrontOfExpected(valueAtEndPoint, expectedAtEndPoint), expectedAtEndPoint)); + Values.getRepresentationFromValueInFrontOfExpected(valueAtEndPoint, expectedAtEndPoint), expectedAtEndPoint)); } return assertion; } @@ -349,8 +353,8 @@ public static > A hasValues(A assertion, WritableAss * @since 1.2.0 */ public static > A hasValues(A assertion, WritableAssertionInfo info, - Value valueAtStartPoint, Value valueAtEndPoint, - Character expected) { + Value valueAtStartPoint, Value valueAtEndPoint, + Character expected) { AssertionsOnColumnOfChangeType.isText(assertion, info, valueAtStartPoint, valueAtEndPoint, true); if (!areEqual(valueAtStartPoint, expected)) { @@ -377,8 +381,8 @@ public static > A hasValues(A assertion, WritableAss * @since 1.2.0 */ public static > A hasValues(A assertion, WritableAssertionInfo info, - Value valueAtStartPoint, Value valueAtEndPoint, - Character expectedAtStartPoint, Character expectedAtEndPoint) { + Value valueAtStartPoint, Value valueAtEndPoint, + Character expectedAtStartPoint, Character expectedAtEndPoint) { AssertionsOnColumnOfChangeType.isText(assertion, info, valueAtStartPoint, valueAtEndPoint, true); if (!areEqual(valueAtStartPoint, expectedAtStartPoint)) { @@ -403,18 +407,18 @@ public static > A hasValues(A assertion, WritableAss * @throws AssertionError If the values at start point and at end point are not equal to the date. */ public static > A hasValues(A assertion, WritableAssertionInfo info, - Value valueAtStartPoint, Value valueAtEndPoint, - DateValue expected) { + Value valueAtStartPoint, Value valueAtEndPoint, + DateValue expected) { AssertionsOnColumnOfChangeType - .isOfAnyTypeIn(assertion, info, valueAtStartPoint, valueAtEndPoint, ValueType.DATE, - ValueType.DATE_TIME, ValueType.NOT_IDENTIFIED); + .isOfAnyTypeIn(assertion, info, valueAtStartPoint, valueAtEndPoint, ValueType.DATE, + ValueType.DATE_TIME, ValueType.NOT_IDENTIFIED); if (!areEqual(valueAtStartPoint, expected)) { throw failures.failure(info, shouldBeEqualWithStartPoint( - Values.getRepresentationFromValueInFrontOfExpected(valueAtStartPoint, expected), expected)); + Values.getRepresentationFromValueInFrontOfExpected(valueAtStartPoint, expected), expected)); } if (!areEqual(valueAtEndPoint, expected)) { throw failures.failure(info, shouldBeEqualWithEndPoint( - Values.getRepresentationFromValueInFrontOfExpected(valueAtEndPoint, expected), expected)); + Values.getRepresentationFromValueInFrontOfExpected(valueAtEndPoint, expected), expected)); } return assertion; } @@ -433,18 +437,18 @@ public static > A hasValues(A assertion, WritableAss * @throws AssertionError If the values at start point and at end point are not equal to the corresponding dates. */ public static > A hasValues(A assertion, WritableAssertionInfo info, - Value valueAtStartPoint, Value valueAtEndPoint, - DateValue expectedAtStartPoint, DateValue expectedAtEndPoint) { + Value valueAtStartPoint, Value valueAtEndPoint, + DateValue expectedAtStartPoint, DateValue expectedAtEndPoint) { AssertionsOnColumnOfChangeType.isOfAnyTypeIn(assertion, info, valueAtStartPoint, valueAtEndPoint, ValueType.DATE, - ValueType.DATE_TIME, ValueType.NOT_IDENTIFIED); + ValueType.DATE_TIME, ValueType.NOT_IDENTIFIED); if (!areEqual(valueAtStartPoint, expectedAtStartPoint)) { throw failures.failure(info, shouldBeEqualWithStartPoint( - Values.getRepresentationFromValueInFrontOfExpected(valueAtStartPoint, expectedAtStartPoint), expectedAtStartPoint)); + Values.getRepresentationFromValueInFrontOfExpected(valueAtStartPoint, expectedAtStartPoint), expectedAtStartPoint)); } if (!areEqual(valueAtEndPoint, expectedAtEndPoint)) { throw failures.failure(info, shouldBeEqualWithEndPoint( - Values.getRepresentationFromValueInFrontOfExpected(valueAtEndPoint, expectedAtEndPoint), expectedAtEndPoint)); + Values.getRepresentationFromValueInFrontOfExpected(valueAtEndPoint, expectedAtEndPoint), expectedAtEndPoint)); } return assertion; } @@ -462,18 +466,18 @@ public static > A hasValues(A assertion, WritableAss * @throws AssertionError If the values at start point and at end point are not equal to the time. */ public static > A hasValues(A assertion, WritableAssertionInfo info, - Value valueAtStartPoint, Value valueAtEndPoint, - TimeValue expected) { + Value valueAtStartPoint, Value valueAtEndPoint, + TimeValue expected) { AssertionsOnColumnOfChangeType.isOfAnyTypeIn(assertion, info, valueAtStartPoint, valueAtEndPoint, ValueType.TIME, - ValueType.NOT_IDENTIFIED); + ValueType.NOT_IDENTIFIED); if (!areEqual(valueAtStartPoint, expected)) { throw failures.failure(info, shouldBeEqualWithStartPoint( - Values.getRepresentationFromValueInFrontOfExpected(valueAtStartPoint, expected), expected)); + Values.getRepresentationFromValueInFrontOfExpected(valueAtStartPoint, expected), expected)); } if (!areEqual(valueAtEndPoint, expected)) { throw failures.failure(info, shouldBeEqualWithEndPoint( - Values.getRepresentationFromValueInFrontOfExpected(valueAtEndPoint, expected), expected)); + Values.getRepresentationFromValueInFrontOfExpected(valueAtEndPoint, expected), expected)); } return assertion; } @@ -492,18 +496,18 @@ public static > A hasValues(A assertion, WritableAss * @throws AssertionError If the values at start point and at end point are not equal to the corresponding times. */ public static > A hasValues(A assertion, WritableAssertionInfo info, - Value valueAtStartPoint, Value valueAtEndPoint, - TimeValue expectedAtStartPoint, TimeValue expectedAtEndPoint) { + Value valueAtStartPoint, Value valueAtEndPoint, + TimeValue expectedAtStartPoint, TimeValue expectedAtEndPoint) { AssertionsOnColumnOfChangeType.isOfAnyTypeIn(assertion, info, valueAtStartPoint, valueAtEndPoint, ValueType.TIME, - ValueType.NOT_IDENTIFIED); + ValueType.NOT_IDENTIFIED); if (!areEqual(valueAtStartPoint, expectedAtStartPoint)) { throw failures.failure(info, shouldBeEqualWithStartPoint( - Values.getRepresentationFromValueInFrontOfExpected(valueAtStartPoint, expectedAtStartPoint), expectedAtStartPoint)); + Values.getRepresentationFromValueInFrontOfExpected(valueAtStartPoint, expectedAtStartPoint), expectedAtStartPoint)); } if (!areEqual(valueAtEndPoint, expectedAtEndPoint)) { throw failures.failure(info, shouldBeEqualWithEndPoint( - Values.getRepresentationFromValueInFrontOfExpected(valueAtEndPoint, expectedAtEndPoint), expectedAtEndPoint)); + Values.getRepresentationFromValueInFrontOfExpected(valueAtEndPoint, expectedAtEndPoint), expectedAtEndPoint)); } return assertion; } @@ -521,18 +525,18 @@ public static > A hasValues(A assertion, WritableAss * @throws AssertionError If the values at start point and at end point are not equal to the date/time. */ public static > A hasValues(A assertion, WritableAssertionInfo info, - Value valueAtStartPoint, Value valueAtEndPoint, - DateTimeValue expected) { + Value valueAtStartPoint, Value valueAtEndPoint, + DateTimeValue expected) { AssertionsOnColumnOfChangeType.isOfAnyTypeIn(assertion, info, valueAtStartPoint, valueAtEndPoint, - ValueType.DATE, ValueType.DATE_TIME, ValueType.NOT_IDENTIFIED); + ValueType.DATE, ValueType.DATE_TIME, ValueType.NOT_IDENTIFIED); if (!areEqual(valueAtStartPoint, expected)) { throw failures.failure(info, shouldBeEqualWithStartPoint( - Values.getRepresentationFromValueInFrontOfExpected(valueAtStartPoint, expected), expected)); + Values.getRepresentationFromValueInFrontOfExpected(valueAtStartPoint, expected), expected)); } if (!areEqual(valueAtEndPoint, expected)) { throw failures.failure(info, shouldBeEqualWithEndPoint( - Values.getRepresentationFromValueInFrontOfExpected(valueAtEndPoint, expected), expected)); + Values.getRepresentationFromValueInFrontOfExpected(valueAtEndPoint, expected), expected)); } return assertion; } @@ -551,19 +555,19 @@ public static > A hasValues(A assertion, WritableAss * @throws AssertionError If the values at start point and at end point are not equal to the corresponding dates/times. */ public static > A hasValues(A assertion, WritableAssertionInfo info, - Value valueAtStartPoint, Value valueAtEndPoint, - DateTimeValue expectedAtStartPoint, - DateTimeValue expectedAtEndPoint) { + Value valueAtStartPoint, Value valueAtEndPoint, + DateTimeValue expectedAtStartPoint, + DateTimeValue expectedAtEndPoint) { AssertionsOnColumnOfChangeType.isOfAnyTypeIn(assertion, info, valueAtStartPoint, valueAtEndPoint, - ValueType.DATE, ValueType.DATE_TIME, ValueType.NOT_IDENTIFIED); + ValueType.DATE, ValueType.DATE_TIME, ValueType.NOT_IDENTIFIED); if (!areEqual(valueAtStartPoint, expectedAtStartPoint)) { throw failures.failure(info, shouldBeEqualWithStartPoint( - Values.getRepresentationFromValueInFrontOfExpected(valueAtStartPoint, expectedAtStartPoint), expectedAtStartPoint)); + Values.getRepresentationFromValueInFrontOfExpected(valueAtStartPoint, expectedAtStartPoint), expectedAtStartPoint)); } if (!areEqual(valueAtEndPoint, expectedAtEndPoint)) { throw failures.failure(info, shouldBeEqualWithEndPoint( - Values.getRepresentationFromValueInFrontOfExpected(valueAtEndPoint, expectedAtEndPoint), expectedAtEndPoint)); + Values.getRepresentationFromValueInFrontOfExpected(valueAtEndPoint, expectedAtEndPoint), expectedAtEndPoint)); } return assertion; } @@ -582,18 +586,18 @@ public static > A hasValues(A assertion, WritableAss * @since 1.1.0 */ public static > A hasValues(A assertion, WritableAssertionInfo info, - Value valueAtStartPoint, Value valueAtEndPoint, - UUID expected) { + Value valueAtStartPoint, Value valueAtEndPoint, + UUID expected) { AssertionsOnColumnOfChangeType.isOfAnyTypeIn(assertion, info, valueAtStartPoint, valueAtEndPoint, - ValueType.UUID, ValueType.NOT_IDENTIFIED); + ValueType.UUID, ValueType.NOT_IDENTIFIED); if (!areEqual(valueAtStartPoint, expected)) { throw failures.failure(info, shouldBeEqualWithStartPoint( - Values.getRepresentationFromValueInFrontOfExpected(valueAtStartPoint, expected), expected)); + Values.getRepresentationFromValueInFrontOfExpected(valueAtStartPoint, expected), expected)); } if (!areEqual(valueAtEndPoint, expected)) { throw failures.failure(info, shouldBeEqualWithEndPoint( - Values.getRepresentationFromValueInFrontOfExpected(valueAtEndPoint, expected), expected)); + Values.getRepresentationFromValueInFrontOfExpected(valueAtEndPoint, expected), expected)); } return assertion; } @@ -613,19 +617,19 @@ public static > A hasValues(A assertion, WritableAss * @since 1.1.0 */ public static > A hasValues(A assertion, WritableAssertionInfo info, - Value valueAtStartPoint, Value valueAtEndPoint, - UUID expectedAtStartPoint, UUID expectedAtEndPoint) { + Value valueAtStartPoint, Value valueAtEndPoint, + UUID expectedAtStartPoint, UUID expectedAtEndPoint) { AssertionsOnColumnOfChangeType.isOfAnyTypeIn(assertion, info, valueAtStartPoint, valueAtEndPoint, - ValueType.UUID, ValueType.NOT_IDENTIFIED); + ValueType.UUID, ValueType.NOT_IDENTIFIED); if (!areEqual(valueAtStartPoint, expectedAtStartPoint)) { throw failures.failure(info, shouldBeEqualWithStartPoint( - Values.getRepresentationFromValueInFrontOfExpected(valueAtStartPoint, expectedAtStartPoint), - expectedAtStartPoint)); + Values.getRepresentationFromValueInFrontOfExpected(valueAtStartPoint, expectedAtStartPoint), + expectedAtStartPoint)); } if (!areEqual(valueAtEndPoint, expectedAtEndPoint)) { throw failures.failure(info, shouldBeEqualWithEndPoint( - Values.getRepresentationFromValueInFrontOfExpected(valueAtEndPoint, expectedAtEndPoint), expectedAtEndPoint)); + Values.getRepresentationFromValueInFrontOfExpected(valueAtEndPoint, expectedAtEndPoint), expectedAtEndPoint)); } return assertion; } diff --git a/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeType.java b/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeType.java index 2f92d2af..e4847e61 100644 --- a/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeType.java +++ b/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnOfChangeType.java @@ -8,21 +8,21 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions.impl; +import static org.assertj.db.error.ShouldBeValueTypeOfAnyWithEndPoint.shouldBeValueTypeOfAnyWithEndPoint; +import static org.assertj.db.error.ShouldBeValueTypeOfAnyWithStartPoint.shouldBeValueTypeOfAnyWithStartPoint; +import static org.assertj.db.error.ShouldBeValueTypeWithEndPoint.shouldBeValueTypeWithEndPoint; +import static org.assertj.db.error.ShouldBeValueTypeWithStartPoint.shouldBeValueTypeWithStartPoint; + import org.assertj.core.api.WritableAssertionInfo; import org.assertj.core.internal.Failures; import org.assertj.db.api.AbstractAssert; import org.assertj.db.type.Value; import org.assertj.db.type.ValueType; -import static org.assertj.db.error.ShouldBeValueTypeOfAnyWithEndPoint.shouldBeValueTypeOfAnyWithEndPoint; -import static org.assertj.db.error.ShouldBeValueTypeOfAnyWithStartPoint.shouldBeValueTypeOfAnyWithStartPoint; -import static org.assertj.db.error.ShouldBeValueTypeWithEndPoint.shouldBeValueTypeWithEndPoint; -import static org.assertj.db.error.ShouldBeValueTypeWithStartPoint.shouldBeValueTypeWithStartPoint; - /** * Implements the assertion methods on the type of a column of a change. *

The different type of values are enumerated in {@link org.assertj.db.type.ValueType}.

@@ -48,20 +48,20 @@ private AssertionsOnColumnOfChangeType() { /** * Verifies that the type of the values of the column is equal to the type in parameter. * - * @param
The type of the assertion which call this method. - * @param assertion The assertion which call this method. - * @param info Writable information about an assertion. + * @param The type of the assertion which call this method. + * @param assertion The assertion which call this method. + * @param info Writable information about an assertion. * @param valueAtStartPoint The value at start point. * @param valueAtEndPoint The value at end point. - * @param expected The expected type to compare to. - * @param lenient {@code true} if the test is lenient : if the type of a value is not identified (for example when the - * value is {@code null}), it consider that it is ok. + * @param expected The expected type to compare to. + * @param lenient {@code true} if the test is lenient : if the type of a value is not identified (for example when the + * value is {@code null}), it consider that it is ok. * @return {@code this} assertion object. * @throws AssertionError If the type of the column is different to the type in parameter. */ public static > A isOfType(A assertion, WritableAssertionInfo info, - Value valueAtStartPoint, Value valueAtEndPoint, - ValueType expected, boolean lenient) { + Value valueAtStartPoint, Value valueAtEndPoint, + ValueType expected, boolean lenient) { if (lenient) { return isOfAnyTypeIn(assertion, info, valueAtStartPoint, valueAtEndPoint, expected, ValueType.NOT_IDENTIFIED); } @@ -81,18 +81,18 @@ public static > A isOfType(A assertion, WritableAsse /** * Verifies that the type of the column is equal to one of the types in parameters. * - * @param The type of the assertion which call this method. - * @param assertion The assertion which call this method. - * @param info Writable information about an assertion. + * @param The type of the assertion which call this method. + * @param assertion The assertion which call this method. + * @param info Writable information about an assertion. * @param valueAtStartPoint The value at start point. * @param valueAtEndPoint The value at end point. - * @param expected The expected types to compare to. + * @param expected The expected types to compare to. * @return {@code this} assertion object. * @throws AssertionError If the type of the column is different to all the types in parameters. */ public static > A isOfAnyTypeIn(A assertion, WritableAssertionInfo info, - Value valueAtStartPoint, Value valueAtEndPoint, - ValueType... expected) { + Value valueAtStartPoint, Value valueAtEndPoint, + ValueType... expected) { ValueType typeAtStartPoint = valueAtStartPoint.getValueType(); boolean matched = false; for (ValueType valueType : expected) { @@ -121,153 +121,153 @@ public static > A isOfAnyTypeIn(A assertion, Writabl /** * Verifies that the type of the values of the column is number. * - * @param The type of the assertion which call this method. - * @param assertion The assertion which call this method. - * @param info Writable information about an assertion. + * @param The type of the assertion which call this method. + * @param assertion The assertion which call this method. + * @param info Writable information about an assertion. * @param valueAtStartPoint The value at start point. * @param valueAtEndPoint The value at end point. - * @param lenient {@code true} if the test is lenient : if the type of a value is not identified (for example when the - * value is {@code null}), it consider that it is ok. + * @param lenient {@code true} if the test is lenient : if the type of a value is not identified (for example when the + * value is {@code null}), it consider that it is ok. * @return {@code this} assertion object. * @throws AssertionError If the type of the column is not number. */ public static > A isNumber(A assertion, WritableAssertionInfo info, - Value valueAtStartPoint, Value valueAtEndPoint, - boolean lenient) { + Value valueAtStartPoint, Value valueAtEndPoint, + boolean lenient) { return isOfType(assertion, info, valueAtStartPoint, valueAtEndPoint, ValueType.NUMBER, lenient); } /** * Verifies that the type of the values of the column is boolean. * - * @param The type of the assertion which call this method. - * @param assertion The assertion which call this method. - * @param info Writable information about an assertion. + * @param The type of the assertion which call this method. + * @param assertion The assertion which call this method. + * @param info Writable information about an assertion. * @param valueAtStartPoint The value at start point. * @param valueAtEndPoint The value at end point. - * @param lenient {@code true} if the test is lenient : if the type of a value is not identified (for example when the - * value is {@code null}), it consider that it is ok. + * @param lenient {@code true} if the test is lenient : if the type of a value is not identified (for example when the + * value is {@code null}), it consider that it is ok. * @return {@code this} assertion object. * @throws AssertionError If the type of the column is not boolean. */ public static > A isBoolean(A assertion, WritableAssertionInfo info, - Value valueAtStartPoint, Value valueAtEndPoint, - boolean lenient) { + Value valueAtStartPoint, Value valueAtEndPoint, + boolean lenient) { return isOfType(assertion, info, valueAtStartPoint, valueAtEndPoint, ValueType.BOOLEAN, lenient); } /** * Verifies that the type of the values of the column is date. * - * @param The type of the assertion which call this method. - * @param assertion The assertion which call this method. - * @param info Writable information about an assertion. + * @param The type of the assertion which call this method. + * @param assertion The assertion which call this method. + * @param info Writable information about an assertion. * @param valueAtStartPoint The value at start point. * @param valueAtEndPoint The value at end point. - * @param lenient {@code true} if the test is lenient : if the type of a value is not identified (for example when the - * value is {@code null}), it consider that it is ok. + * @param lenient {@code true} if the test is lenient : if the type of a value is not identified (for example when the + * value is {@code null}), it consider that it is ok. * @return {@code this} assertion object. * @throws AssertionError If the type of the column is not date. */ public static > A isDate(A assertion, WritableAssertionInfo info, - Value valueAtStartPoint, Value valueAtEndPoint, - boolean lenient) { + Value valueAtStartPoint, Value valueAtEndPoint, + boolean lenient) { return isOfType(assertion, info, valueAtStartPoint, valueAtEndPoint, ValueType.DATE, lenient); } /** * Verifies that the type of the values of the column is time. * - * @param The type of the assertion which call this method. - * @param assertion The assertion which call this method. - * @param info Writable information about an assertion. + * @param The type of the assertion which call this method. + * @param assertion The assertion which call this method. + * @param info Writable information about an assertion. * @param valueAtStartPoint The value at start point. * @param valueAtEndPoint The value at end point. - * @param lenient {@code true} if the test is lenient : if the type of a value is not identified (for example when the - * value is {@code null}), it consider that it is ok. + * @param lenient {@code true} if the test is lenient : if the type of a value is not identified (for example when the + * value is {@code null}), it consider that it is ok. * @return {@code this} assertion object. * @throws AssertionError If the type of the column is not time. */ public static > A isTime(A assertion, WritableAssertionInfo info, - Value valueAtStartPoint, Value valueAtEndPoint, - boolean lenient) { + Value valueAtStartPoint, Value valueAtEndPoint, + boolean lenient) { return isOfType(assertion, info, valueAtStartPoint, valueAtEndPoint, ValueType.TIME, lenient); } /** * Verifies that the type of the values of the column is date/time. * - * @param The type of the assertion which call this method. - * @param assertion The assertion which call this method. - * @param info Writable information about an assertion. + * @param The type of the assertion which call this method. + * @param assertion The assertion which call this method. + * @param info Writable information about an assertion. * @param valueAtStartPoint The value at start point. * @param valueAtEndPoint The value at end point. - * @param lenient {@code true} if the test is lenient : if the type of a value is not identified (for example when the - * value is {@code null}), it consider that it is ok. + * @param lenient {@code true} if the test is lenient : if the type of a value is not identified (for example when the + * value is {@code null}), it consider that it is ok. * @return {@code this} assertion object. * @throws AssertionError If the type of the column is not date/time. */ public static > A isDateTime(A assertion, WritableAssertionInfo info, - Value valueAtStartPoint, Value valueAtEndPoint, - boolean lenient) { + Value valueAtStartPoint, Value valueAtEndPoint, + boolean lenient) { return isOfType(assertion, info, valueAtStartPoint, valueAtEndPoint, ValueType.DATE_TIME, lenient); } /** * Verifies that the type of the values of the column is array of bytes. * - * @param The type of the assertion which call this method. - * @param assertion The assertion which call this method. - * @param info Writable information about an assertion. + * @param The type of the assertion which call this method. + * @param assertion The assertion which call this method. + * @param info Writable information about an assertion. * @param valueAtStartPoint The value at start point. * @param valueAtEndPoint The value at end point. - * @param lenient {@code true} if the test is lenient : if the type of a value is not identified (for example when the - * value is {@code null}), it consider that it is ok. + * @param lenient {@code true} if the test is lenient : if the type of a value is not identified (for example when the + * value is {@code null}), it consider that it is ok. * @return {@code this} assertion object. * @throws AssertionError If the type of the column is not array of bytes. */ public static > A isBytes(A assertion, WritableAssertionInfo info, - Value valueAtStartPoint, Value valueAtEndPoint, - boolean lenient) { + Value valueAtStartPoint, Value valueAtEndPoint, + boolean lenient) { return isOfType(assertion, info, valueAtStartPoint, valueAtEndPoint, ValueType.BYTES, lenient); } /** * Verifies that the type of the values of the column is text. * - * @param The type of the assertion which call this method. - * @param assertion The assertion which call this method. - * @param info Writable information about an assertion. + * @param The type of the assertion which call this method. + * @param assertion The assertion which call this method. + * @param info Writable information about an assertion. * @param valueAtStartPoint The value at start point. * @param valueAtEndPoint The value at end point. - * @param lenient {@code true} if the test is lenient : if the type of a value is not identified (for example when the - * value is {@code null}), it consider that it is ok. + * @param lenient {@code true} if the test is lenient : if the type of a value is not identified (for example when the + * value is {@code null}), it consider that it is ok. * @return {@code this} assertion object. * @throws AssertionError If the type of the column is not text. */ public static > A isText(A assertion, WritableAssertionInfo info, - Value valueAtStartPoint, Value valueAtEndPoint, - boolean lenient) { + Value valueAtStartPoint, Value valueAtEndPoint, + boolean lenient) { return isOfType(assertion, info, valueAtStartPoint, valueAtEndPoint, ValueType.TEXT, lenient); } /** * Verifies that the type of the values of the column is UUID. * - * @param The type of the assertion which call this method. - * @param assertion The assertion which call this method. - * @param info Writable information about an assertion. + * @param The type of the assertion which call this method. + * @param assertion The assertion which call this method. + * @param info Writable information about an assertion. * @param valueAtStartPoint The value at start point. * @param valueAtEndPoint The value at end point. - * @param lenient {@code true} if the test is lenient : if the type of a value is not identified (for example when the - * value is {@code null}), it consider that it is ok. + * @param lenient {@code true} if the test is lenient : if the type of a value is not identified (for example when the + * value is {@code null}), it consider that it is ok. * @return {@code this} assertion object. * @throws AssertionError If the type of the column is not UUID. * @since 1.1.0 */ public static > A isUUID(A assertion, WritableAssertionInfo info, - Value valueAtStartPoint, Value valueAtEndPoint, - boolean lenient) { + Value valueAtStartPoint, Value valueAtEndPoint, + boolean lenient) { return isOfType(assertion, info, valueAtStartPoint, valueAtEndPoint, ValueType.UUID, lenient); } diff --git a/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnType.java b/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnType.java index e6e0e779..665d3bf2 100644 --- a/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnType.java +++ b/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnColumnType.java @@ -8,10 +8,14 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions.impl; +import static org.assertj.db.error.ShouldBeValueTypeOfAny.shouldBeValueTypeOfAny; + +import java.util.List; + import org.assertj.core.api.WritableAssertionInfo; import org.assertj.core.internal.Failures; import org.assertj.db.api.AbstractAssert; @@ -19,10 +23,6 @@ import org.assertj.db.type.Value; import org.assertj.db.type.ValueType; -import java.util.List; - -import static org.assertj.db.error.ShouldBeValueTypeOfAny.shouldBeValueTypeOfAny; - /** * Implements the assertion methods on the type of a column. *

The different type of values are enumerated in {@link org.assertj.db.type.ValueType}.

@@ -46,7 +46,7 @@ private AssertionsOnColumnType() { } /** - /** + * /** * Verifies that the type of the values of the column is equal to the type in parameter. * * @param
The type of the assertion which call this method. @@ -60,7 +60,7 @@ private AssertionsOnColumnType() { * @throws AssertionError If the type of the column is different to the type in parameter. */ public static > A isOfType(A assertion, WritableAssertionInfo info, List valuesList, - ValueType expected, boolean lenient) { + ValueType expected, boolean lenient) { if (lenient) { return isOfAnyTypeIn(assertion, info, valuesList, expected, ValueType.NOT_IDENTIFIED); } @@ -70,7 +70,7 @@ public static > A isOfType(A assertion, WritableAsse ValueType type = value.getValueType(); if (type != expected) { throw failures.failure(info, ShouldBeValueType - .shouldBeValueType(index, value, type, expected)); + .shouldBeValueType(index, value, type, expected)); } index++; } @@ -89,7 +89,7 @@ public static > A isOfType(A assertion, WritableAsse * @throws AssertionError If the type of the column is different to all the types in parameters. */ public static > A isOfAnyTypeIn(A assertion, WritableAssertionInfo info, - List valuesList, ValueType... expected) { + List valuesList, ValueType... expected) { int index = 0; loop: for (Value value : valuesList) { @@ -118,7 +118,7 @@ public static > A isOfAnyTypeIn(A assertion, Writabl * @throws AssertionError If the type of the column is not number. */ public static > A isNumber(A assertion, WritableAssertionInfo info, List valuesList, - boolean lenient) { + boolean lenient) { return isOfType(assertion, info, valuesList, ValueType.NUMBER, lenient); } @@ -135,7 +135,7 @@ public static > A isNumber(A assertion, WritableAsse * @throws AssertionError If the type of the column is not boolean. */ public static > A isBoolean(A assertion, WritableAssertionInfo info, List valuesList, - boolean lenient) { + boolean lenient) { return isOfType(assertion, info, valuesList, ValueType.BOOLEAN, lenient); } @@ -152,7 +152,7 @@ public static > A isBoolean(A assertion, WritableAss * @throws AssertionError If the type of the column is not date. */ public static > A isDate(A assertion, WritableAssertionInfo info, List valuesList, - boolean lenient) { + boolean lenient) { return isOfType(assertion, info, valuesList, ValueType.DATE, lenient); } @@ -169,7 +169,7 @@ public static > A isDate(A assertion, WritableAssert * @throws AssertionError If the type of the column is not time. */ public static > A isTime(A assertion, WritableAssertionInfo info, List valuesList, - boolean lenient) { + boolean lenient) { return isOfType(assertion, info, valuesList, ValueType.TIME, lenient); } @@ -186,7 +186,7 @@ public static > A isTime(A assertion, WritableAssert * @throws AssertionError If the type of the column is not date/time. */ public static > A isDateTime(A assertion, WritableAssertionInfo info, - List valuesList, boolean lenient) { + List valuesList, boolean lenient) { return isOfType(assertion, info, valuesList, ValueType.DATE_TIME, lenient); } @@ -203,7 +203,7 @@ public static > A isDateTime(A assertion, WritableAs * @throws AssertionError If the type of the column is not array of bytes. */ public static > A isBytes(A assertion, WritableAssertionInfo info, List valuesList, - boolean lenient) { + boolean lenient) { return isOfType(assertion, info, valuesList, ValueType.BYTES, lenient); } @@ -220,7 +220,7 @@ public static > A isBytes(A assertion, WritableAsser * @throws AssertionError If the type of the column is not text. */ public static > A isText(A assertion, WritableAssertionInfo info, List valuesList, - boolean lenient) { + boolean lenient) { return isOfType(assertion, info, valuesList, ValueType.TEXT, lenient); } @@ -238,7 +238,7 @@ public static > A isText(A assertion, WritableAssert * @since 1.1.0 */ public static > A isUUID(A assertion, WritableAssertionInfo info, List valuesList, - boolean lenient) { + boolean lenient) { return isOfType(assertion, info, valuesList, ValueType.UUID, lenient); } diff --git a/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnDataType.java b/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnDataType.java index fc38f171..04017123 100644 --- a/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnDataType.java +++ b/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnDataType.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions.impl; +import static org.assertj.db.error.ShouldBeDataType.shouldBeDataType; +import static org.assertj.db.error.ShouldBeOnTable.shouldBeOnTable; + import org.assertj.core.api.WritableAssertionInfo; import org.assertj.core.internal.Failures; import org.assertj.db.api.AbstractAssert; @@ -19,9 +22,6 @@ import org.assertj.db.type.DataType; import org.assertj.db.type.lettercase.LetterCase; -import static org.assertj.db.error.ShouldBeDataType.shouldBeDataType; -import static org.assertj.db.error.ShouldBeOnTable.shouldBeOnTable; - /** * Implements the assertion methods on the type of data (from a table or from a request). *

The different type of data are enumerated in {@link org.assertj.db.type.DataType}.

@@ -55,7 +55,7 @@ private AssertionsOnDataType() { * @throws AssertionError If the type is different to the type in parameter. */ public static
> A isOnDataType(A assertion, WritableAssertionInfo info, Change change, - DataType expected) { + DataType expected) { DataType dataType = change.getDataType(); if (dataType != expected) { throw failures.failure(info, shouldBeDataType(expected, dataType)); @@ -94,18 +94,18 @@ public static > A isOnRequest(A assertion, WritableA /** * Verifies that the change is on a table with the name in parameter. * - * @param The type of the assertion which call this method. - * @param assertion The assertion which call this method. - * @param info Writable information about an assertion. - * @param change The change. + * @param The type of the assertion which call this method. + * @param assertion The assertion which call this method. + * @param info Writable information about an assertion. + * @param change The change. * @param tableLetterCase The letter case of table. - * @param name The name of the table on which is the change. + * @param name The name of the table on which is the change. * @return {@code this} assertion object. * @throws AssertionError If the type of data is not table or if the table have a different name. * @throws java.lang.NullPointerException If the name in parameter is {@code null}. */ public static > A isOnTable(A assertion, WritableAssertionInfo info, Change change, - LetterCase tableLetterCase, String name) { + LetterCase tableLetterCase, String name) { if (name == null) { throw new NullPointerException("Table name must be not null"); } diff --git a/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnModifiedColumn.java b/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnModifiedColumn.java index faab0d58..c9167d12 100644 --- a/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnModifiedColumn.java +++ b/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnModifiedColumn.java @@ -8,18 +8,18 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions.impl; +import static org.assertj.db.error.ShouldBeModified.shouldBeModified; +import static org.assertj.db.error.ShouldNotBeModified.shouldNotBeModified; + import org.assertj.core.api.WritableAssertionInfo; import org.assertj.core.internal.Failures; import org.assertj.db.api.AbstractAssert; import org.assertj.db.type.Value; -import static org.assertj.db.error.ShouldBeModified.shouldBeModified; -import static org.assertj.db.error.ShouldNotBeModified.shouldNotBeModified; - /** * Implements the assertion methods on a modified column. * @@ -52,9 +52,9 @@ private AssertionsOnModifiedColumn() { * @throws AssertionError If the column is not modified between the start point and the end point. */ public static > A isModified(A assertion, WritableAssertionInfo info, - Value valueAtStartPoint, Value valueAtEndPoint) { + Value valueAtStartPoint, Value valueAtEndPoint) { if ((valueAtStartPoint.getValue() == null && valueAtEndPoint.getValue() == null) - || (valueAtStartPoint.getValue() != null && valueAtStartPoint.getValue().equals(valueAtEndPoint.getValue()))) { + || (valueAtStartPoint.getValue() != null && valueAtStartPoint.getValue().equals(valueAtEndPoint.getValue()))) { throw failures.failure(info, shouldBeModified(valueAtStartPoint, valueAtEndPoint)); } @@ -73,9 +73,9 @@ public static > A isModified(A assertion, WritableAs * @throws AssertionError If the column is modified between the start point and the end point. */ public static > A isNotModified(A assertion, WritableAssertionInfo info, - Value valueAtStartPoint, Value valueAtEndPoint) { + Value valueAtStartPoint, Value valueAtEndPoint) { if ((valueAtStartPoint.getValue() == null && valueAtEndPoint.getValue() != null) - || (valueAtStartPoint.getValue() != null && !valueAtStartPoint.getValue().equals(valueAtEndPoint.getValue()))) { + || (valueAtStartPoint.getValue() != null && !valueAtStartPoint.getValue().equals(valueAtEndPoint.getValue()))) { throw failures.failure(info, shouldNotBeModified(valueAtStartPoint, valueAtEndPoint)); } diff --git a/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnModifiedColumns.java b/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnModifiedColumns.java index 2935a3df..f0caf623 100644 --- a/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnModifiedColumns.java +++ b/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnModifiedColumns.java @@ -8,19 +8,10 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions.impl; -import org.assertj.core.api.WritableAssertionInfo; -import org.assertj.core.internal.Failures; -import org.assertj.db.api.AbstractAssert; -import org.assertj.db.type.Change; -import org.assertj.db.type.lettercase.LetterCase; -import org.assertj.db.util.Changes; - -import java.util.*; - import static org.assertj.db.error.ShouldHaveModifications.shouldHaveModifications; import static org.assertj.db.error.ShouldHaveNumberOfModifications.shouldHaveNumberOfModifications; import static org.assertj.db.error.ShouldHaveNumberOfModificationsGreater.shouldHaveNumberOfModificationsGreater; @@ -28,6 +19,19 @@ import static org.assertj.db.error.ShouldHaveNumberOfModificationsLess.shouldHaveNumberOfModificationsLess; import static org.assertj.db.error.ShouldHaveNumberOfModificationsLessOrEqual.shouldHaveNumberOfModificationsLessOrEqual; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.Iterator; +import java.util.List; + +import org.assertj.core.api.WritableAssertionInfo; +import org.assertj.core.internal.Failures; +import org.assertj.db.api.AbstractAssert; +import org.assertj.db.type.Change; +import org.assertj.db.type.lettercase.LetterCase; +import org.assertj.db.util.Changes; + /** * Implements the assertion methods on modified columns. * @@ -61,7 +65,7 @@ private AssertionsOnModifiedColumns() { * @throws AssertionError If the number of modified columns is different to the number in parameter. */ public static > A hasNumberOfModifiedColumns(A assertion, WritableAssertionInfo info, - Change change, int number) { + Change change, int number) { Integer[] indexesOfModifiedColumns = Changes.getIndexesOfModifiedColumns(change); if (number != indexesOfModifiedColumns.length) { @@ -83,7 +87,7 @@ public static > A hasNumberOfModifiedColumns(A asser * @throws AssertionError If the number of modified columns is less than or equal to the number in parameter. */ public static > A hasNumberOfModifiedColumnsGreaterThan(A assertion, WritableAssertionInfo info, - Change change, int number) { + Change change, int number) { Integer[] indexesOfModifiedColumns = Changes.getIndexesOfModifiedColumns(change); if (number >= indexesOfModifiedColumns.length) { @@ -105,7 +109,7 @@ public static > A hasNumberOfModifiedColumnsGreaterT * @throws AssertionError If the number of modified columns is greater than or equal to the number in parameter. */ public static > A hasNumberOfModifiedColumnsLessThan(A assertion, WritableAssertionInfo info, - Change change, int number) { + Change change, int number) { Integer[] indexesOfModifiedColumns = Changes.getIndexesOfModifiedColumns(change); if (number <= indexesOfModifiedColumns.length) { @@ -127,12 +131,12 @@ public static > A hasNumberOfModifiedColumnsLessThan * @throws AssertionError If the number of modified columns is less than the number in parameter. */ public static > A hasNumberOfModifiedColumnsGreaterThanOrEqualTo(A assertion, WritableAssertionInfo info, - Change change, int number) { + Change change, int number) { Integer[] indexesOfModifiedColumns = Changes.getIndexesOfModifiedColumns(change); if (number > indexesOfModifiedColumns.length) { throw failures.failure(info, shouldHaveNumberOfModificationsGreaterOrEqual(indexesOfModifiedColumns.length, - number)); + number)); } return assertion; } @@ -150,7 +154,7 @@ public static > A hasNumberOfModifiedColumnsGreaterT * @throws AssertionError If the number of modified columns is greater than the number in parameter. */ public static > A hasNumberOfModifiedColumnsLessThanOrEqualTo(A assertion, WritableAssertionInfo info, - Change change, int number) { + Change change, int number) { Integer[] indexesOfModifiedColumns = Changes.getIndexesOfModifiedColumns(change); if (number < indexesOfModifiedColumns.length) { @@ -172,7 +176,7 @@ public static > A hasNumberOfModifiedColumnsLessThan * @throws AssertionError If the indexes of the modified columns are different to the indexes in parameters. */ public static > A hasModifiedColumns(A assertion, WritableAssertionInfo info, Change change, - Integer... indexes) { + Integer... indexes) { if (indexes == null) { throw new NullPointerException("Columns indexes must be not null"); } @@ -204,17 +208,17 @@ public static > A hasModifiedColumns(A assertion, Wr * Verifies that the names of columns with a modification in the values between the start point and the end point * is equals to the parameters. * - * @param The type of the assertion which call this method. - * @param assertion The assertion which call this method. - * @param info Writable information about an assertion. - * @param change The change. + * @param The type of the assertion which call this method. + * @param assertion The assertion which call this method. + * @param info Writable information about an assertion. + * @param change The change. * @param columnLetterCase Letter case of the column names. - * @param names The names of the modified columns. + * @param names The names of the modified columns. * @return {@code this} assertion object. * @throws AssertionError If the names of the modified columns are different to the names in parameters. */ public static > A hasModifiedColumns(A assertion, WritableAssertionInfo info, Change change, - LetterCase columnLetterCase, String... names) { + LetterCase columnLetterCase, String... names) { if (names == null) { throw new NullPointerException("Columns names must be not null"); } diff --git a/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnNumberOfChanges.java b/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnNumberOfChanges.java index bc760ff5..774c0c72 100644 --- a/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnNumberOfChanges.java +++ b/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnNumberOfChanges.java @@ -8,24 +8,24 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions.impl; -import org.assertj.core.api.WritableAssertionInfo; -import org.assertj.core.internal.Failures; -import org.assertj.db.api.AbstractAssert; -import org.assertj.db.type.Change; -import org.assertj.db.type.Changes; - -import java.util.List; - import static org.assertj.db.error.ShouldHaveChangesSize.shouldHaveChangesSize; import static org.assertj.db.error.ShouldHaveChangesSizeGreater.shouldHaveChangesSizeGreater; import static org.assertj.db.error.ShouldHaveChangesSizeGreaterOrEqual.shouldHaveChangesSizeGreaterOrEqual; import static org.assertj.db.error.ShouldHaveChangesSizeLess.shouldHaveChangesSizeLess; import static org.assertj.db.error.ShouldHaveChangesSizeLessOrEqual.shouldHaveChangesSizeLessOrEqual; +import java.util.List; + +import org.assertj.core.api.WritableAssertionInfo; +import org.assertj.core.internal.Failures; +import org.assertj.db.api.AbstractAssert; +import org.assertj.db.type.Change; +import org.assertj.db.type.Changes; + /** * Implements the assertion method on the number of changes. * @@ -58,7 +58,7 @@ private AssertionsOnNumberOfChanges() { * @throws AssertionError If the number of changes is different to the number in parameter. */ public static > A hasNumberOfChanges(A assertion, WritableAssertionInfo info, - Changes changes, int expected) { + Changes changes, int expected) { List changesList = changes.getChangesList(); int size = changesList.size(); if (size != expected) { @@ -79,7 +79,7 @@ public static > A hasNumberOfChanges(A assertion, Wr * @throws AssertionError If the number of changes is less than or equal to the number in parameter. */ public static > A hasNumberOfChangesGreaterThan(A assertion, WritableAssertionInfo info, - Changes changes, int expected) { + Changes changes, int expected) { List changesList = changes.getChangesList(); int size = changesList.size(); if (size <= expected) { @@ -100,7 +100,7 @@ public static > A hasNumberOfChangesGreaterThan(A as * @throws AssertionError If the number of changes is greater than or equal to the number in parameter. */ public static > A hasNumberOfChangesLessThan(A assertion, WritableAssertionInfo info, - Changes changes, int expected) { + Changes changes, int expected) { List changesList = changes.getChangesList(); int size = changesList.size(); if (size >= expected) { @@ -121,7 +121,7 @@ public static > A hasNumberOfChangesLessThan(A asser * @throws AssertionError If the number of changes is less than the number in parameter. */ public static > A hasNumberOfChangesGreaterThanOrEqualTo(A assertion, WritableAssertionInfo info, - Changes changes, int expected) { + Changes changes, int expected) { List changesList = changes.getChangesList(); int size = changesList.size(); if (size < expected) { @@ -142,7 +142,7 @@ public static > A hasNumberOfChangesGreaterThanOrEqu * @throws AssertionError If the number of changes is greater than the number in parameter. */ public static > A hasNumberOfChangesLessThanOrEqualTo(A assertion, WritableAssertionInfo info, - Changes changes, int expected) { + Changes changes, int expected) { List changesList = changes.getChangesList(); int size = changesList.size(); if (size > expected) { diff --git a/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnNumberOfColumns.java b/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnNumberOfColumns.java index 551519d7..ca17d930 100644 --- a/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnNumberOfColumns.java +++ b/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnNumberOfColumns.java @@ -8,20 +8,20 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions.impl; -import org.assertj.core.api.WritableAssertionInfo; -import org.assertj.core.internal.Failures; -import org.assertj.db.api.AbstractAssert; - import static org.assertj.db.error.ShouldHaveColumnsSize.shouldHaveColumnsSize; import static org.assertj.db.error.ShouldHaveColumnsSizeGreater.shouldHaveColumnsSizeGreater; import static org.assertj.db.error.ShouldHaveColumnsSizeGreaterOrEqual.shouldHaveColumnsSizeGreaterOrEqual; import static org.assertj.db.error.ShouldHaveColumnsSizeLess.shouldHaveColumnsSizeLess; import static org.assertj.db.error.ShouldHaveColumnsSizeLessOrEqual.shouldHaveColumnsSizeLessOrEqual; +import org.assertj.core.api.WritableAssertionInfo; +import org.assertj.core.internal.Failures; +import org.assertj.db.api.AbstractAssert; + /** * Implements the assertion method on the number of columns. * @@ -54,7 +54,7 @@ private AssertionsOnNumberOfColumns() { * @throws AssertionError If the number of columns is different to the number in parameter. */ public static > A hasNumberOfColumns(A assertion, WritableAssertionInfo info, int size, - int expected) { + int expected) { if (size != expected) { throw failures.failure(info, shouldHaveColumnsSize(size, expected)); } @@ -74,7 +74,7 @@ public static > A hasNumberOfColumns(A assertion, Wr * @since 1.1.0 */ public static > A hasNumberOfColumnsGreaterThan(A assertion, WritableAssertionInfo info, int size, - int expected) { + int expected) { if (size <= expected) { throw failures.failure(info, shouldHaveColumnsSizeGreater(size, expected)); } @@ -114,7 +114,7 @@ public static > A hasNumberOfColumnsLessThan(A asser * @since 1.1.0 */ public static > A hasNumberOfColumnsGreaterThanOrEqualTo(A assertion, WritableAssertionInfo info, int size, - int expected) { + int expected) { if (size < expected) { throw failures.failure(info, shouldHaveColumnsSizeGreaterOrEqual(size, expected)); } @@ -134,7 +134,7 @@ public static > A hasNumberOfColumnsGreaterThanOrEqu * @since 1.1.0 */ public static > A hasNumberOfColumnsLessThanOrEqualTo(A assertion, WritableAssertionInfo info, int size, - int expected) { + int expected) { if (size > expected) { throw failures.failure(info, shouldHaveColumnsSizeLessOrEqual(size, expected)); } diff --git a/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnNumberOfRows.java b/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnNumberOfRows.java index 9a906a02..6e23d6e0 100644 --- a/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnNumberOfRows.java +++ b/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnNumberOfRows.java @@ -8,20 +8,20 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions.impl; -import org.assertj.core.api.WritableAssertionInfo; -import org.assertj.core.internal.Failures; -import org.assertj.db.api.AbstractAssert; - import static org.assertj.db.error.ShouldHaveRowsSize.shouldHaveRowsSize; import static org.assertj.db.error.ShouldHaveRowsSizeGreater.shouldHaveRowsSizeGreater; import static org.assertj.db.error.ShouldHaveRowsSizeGreaterOrEqual.shouldHaveRowsSizeGreaterOrEqual; import static org.assertj.db.error.ShouldHaveRowsSizeLess.shouldHaveRowsSizeLess; import static org.assertj.db.error.ShouldHaveRowsSizeLessOrEqual.shouldHaveRowsSizeLessOrEqual; +import org.assertj.core.api.WritableAssertionInfo; +import org.assertj.core.internal.Failures; +import org.assertj.db.api.AbstractAssert; + /** * Implements the assertion method on the number of rows. * @@ -54,7 +54,7 @@ private AssertionsOnNumberOfRows() { * @throws AssertionError If the number of rows is different to the number in parameter. */ public static > A hasNumberOfRows(A assertion, WritableAssertionInfo info, int size, - int expected) { + int expected) { if (size != expected) { throw failures.failure(info, shouldHaveRowsSize(size, expected)); } diff --git a/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnPrimaryKey.java b/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnPrimaryKey.java index 0a54730d..a7bb22c7 100644 --- a/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnPrimaryKey.java +++ b/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnPrimaryKey.java @@ -8,10 +8,17 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions.impl; +import static org.assertj.db.error.ShouldHavePksNames.shouldHavePksNames; +import static org.assertj.db.error.ShouldHavePksValues.shouldHavePksValues; + +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; + import org.assertj.core.api.WritableAssertionInfo; import org.assertj.core.internal.Failures; import org.assertj.db.api.AbstractAssert; @@ -20,13 +27,6 @@ import org.assertj.db.type.lettercase.LetterCase; import org.assertj.db.util.Values; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; - -import static org.assertj.db.error.ShouldHavePksNames.shouldHavePksNames; -import static org.assertj.db.error.ShouldHavePksValues.shouldHavePksValues; - /** * Implements the assertion methods on a primary key. * @@ -50,18 +50,18 @@ private AssertionsOnPrimaryKey() { /** * Verifies that the columns og the primary key of the rows of the change is the same as the parameters. * - * @param The type of the assertion which call this method. - * @param assertion The assertion which call this method. - * @param info Writable information about an assertion. - * @param change The change. + * @param The type of the assertion which call this method. + * @param assertion The assertion which call this method. + * @param info Writable information about an assertion. + * @param change The change. * @param primaryKeyLetterCase Letter case of the primary keys. - * @param names The names of the primary key associated with the rows of the change. + * @param names The names of the primary key associated with the rows of the change. * @return {@code this} assertion object. * @throws AssertionError If the columns of the primary key are different to the names in parameters. * @throws java.lang.NullPointerException If one of the names in parameters is {@code null}. */ public static > A hasPksNames(A assertion, WritableAssertionInfo info, Change change, - LetterCase primaryKeyLetterCase, String... names) { + LetterCase primaryKeyLetterCase, String... names) { if (names == null) { throw new NullPointerException("Columns names must be not null"); } @@ -112,7 +112,7 @@ public static > A hasPksNames(A assertion, WritableA * @throws AssertionError If the values of the primary key are different to the values in parameters. */ public static > A hasPksValues(A assertion, WritableAssertionInfo info, Change change, - Object... values) { + Object... values) { // Create a array from the primary keys columns List pksValueList = change.getPksValueList(); Value[] pksValues = pksValueList.toArray(new Value[0]); diff --git a/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnRowCondition.java b/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnRowCondition.java index b8af7d5d..41fdbc40 100644 --- a/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnRowCondition.java +++ b/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnRowCondition.java @@ -8,10 +8,18 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions.impl; +import static org.assertj.db.error.ShouldBeCompatible.shouldBeCompatible; +import static org.assertj.db.error.ShouldBeEqual.shouldBeEqual; +import static org.assertj.db.error.ShouldHaveColumnsSize.shouldHaveColumnsSize; +import static org.assertj.db.error.ShouldSatisfy.shouldSatisfy; +import static org.assertj.db.util.Values.areEqual; + +import java.util.List; + import org.assertj.core.api.Condition; import org.assertj.core.api.WritableAssertionInfo; import org.assertj.core.internal.Failures; @@ -20,19 +28,10 @@ import org.assertj.db.type.ValueType; import org.assertj.db.util.Values; -import java.util.List; - -import static org.assertj.db.error.ShouldBeCompatible.shouldBeCompatible; -import static org.assertj.db.error.ShouldBeEqual.shouldBeEqual; -import static org.assertj.db.error.ShouldHaveColumnsSize.shouldHaveColumnsSize; -import static org.assertj.db.error.ShouldSatisfy.shouldSatisfy; -import static org.assertj.db.util.Values.areEqual; - /** * Implements the assertion method on the matching with condition of a row. * * @author Julien Roy - * * @see org.assertj.db.api.assertions.AssertOnRowCondition */ public class AssertionsOnRowCondition { @@ -49,6 +48,18 @@ private AssertionsOnRowCondition() { // Empty } + /** + * Verifies that the values of a row satisfy to conditions in parameter. + * + * @param The type of the assertion which call this method. + * @param assertion The assertion which call this method. + * @param info Writable information about an assertion. + * @param valuesList The actual value to validate. + * @param expected The expected conditions. + * @return {@code this} assertion object. + * @throws AssertionError If the columns of the primary key are different to the names in parameters. + */ + @SuppressWarnings("unchecked") public static > A hasValuesSatisfying(A assertion, WritableAssertionInfo info, List valuesList, Object... expected) { diff --git a/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnRowEquality.java b/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnRowEquality.java index b24e7ade..5e9430a2 100644 --- a/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnRowEquality.java +++ b/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnRowEquality.java @@ -8,10 +8,16 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions.impl; +import static org.assertj.db.error.ShouldBeCompatible.shouldBeCompatible; +import static org.assertj.db.error.ShouldBeEqual.shouldBeEqual; +import static org.assertj.db.util.Values.areEqual; + +import java.util.List; + import org.assertj.core.api.WritableAssertionInfo; import org.assertj.core.internal.Failures; import org.assertj.db.api.AbstractAssert; @@ -19,12 +25,6 @@ import org.assertj.db.type.ValueType; import org.assertj.db.util.Values; -import java.util.List; - -import static org.assertj.db.error.ShouldBeCompatible.shouldBeCompatible; -import static org.assertj.db.error.ShouldBeEqual.shouldBeEqual; -import static org.assertj.db.util.Values.areEqual; - /** * Implements the assertion method on the equality of a row. * @@ -57,7 +57,7 @@ private AssertionsOnRowEquality() { * @throws AssertionError If the value is not equal to the values in parameter. */ public static > A hasValues(A assertion, WritableAssertionInfo info, - List valuesList, Object... expected) { + List valuesList, Object... expected) { AssertionsOnNumberOfColumns.hasNumberOfColumns(assertion, info, valuesList.size(), expected.length); int index = 0; for (Value value : valuesList) { diff --git a/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnRowOfChangeExistence.java b/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnRowOfChangeExistence.java index c1014fb3..7ae01da5 100644 --- a/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnRowOfChangeExistence.java +++ b/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnRowOfChangeExistence.java @@ -8,18 +8,18 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions.impl; +import static org.assertj.db.error.ShouldExist.shouldExist; +import static org.assertj.db.error.ShouldNotExist.shouldNotExist; + import org.assertj.core.api.WritableAssertionInfo; import org.assertj.core.internal.Failures; import org.assertj.db.api.AbstractAssert; import org.assertj.db.type.Row; -import static org.assertj.db.error.ShouldExist.shouldExist; -import static org.assertj.db.error.ShouldNotExist.shouldNotExist; - /** * Implements the assertion method on the existence of a row of a change. * @@ -43,10 +43,10 @@ private AssertionsOnRowOfChangeExistence() { /** * Verifies that the row of the change exists. * - * @param The type of the assertion which call this method. - * @param assertion The assertion which call this method. - * @param info Writable information about an assertion. - * @param row The row. + * @param The type of the assertion which call this method. + * @param assertion The assertion which call this method. + * @param info Writable information about an assertion. + * @param row The row. * @return {@code this} assertion object. * @throws AssertionError If the row of the change does not exist. * @see org.assertj.db.api.ChangeRowAssert#exists() @@ -61,10 +61,10 @@ public static > A exists(A assertion, WritableAssert /** * Verifies that the row of the change does not exist. * - * @param The type of the assertion which call this method. - * @param assertion The assertion which call this method. - * @param info Writable information about an assertion. - * @param row The row. + * @param The type of the assertion which call this method. + * @param assertion The assertion which call this method. + * @param info Writable information about an assertion. + * @param row The row. * @return {@code this} assertion object. * @throws AssertionError If the row of the change exists. * @see org.assertj.db.api.ChangeRowAssert#doesNotExist() diff --git a/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnTableExistence.java b/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnTableExistence.java index 5b5ebda4..770cf4c6 100644 --- a/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnTableExistence.java +++ b/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnTableExistence.java @@ -8,32 +8,30 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions.impl; -import org.assertj.core.api.WritableAssertionInfo; -import org.assertj.core.internal.Failures; -import org.assertj.db.api.AbstractDbAssert; -import org.assertj.db.exception.AssertJDBException; -import org.assertj.db.type.Source; +import static org.assertj.db.error.ShouldExist.shouldExist; +import static org.assertj.db.error.ShouldNotExist.shouldNotExist; import java.sql.Connection; import java.sql.DatabaseMetaData; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.SQLException; - import javax.sql.DataSource; -import static org.assertj.db.error.ShouldExist.shouldExist; -import static org.assertj.db.error.ShouldNotExist.shouldNotExist; +import org.assertj.core.api.WritableAssertionInfo; +import org.assertj.core.internal.Failures; +import org.assertj.db.api.AbstractDbAssert; +import org.assertj.db.exception.AssertJDBException; +import org.assertj.db.type.Source; /** * Implements the assertion method on the existence of a table. * * @author Avinash Ananth Narayan - * */ public class AssertionsOnTableExistence { @@ -46,8 +44,20 @@ private AssertionsOnTableExistence() { // Empty } + /** + * Verifies that the table exists. + * + * @param The type of the assertion which call this method. + * @param assertion The assertion which call this method. + * @param info Writable information about an assertion. + * @param table The table name to search in DB. + * @param source The source to connect to DB. + * @param dataSource The source to connect to DB. + * @return {@code this} assertion object. + * @throws AssertionError If the table does not exist. + */ public static > A exists(A assertion, WritableAssertionInfo info, - String table, Source source, DataSource dataSource) { + String table, Source source, DataSource dataSource) { try (Connection connection = getConnection(source, dataSource)) { DatabaseMetaData metaData = connection.getMetaData(); ResultSet result = metaData.getTables(null, null, table, null); @@ -61,8 +71,21 @@ private AssertionsOnTableExistence() { return assertion; } + + /** + * Verifies that the database not contains the table. + * + * @param The type of the assertion which call this method. + * @param assertion The assertion which call this method. + * @param info Writable information about an assertion. + * @param table The table name to search in DB. + * @param source The source to connect to DB. + * @param dataSource The source to connect to DB. + * @return {@code this} assertion object. + * @throws AssertionError If the table does not exist. + */ public static > A doesNotExists(A assertion, WritableAssertionInfo info, - String table, Source source, DataSource dataSource) { + String table, Source source, DataSource dataSource) { try (Connection connection = getConnection(source, dataSource)) { DatabaseMetaData metaData = connection.getMetaData(); ResultSet result = metaData.getTables(null, null, table, null); diff --git a/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnValueChronology.java b/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnValueChronology.java index 07181b47..aa5d4cdd 100644 --- a/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnValueChronology.java +++ b/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnValueChronology.java @@ -8,26 +8,30 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions.impl; -import org.assertj.core.api.WritableAssertionInfo; -import org.assertj.core.internal.Failures; -import org.assertj.db.api.AbstractAssert; -import org.assertj.db.exception.AssertJDBException; -import org.assertj.db.type.*; +import static org.assertj.db.error.ShouldBeAfter.shouldBeAfter; +import static org.assertj.db.error.ShouldBeAfterOrEqual.shouldBeAfterOrEqual; +import static org.assertj.db.error.ShouldBeBefore.shouldBeBefore; +import static org.assertj.db.error.ShouldBeBeforeOrEqual.shouldBeBeforeOrEqual; +import static org.assertj.db.util.Values.areEqual; import java.sql.Date; import java.sql.Time; import java.sql.Timestamp; import java.text.ParseException; -import static org.assertj.db.error.ShouldBeAfter.shouldBeAfter; -import static org.assertj.db.error.ShouldBeAfterOrEqual.shouldBeAfterOrEqual; -import static org.assertj.db.error.ShouldBeBefore.shouldBeBefore; -import static org.assertj.db.error.ShouldBeBeforeOrEqual.shouldBeBeforeOrEqual; -import static org.assertj.db.util.Values.areEqual; +import org.assertj.core.api.WritableAssertionInfo; +import org.assertj.core.internal.Failures; +import org.assertj.db.api.AbstractAssert; +import org.assertj.db.exception.AssertJDBException; +import org.assertj.db.type.DateTimeValue; +import org.assertj.db.type.DateValue; +import org.assertj.db.type.TimeValue; +import org.assertj.db.type.Value; +import org.assertj.db.type.ValueType; /** * Implements the assertion methods on the chronology of a value. @@ -61,7 +65,7 @@ private AssertionsOnValueChronology() { * @throws AssertionError If the value is not before to the date value in parameter. */ public static > A isBefore(A assertion, WritableAssertionInfo info, Value value, - DateValue date) { + DateValue date) { Object object = value.getValue(); AssertionsOnValueType.isOfAnyTypeIn(assertion, info, value, ValueType.DATE, ValueType.DATE_TIME); if (object instanceof Date) { @@ -91,7 +95,7 @@ public static > A isBefore(A assertion, WritableAsse * @throws AssertionError If the value is not before to the time value in parameter. */ public static > A isBefore(A assertion, WritableAssertionInfo info, Value value, - TimeValue time) { + TimeValue time) { Object object = value.getValue(); AssertionsOnValueType.isTime(assertion, info, value); if (TimeValue.from((Time) object).isBefore(time)) { @@ -112,7 +116,7 @@ public static > A isBefore(A assertion, WritableAsse * @throws AssertionError If the value is not before to the date/time value in parameter. */ public static > A isBefore(A assertion, WritableAssertionInfo info, Value value, - DateTimeValue dateTime) { + DateTimeValue dateTime) { Object object = value.getValue(); AssertionsOnValueType.isOfAnyTypeIn(assertion, info, value, ValueType.DATE, ValueType.DATE_TIME); DateTimeValue dateTimeValue; @@ -139,7 +143,7 @@ public static > A isBefore(A assertion, WritableAsse * @throws AssertionError If the value is not before the date, time or date/time represented in parameter. */ public static > A isBefore(A assertion, WritableAssertionInfo info, Value value, - String expected) { + String expected) { Object object = value.getValue(); AssertionsOnValueType.isOfAnyTypeIn(assertion, info, value, ValueType.DATE, ValueType.TIME, ValueType.DATE_TIME); @@ -191,7 +195,7 @@ public static > A isBefore(A assertion, WritableAsse * @throws AssertionError If the value is not before or equal to the date value in parameter. */ public static > A isBeforeOrEqualTo(A assertion, WritableAssertionInfo info, Value value, - DateValue date) { + DateValue date) { Object object = value.getValue(); AssertionsOnValueType.isOfAnyTypeIn(assertion, info, value, ValueType.DATE, ValueType.DATE_TIME); if (object instanceof Date) { @@ -220,7 +224,7 @@ public static > A isBeforeOrEqualTo(A assertion, Wri * @throws AssertionError If the value is not before or equal to the time value in parameter. */ public static > A isBeforeOrEqualTo(A assertion, WritableAssertionInfo info, Value value, - TimeValue time) { + TimeValue time) { Object object = value.getValue(); AssertionsOnValueType.isTime(assertion, info, value); if (TimeValue.from((Time) object).isBefore(time) || areEqual(value, time)) { @@ -241,7 +245,7 @@ public static > A isBeforeOrEqualTo(A assertion, Wri * @throws AssertionError If the value is not before or equal to the date/time value in parameter. */ public static > A isBeforeOrEqualTo(A assertion, WritableAssertionInfo info, Value value, - DateTimeValue dateTime) { + DateTimeValue dateTime) { Object object = value.getValue(); AssertionsOnValueType.isOfAnyTypeIn(assertion, info, value, ValueType.DATE, ValueType.DATE_TIME); DateTimeValue dateTimeValue; @@ -268,7 +272,7 @@ public static > A isBeforeOrEqualTo(A assertion, Wri * @throws AssertionError If the value is not before or equal to the date, time or date/time represented in parameter. */ public static > A isBeforeOrEqualTo(A assertion, WritableAssertionInfo info, Value value, - String expected) { + String expected) { Object object = value.getValue(); AssertionsOnValueType.isOfAnyTypeIn(assertion, info, value, ValueType.DATE, ValueType.TIME, ValueType.DATE_TIME); @@ -320,7 +324,7 @@ public static > A isBeforeOrEqualTo(A assertion, Wri * @throws AssertionError If the value is not after to the date value in parameter. */ public static > A isAfter(A assertion, WritableAssertionInfo info, Value value, - DateValue date) { + DateValue date) { Object object = value.getValue(); AssertionsOnValueType.isOfAnyTypeIn(assertion, info, value, ValueType.DATE, ValueType.DATE_TIME); if (object instanceof Date) { @@ -349,7 +353,7 @@ public static > A isAfter(A assertion, WritableAsser * @throws AssertionError If the value is not after to the time value in parameter. */ public static > A isAfter(A assertion, WritableAssertionInfo info, Value value, - TimeValue time) { + TimeValue time) { Object object = value.getValue(); AssertionsOnValueType.isTime(assertion, info, value); if (TimeValue.from((Time) object).isAfter(time)) { @@ -370,7 +374,7 @@ public static > A isAfter(A assertion, WritableAsser * @throws AssertionError If the value is not after to the date/time value in parameter. */ public static > A isAfter(A assertion, WritableAssertionInfo info, Value value, - DateTimeValue dateTime) { + DateTimeValue dateTime) { Object object = value.getValue(); AssertionsOnValueType.isOfAnyTypeIn(assertion, info, value, ValueType.DATE, ValueType.DATE_TIME); DateTimeValue dateTimeValue; @@ -397,7 +401,7 @@ public static > A isAfter(A assertion, WritableAsser * @throws AssertionError If the value is not after the date, time or date/time represented in parameter. */ public static > A isAfter(A assertion, WritableAssertionInfo info, Value value, - String expected) { + String expected) { Object object = value.getValue(); AssertionsOnValueType.isOfAnyTypeIn(assertion, info, value, ValueType.DATE, ValueType.TIME, ValueType.DATE_TIME); @@ -449,7 +453,7 @@ public static > A isAfter(A assertion, WritableAsser * @throws AssertionError If the value is not after or equal to the time value in parameter. */ public static > A isAfterOrEqualTo(A assertion, WritableAssertionInfo info, Value value, - DateValue date) { + DateValue date) { Object object = value.getValue(); AssertionsOnValueType.isOfAnyTypeIn(assertion, info, value, ValueType.DATE, ValueType.DATE_TIME); if (object instanceof Date) { @@ -478,7 +482,7 @@ public static > A isAfterOrEqualTo(A assertion, Writ * @throws AssertionError If the value is not after or equal to the time value in parameter. */ public static > A isAfterOrEqualTo(A assertion, WritableAssertionInfo info, Value value, - TimeValue time) { + TimeValue time) { Object object = value.getValue(); AssertionsOnValueType.isTime(assertion, info, value); if (TimeValue.from((Time) object).isAfter(time) || areEqual(value, time)) { @@ -499,7 +503,7 @@ public static > A isAfterOrEqualTo(A assertion, Writ * @throws AssertionError If the value is not after or equal to the date/time value in parameter. */ public static > A isAfterOrEqualTo(A assertion, WritableAssertionInfo info, Value value, - DateTimeValue dateTime) { + DateTimeValue dateTime) { Object object = value.getValue(); AssertionsOnValueType.isOfAnyTypeIn(assertion, info, value, ValueType.DATE, ValueType.DATE_TIME); DateTimeValue dateTimeValue; @@ -521,7 +525,7 @@ public static > A isAfterOrEqualTo(A assertion, Writ * @param assertion The assertion which call this method. * @param info Writable information about an assertion. * @param value The value. - * @param expected The {@code String} representing a date, time or date/time to compare to. + * @param expected The {@code String} representing a date, time or date/time to compare to. * @return {@code this} assertion object. * @throws AssertionError If the value is not after or equal to the date, time or date/time represented in parameter. */ diff --git a/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnValueClass.java b/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnValueClass.java index a1a28563..c62740be 100644 --- a/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnValueClass.java +++ b/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnValueClass.java @@ -8,18 +8,18 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions.impl; +import static org.assertj.db.error.ShouldBeValueClass.shouldBeValueClass; + import org.assertj.core.api.WritableAssertionInfo; import org.assertj.core.internal.Failures; import org.assertj.db.api.AbstractAssert; import org.assertj.db.exception.AssertJDBException; import org.assertj.db.type.Value; -import static org.assertj.db.error.ShouldBeValueClass.shouldBeValueClass; - /** * Implements the assertion method on the class of a value. * @@ -55,7 +55,7 @@ private AssertionsOnValueClass() { * @since 1.1.0 */ public static > A isOfClass(A assertion, WritableAssertionInfo info, Value value, - Class classOfValue) { + Class classOfValue) { if (value.getValue() == null) { throw failures.failure(info, shouldBeValueClass(value, classOfValue)); diff --git a/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnValueCloseness.java b/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnValueCloseness.java index 60c52ab1..c7081bdd 100644 --- a/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnValueCloseness.java +++ b/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnValueCloseness.java @@ -8,21 +8,25 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions.impl; -import org.assertj.core.api.WritableAssertionInfo; -import org.assertj.core.internal.Failures; -import org.assertj.db.api.AbstractAssert; -import org.assertj.db.type.*; +import static org.assertj.db.error.ShouldBeClose.shouldBeClose; +import static org.assertj.db.util.Values.areClose; import java.sql.Date; import java.sql.Time; import java.sql.Timestamp; -import static org.assertj.db.error.ShouldBeClose.shouldBeClose; -import static org.assertj.db.util.Values.areClose; +import org.assertj.core.api.WritableAssertionInfo; +import org.assertj.core.internal.Failures; +import org.assertj.db.api.AbstractAssert; +import org.assertj.db.type.DateTimeValue; +import org.assertj.db.type.DateValue; +import org.assertj.db.type.TimeValue; +import org.assertj.db.type.Value; +import org.assertj.db.type.ValueType; /** * Implements the assertion methods on the closeness of a value. @@ -57,7 +61,7 @@ private AssertionsOnValueCloseness() { * @throws AssertionError If the value is not equal to the number in parameter. */ public static > A isCloseTo(A assertion, WritableAssertionInfo info, Value value, - Number expected, Number tolerance) { + Number expected, Number tolerance) { if (expected != null) { AssertionsOnValueType.isNumber(assertion, info, value); } @@ -80,7 +84,7 @@ public static > A isCloseTo(A assertion, WritableAss * @throws AssertionError If the value is not equal to the date in parameter. */ public static > A isCloseTo(A assertion, WritableAssertionInfo info, Value value, - DateValue expected, DateValue tolerance) { + DateValue expected, DateValue tolerance) { if (expected != null) { AssertionsOnValueType.isOfAnyTypeIn(assertion, info, value, ValueType.DATE, ValueType.DATE_TIME); } @@ -110,7 +114,7 @@ public static > A isCloseTo(A assertion, WritableAss * @throws AssertionError If the value is not equal to the date in parameter. */ public static > A isCloseTo(A assertion, WritableAssertionInfo info, Value value, - DateValue expected, TimeValue tolerance) { + DateValue expected, TimeValue tolerance) { if (expected != null) { AssertionsOnValueType.isOfAnyTypeIn(assertion, info, value, ValueType.DATE, ValueType.DATE_TIME); } @@ -140,7 +144,7 @@ public static > A isCloseTo(A assertion, WritableAss * @throws AssertionError If the value is not equal to the date in parameter. */ public static > A isCloseTo(A assertion, WritableAssertionInfo info, Value value, - DateValue expected, DateTimeValue tolerance) { + DateValue expected, DateTimeValue tolerance) { if (expected != null) { AssertionsOnValueType.isOfAnyTypeIn(assertion, info, value, ValueType.DATE, ValueType.DATE_TIME); } @@ -170,7 +174,7 @@ public static > A isCloseTo(A assertion, WritableAss * @throws AssertionError If the value is not equal to the date in parameter. */ public static > A isCloseTo(A assertion, WritableAssertionInfo info, Value value, - TimeValue expected, TimeValue tolerance) { + TimeValue expected, TimeValue tolerance) { if (expected != null) { AssertionsOnValueType.isTime(assertion, info, value); } @@ -194,7 +198,7 @@ public static > A isCloseTo(A assertion, WritableAss * @throws AssertionError If the value is not equal to the date in parameter. */ public static > A isCloseTo(A assertion, WritableAssertionInfo info, Value value, - DateTimeValue expected, DateValue tolerance) { + DateTimeValue expected, DateValue tolerance) { if (expected != null) { AssertionsOnValueType.isOfAnyTypeIn(assertion, info, value, ValueType.DATE, ValueType.DATE_TIME); } @@ -221,7 +225,7 @@ public static > A isCloseTo(A assertion, WritableAss * @throws AssertionError If the value is not equal to the date in parameter. */ public static > A isCloseTo(A assertion, WritableAssertionInfo info, Value value, - DateTimeValue expected, TimeValue tolerance) { + DateTimeValue expected, TimeValue tolerance) { if (expected != null) { AssertionsOnValueType.isOfAnyTypeIn(assertion, info, value, ValueType.DATE, ValueType.DATE_TIME); } @@ -248,7 +252,7 @@ public static > A isCloseTo(A assertion, WritableAss * @throws AssertionError If the value is not equal to the date in parameter. */ public static > A isCloseTo(A assertion, WritableAssertionInfo info, Value value, - DateTimeValue expected, DateTimeValue tolerance) { + DateTimeValue expected, DateTimeValue tolerance) { if (expected != null) { AssertionsOnValueType.isOfAnyTypeIn(assertion, info, value, ValueType.DATE, ValueType.DATE_TIME); } diff --git a/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnValueComparison.java b/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnValueComparison.java index 5b991da3..b8255cce 100644 --- a/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnValueComparison.java +++ b/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnValueComparison.java @@ -8,21 +8,21 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions.impl; -import org.assertj.core.api.WritableAssertionInfo; -import org.assertj.core.internal.Failures; -import org.assertj.db.api.AbstractAssert; -import org.assertj.db.type.Value; - import static org.assertj.db.error.ShouldBeGreater.shouldBeGreater; import static org.assertj.db.error.ShouldBeGreaterOrEqual.shouldBeGreaterOrEqual; import static org.assertj.db.error.ShouldBeLess.shouldBeLess; import static org.assertj.db.error.ShouldBeLessOrEqual.shouldBeLessOrEqual; import static org.assertj.db.util.Values.compare; +import org.assertj.core.api.WritableAssertionInfo; +import org.assertj.core.internal.Failures; +import org.assertj.db.api.AbstractAssert; +import org.assertj.db.type.Value; + /** * Implements the assertion methods on comparisons with a value. * @@ -50,7 +50,7 @@ private AssertionsOnValueComparison() { * @param assertion The assertion which call this method. * @param info Writable information about an assertion. * @param value The value. - * @param expected The expected number value. + * @param expected The expected number value. * @return {@code this} assertion object. * @throws AssertionError If the value is less than or equal to the number in parameter. */ @@ -69,7 +69,7 @@ public static > A isGreaterThan(A assertion, Writabl * @param assertion The assertion which call this method. * @param info Writable information about an assertion. * @param value The value. - * @param expected The expected number value. + * @param expected The expected number value. * @return {@code this} assertion object. * @throws AssertionError If the value is greater than or equal to the number in parameter. */ @@ -88,7 +88,7 @@ public static > A isLessThan(A assertion, WritableAs * @param assertion The assertion which call this method. * @param info Writable information about an assertion. * @param value The value. - * @param expected The expected number value. + * @param expected The expected number value. * @return {@code this} assertion object. * @throws AssertionError If the value is less than the number in parameter. */ @@ -107,7 +107,7 @@ public static > A isGreaterThanOrEqualTo(A assertion * @param assertion The assertion which call this method. * @param info Writable information about an assertion. * @param value The value. - * @param expected The expected number value. + * @param expected The expected number value. * @return {@code this} assertion object. * @throws AssertionError If the value is greater than the number in parameter. */ diff --git a/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnValueCondition.java b/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnValueCondition.java index 03e27dab..98eb1cd8 100644 --- a/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnValueCondition.java +++ b/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnValueCondition.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions.impl; diff --git a/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnValueEquality.java b/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnValueEquality.java index 609830c4..1e183d82 100644 --- a/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnValueEquality.java +++ b/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnValueEquality.java @@ -8,23 +8,27 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions.impl; -import org.assertj.core.api.WritableAssertionInfo; -import org.assertj.core.internal.Failures; -import org.assertj.db.api.AbstractAssert; -import org.assertj.db.type.*; -import org.assertj.db.util.Values; +import static org.assertj.db.error.ShouldBeEqual.shouldBeEqual; +import static org.assertj.db.util.Values.areEqual; import java.sql.Date; import java.sql.Time; import java.sql.Timestamp; import java.util.UUID; -import static org.assertj.db.error.ShouldBeEqual.shouldBeEqual; -import static org.assertj.db.util.Values.areEqual; +import org.assertj.core.api.WritableAssertionInfo; +import org.assertj.core.internal.Failures; +import org.assertj.db.api.AbstractAssert; +import org.assertj.db.type.DateTimeValue; +import org.assertj.db.type.DateValue; +import org.assertj.db.type.TimeValue; +import org.assertj.db.type.Value; +import org.assertj.db.type.ValueType; +import org.assertj.db.util.Values; /** * Implements the assertion methods on the equality of a value. @@ -60,7 +64,7 @@ private AssertionsOnValueEquality() { * @since 1.1.0 */ public static > A isEqualTo(A assertion, WritableAssertionInfo info, Value value, - Object expected) { + Object expected) { if (value.getValue() != null && expected != null) { AssertionsOnValueClass.isOfClass(assertion, info, value, expected.getClass()); } @@ -82,7 +86,7 @@ public static > A isEqualTo(A assertion, WritableAss * @throws AssertionError If the value is not equal to the boolean in parameter. */ public static > A isEqualTo(A assertion, WritableAssertionInfo info, Value value, - Boolean expected) { + Boolean expected) { if (expected != null) { AssertionsOnValueType.isBoolean(assertion, info, value); } @@ -132,7 +136,7 @@ public static > A isFalse(A assertion, WritableAsser * @throws AssertionError If the value is not equal to the number in parameter. */ public static > A isEqualTo(A assertion, WritableAssertionInfo info, Value value, - Number expected) { + Number expected) { if (expected != null) { AssertionsOnValueType.isNumber(assertion, info, value); } @@ -154,7 +158,7 @@ public static > A isEqualTo(A assertion, WritableAss * @throws AssertionError If the value is not equal to the array of bytes in parameter. */ public static > A isEqualTo(A assertion, WritableAssertionInfo info, Value value, - byte[] expected) { + byte[] expected) { if (expected != null) { AssertionsOnValueType.isBytes(assertion, info, value); } @@ -177,18 +181,18 @@ public static > A isEqualTo(A assertion, WritableAss * @since 1.1.0 */ public static > A isEqualTo(A assertion, WritableAssertionInfo info, Value value, - String expected) { + String expected) { if (expected != null) { AssertionsOnValueType - .isOfAnyTypeIn(assertion, info, value, ValueType.TEXT, ValueType.NUMBER, ValueType.DATE, ValueType.TIME, - ValueType.DATE_TIME, ValueType.UUID); + .isOfAnyTypeIn(assertion, info, value, ValueType.TEXT, ValueType.NUMBER, ValueType.DATE, ValueType.TIME, + ValueType.DATE_TIME, ValueType.UUID); } if (areEqual(value, expected)) { return assertion; } throw failures.failure(info, shouldBeEqual( - Values.getRepresentationFromValueInFrontOfExpected(value, expected), - expected)); + Values.getRepresentationFromValueInFrontOfExpected(value, expected), + expected)); } /** @@ -204,7 +208,7 @@ public static > A isEqualTo(A assertion, WritableAss * @since 1.2.0 */ public static > A isEqualTo(A assertion, WritableAssertionInfo info, Value value, - Character expected) { + Character expected) { if (expected != null) { AssertionsOnValueType.isText(assertion, info, value); } @@ -212,8 +216,8 @@ public static > A isEqualTo(A assertion, WritableAss return assertion; } throw failures.failure(info, shouldBeEqual( - Values.getRepresentationFromValueInFrontOfExpected(value, expected), - expected)); + Values.getRepresentationFromValueInFrontOfExpected(value, expected), + expected)); } /** @@ -229,7 +233,7 @@ public static > A isEqualTo(A assertion, WritableAss * @since 1.1.0 */ public static > A isEqualTo(A assertion, WritableAssertionInfo info, Value value, - UUID expected) { + UUID expected) { if (expected != null) { AssertionsOnValueType.isUUID(assertion, info, value); } @@ -237,8 +241,8 @@ public static > A isEqualTo(A assertion, WritableAss return assertion; } throw failures.failure(info, shouldBeEqual( - Values.getRepresentationFromValueInFrontOfExpected(value, expected), - expected)); + Values.getRepresentationFromValueInFrontOfExpected(value, expected), + expected)); } /** @@ -253,7 +257,7 @@ public static > A isEqualTo(A assertion, WritableAss * @throws AssertionError If the value is not equal to the date value in parameter. */ public static > A isEqualTo(A assertion, WritableAssertionInfo info, Value value, - DateValue expected) { + DateValue expected) { if (expected != null) { AssertionsOnValueType.isOfAnyTypeIn(assertion, info, value, ValueType.DATE, ValueType.DATE_TIME); } @@ -282,7 +286,7 @@ public static > A isEqualTo(A assertion, WritableAss * @throws AssertionError If the value is not equal to the time value in parameter. */ public static > A isEqualTo(A assertion, WritableAssertionInfo info, Value value, - TimeValue expected) { + TimeValue expected) { if (expected != null) { AssertionsOnValueType.isTime(assertion, info, value); } @@ -305,7 +309,7 @@ public static > A isEqualTo(A assertion, WritableAss * @throws AssertionError If the value is not equal to the date/time value in parameter. */ public static > A isEqualTo(A assertion, WritableAssertionInfo info, Value value, - DateTimeValue expected) { + DateTimeValue expected) { if (expected != null) { AssertionsOnValueType.isOfAnyTypeIn(assertion, info, value, ValueType.DATE, ValueType.DATE_TIME); } diff --git a/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnValueInequality.java b/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnValueInequality.java index d163a3c8..35a65ef1 100644 --- a/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnValueInequality.java +++ b/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnValueInequality.java @@ -8,23 +8,27 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions.impl; -import org.assertj.core.api.WritableAssertionInfo; -import org.assertj.core.internal.Failures; -import org.assertj.db.api.AbstractAssert; -import org.assertj.db.type.*; -import org.assertj.db.util.Values; +import static org.assertj.db.error.ShouldNotBeEqual.shouldNotBeEqual; +import static org.assertj.db.util.Values.areEqual; import java.sql.Date; import java.sql.Time; import java.sql.Timestamp; import java.util.UUID; -import static org.assertj.db.error.ShouldNotBeEqual.shouldNotBeEqual; -import static org.assertj.db.util.Values.areEqual; +import org.assertj.core.api.WritableAssertionInfo; +import org.assertj.core.internal.Failures; +import org.assertj.db.api.AbstractAssert; +import org.assertj.db.type.DateTimeValue; +import org.assertj.db.type.DateValue; +import org.assertj.db.type.TimeValue; +import org.assertj.db.type.Value; +import org.assertj.db.type.ValueType; +import org.assertj.db.util.Values; /** * Implements the assertion methods on the non equality of a value. @@ -59,7 +63,7 @@ private AssertionsOnValueInequality() { * @throws AssertionError If the value is equal to the object in parameter. */ public static > A isNotEqualTo(A assertion, WritableAssertionInfo info, Value value, - Object expected) { + Object expected) { if (value.getValue() != null && expected != null) { AssertionsOnValueClass.isOfClass(assertion, info, value, expected.getClass()); } @@ -81,7 +85,7 @@ public static > A isNotEqualTo(A assertion, Writable * @throws AssertionError If the value is equal to the boolean in parameter. */ public static > A isNotEqualTo(A assertion, WritableAssertionInfo info, Value value, - Boolean expected) { + Boolean expected) { if (expected != null) { AssertionsOnValueType.isBoolean(assertion, info, value); } @@ -103,7 +107,7 @@ public static > A isNotEqualTo(A assertion, Writable * @throws AssertionError If the value is equal to the array of bytes in parameter. */ public static > A isNotEqualTo(A assertion, WritableAssertionInfo info, Value value, - byte[] expected) { + byte[] expected) { if (expected != null) { AssertionsOnValueType.isBytes(assertion, info, value); } @@ -125,8 +129,8 @@ public static > A isNotEqualTo(A assertion, Writable * @throws AssertionError If the value is equal to the date/time value in parameter. */ public static > A isNotEqualTo(A assertion, WritableAssertionInfo info, Value value, - DateTimeValue expected) { - if (expected != null){ + DateTimeValue expected) { + if (expected != null) { AssertionsOnValueType.isOfAnyTypeIn(assertion, info, value, ValueType.DATE, ValueType.DATE_TIME); } if (!areEqual(value, expected)) { @@ -154,7 +158,7 @@ public static > A isNotEqualTo(A assertion, Writable * @throws AssertionError If the value is equal to the date value in parameter. */ public static > A isNotEqualTo(A assertion, WritableAssertionInfo info, Value value, - DateValue expected) { + DateValue expected) { if (expected != null) { AssertionsOnValueType.isOfAnyTypeIn(assertion, info, value, ValueType.DATE, ValueType.DATE_TIME); } @@ -183,7 +187,7 @@ public static > A isNotEqualTo(A assertion, Writable * @throws AssertionError If the value is equal to the number in parameter. */ public static > A isNotEqualTo(A assertion, WritableAssertionInfo info, Value value, - Number expected) { + Number expected) { if (expected != null) { AssertionsOnValueType.isNumber(assertion, info, value); } @@ -205,19 +209,19 @@ public static > A isNotEqualTo(A assertion, Writable * @throws AssertionError If the value is equal to the text in parameter. */ public static > A isNotEqualTo(A assertion, WritableAssertionInfo info, Value value, - String expected) { + String expected) { if (expected != null) { AssertionsOnValueType - .isOfAnyTypeIn(assertion, info, value, ValueType.TEXT, ValueType.NUMBER, ValueType.DATE, ValueType.TIME, - ValueType.DATE_TIME, ValueType.UUID); + .isOfAnyTypeIn(assertion, info, value, ValueType.TEXT, ValueType.NUMBER, ValueType.DATE, ValueType.TIME, + ValueType.DATE_TIME, ValueType.UUID); } if (!areEqual(value, expected)) { return assertion; } throw failures.failure(info, shouldNotBeEqual( - Values.getRepresentationFromValueInFrontOfExpected(value, expected), - expected)); + Values.getRepresentationFromValueInFrontOfExpected(value, expected), + expected)); } /** @@ -242,8 +246,8 @@ public static > A isNotEqualTo(A assertion, Writable return assertion; } throw failures.failure(info, shouldNotBeEqual( - Values.getRepresentationFromValueInFrontOfExpected(value, expected), - expected)); + Values.getRepresentationFromValueInFrontOfExpected(value, expected), + expected)); } /** @@ -259,7 +263,7 @@ public static > A isNotEqualTo(A assertion, Writable * @since 1.1.0 */ public static > A isNotEqualTo(A assertion, WritableAssertionInfo info, Value value, - UUID expected) { + UUID expected) { if (expected != null) { AssertionsOnValueType.isUUID(assertion, info, value); @@ -268,8 +272,8 @@ public static > A isNotEqualTo(A assertion, Writable return assertion; } throw failures.failure(info, shouldNotBeEqual( - Values.getRepresentationFromValueInFrontOfExpected(value, expected), - expected)); + Values.getRepresentationFromValueInFrontOfExpected(value, expected), + expected)); } /** @@ -284,7 +288,7 @@ public static > A isNotEqualTo(A assertion, Writable * @throws AssertionError If the value is equal to the time value in parameter. */ public static > A isNotEqualTo(A assertion, WritableAssertionInfo info, Value value, - TimeValue expected) { + TimeValue expected) { if (expected != null) { AssertionsOnValueType.isTime(assertion, info, value); } diff --git a/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnValueNullity.java b/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnValueNullity.java index bf40a547..4dd6cb85 100644 --- a/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnValueNullity.java +++ b/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnValueNullity.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions.impl; diff --git a/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnValueType.java b/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnValueType.java index 1a3a5650..094a4b41 100644 --- a/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnValueType.java +++ b/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnValueType.java @@ -8,10 +8,12 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions.impl; +import static org.assertj.db.error.ShouldBeValueType.shouldBeValueType; + import org.assertj.core.api.WritableAssertionInfo; import org.assertj.core.internal.Failures; import org.assertj.db.api.AbstractAssert; @@ -19,8 +21,6 @@ import org.assertj.db.type.Value; import org.assertj.db.type.ValueType; -import static org.assertj.db.error.ShouldBeValueType.shouldBeValueType; - /** * Implements the assertion methods on the type of a value. *

The different type of values are enumerated in {@link org.assertj.db.type.ValueType}.

@@ -55,7 +55,7 @@ private AssertionsOnValueType() { * @throws AssertionError If the type of the value is different to the type in parameter. */ public static
> A isOfType(A assertion, WritableAssertionInfo info, Value value, - ValueType expected) { + ValueType expected) { ValueType type = value.getValueType(); if (type != expected) { throw failures.failure(info, shouldBeValueType(value, type, expected)); @@ -75,7 +75,7 @@ public static > A isOfType(A assertion, WritableAsse * @throws AssertionError If the type of the value is different to all the types in parameters. */ public static > A isOfAnyTypeIn(A assertion, WritableAssertionInfo info, Value value, - ValueType... expected) { + ValueType... expected) { ValueType type = value.getValueType(); for (ValueType valueType : expected) { if (type == valueType) { diff --git a/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnValuesNullity.java b/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnValuesNullity.java index 6530db83..35fee6fe 100644 --- a/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnValuesNullity.java +++ b/src/main/java/org/assertj/db/api/assertions/impl/AssertionsOnValuesNullity.java @@ -8,20 +8,20 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions.impl; +import static org.assertj.db.error.ShouldContainsOnlyNotNull.shouldContainsOnlyNotNull; +import static org.assertj.db.error.ShouldContainsOnlyNull.shouldContainsOnlyNull; + +import java.util.List; + import org.assertj.core.api.WritableAssertionInfo; import org.assertj.core.internal.Failures; import org.assertj.db.api.AbstractAssert; import org.assertj.db.type.Value; -import java.util.List; - -import static org.assertj.db.error.ShouldContainsOnlyNotNull.shouldContainsOnlyNotNull; -import static org.assertj.db.error.ShouldContainsOnlyNull.shouldContainsOnlyNull; - /** * Implements the assertion methods on the nullity of a values of a column/row. * @@ -54,7 +54,7 @@ private AssertionsOnValuesNullity() { * @throws AssertionError If at least one of the values of the column are not {@code null}. */ public static > A hasOnlyNullValues(A assertion, WritableAssertionInfo info, - List valuesList) { + List valuesList) { int index = 0; for (Value value : valuesList) { if (value.getValue() != null) { @@ -76,7 +76,7 @@ public static > A hasOnlyNullValues(A assertion, Wri * @throws AssertionError If at least one of the values of the column are {@code null}. */ public static > A hasOnlyNotNullValues(A assertion, WritableAssertionInfo info, - List valuesList) { + List valuesList) { int index = 0; for (Value value : valuesList) { if (value.getValue() == null) { diff --git a/src/main/java/org/assertj/db/api/assertions/impl/package-info.java b/src/main/java/org/assertj/db/api/assertions/impl/package-info.java index d66ec97a..89482ac9 100644 --- a/src/main/java/org/assertj/db/api/assertions/impl/package-info.java +++ b/src/main/java/org/assertj/db/api/assertions/impl/package-info.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ /** * This package contains utility classes that implements the different assertions methods. diff --git a/src/main/java/org/assertj/db/api/assertions/package-info.java b/src/main/java/org/assertj/db/api/assertions/package-info.java index 599b12f3..636bee73 100644 --- a/src/main/java/org/assertj/db/api/assertions/package-info.java +++ b/src/main/java/org/assertj/db/api/assertions/package-info.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ /** * This package contains interfaces that defines the different assertions methods. diff --git a/src/main/java/org/assertj/db/api/package-info.java b/src/main/java/org/assertj/db/api/package-info.java index e098f219..24bc98d6 100644 --- a/src/main/java/org/assertj/db/api/package-info.java +++ b/src/main/java/org/assertj/db/api/package-info.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ /** * This package contains the API of assertj-db (and especially the entry point class {@link org.assertj.db.api.Assertions}). diff --git a/src/main/java/org/assertj/db/error/ShouldBeAfter.java b/src/main/java/org/assertj/db/error/ShouldBeAfter.java index b8aaeb7d..0bc72da3 100644 --- a/src/main/java/org/assertj/db/error/ShouldBeAfter.java +++ b/src/main/java/org/assertj/db/error/ShouldBeAfter.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.error; @@ -17,30 +17,29 @@ /** * Creates an error message indicating that an assertion that verifies that a value is after a value. - * + * * @author Régis Pouiller - * */ public class ShouldBeAfter extends BasicErrorMessageFactory { /** - * Creates a new {@link ShouldBeAfter}. - * - * @param actual The actual value in the failed assertion. + * Constructor. + * + * @param actual The actual value in the failed assertion. * @param expected The expected value to compare to. - * @return the created {@code ErrorMessageFactory}. */ - public static ErrorMessageFactory shouldBeAfter(Object actual, Object expected) { - return new ShouldBeAfter(actual, expected); + private ShouldBeAfter(Object actual, Object expected) { + super("%nExpecting:%n <%s>%nto be after %n <%s>", actual, expected); } /** - * Constructor. - * - * @param actual The actual value in the failed assertion. + * Creates a new {@link ShouldBeAfter}. + * + * @param actual The actual value in the failed assertion. * @param expected The expected value to compare to. + * @return the created {@code ErrorMessageFactory}. */ - private ShouldBeAfter(Object actual, Object expected) { - super("%nExpecting:%n <%s>%nto be after %n <%s>", actual, expected); + public static ErrorMessageFactory shouldBeAfter(Object actual, Object expected) { + return new ShouldBeAfter(actual, expected); } } diff --git a/src/main/java/org/assertj/db/error/ShouldBeAfterOrEqual.java b/src/main/java/org/assertj/db/error/ShouldBeAfterOrEqual.java index 90c0f870..80cf12d7 100644 --- a/src/main/java/org/assertj/db/error/ShouldBeAfterOrEqual.java +++ b/src/main/java/org/assertj/db/error/ShouldBeAfterOrEqual.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.error; @@ -17,30 +17,29 @@ /** * Creates an error message indicating that an assertion that verifies that a value is after or equal a value. - * + * * @author Régis Pouiller - * */ public class ShouldBeAfterOrEqual extends BasicErrorMessageFactory { /** - * Creates a new {@link ShouldBeAfterOrEqual}. - * - * @param actual The actual value in the failed assertion. + * Constructor. + * + * @param actual The actual value in the failed assertion. * @param expected The expected value to compare to. - * @return the created {@code ErrorMessageFactory}. */ - public static ErrorMessageFactory shouldBeAfterOrEqual(Object actual, Object expected) { - return new ShouldBeAfterOrEqual(actual, expected); + private ShouldBeAfterOrEqual(Object actual, Object expected) { + super("%nExpecting:%n <%s>%nto be after or equal to %n <%s>", actual, expected); } /** - * Constructor. - * - * @param actual The actual value in the failed assertion. + * Creates a new {@link ShouldBeAfterOrEqual}. + * + * @param actual The actual value in the failed assertion. * @param expected The expected value to compare to. + * @return the created {@code ErrorMessageFactory}. */ - private ShouldBeAfterOrEqual(Object actual, Object expected) { - super("%nExpecting:%n <%s>%nto be after or equal to %n <%s>", actual, expected); + public static ErrorMessageFactory shouldBeAfterOrEqual(Object actual, Object expected) { + return new ShouldBeAfterOrEqual(actual, expected); } } diff --git a/src/main/java/org/assertj/db/error/ShouldBeBefore.java b/src/main/java/org/assertj/db/error/ShouldBeBefore.java index 6c2420fc..75a01fe9 100644 --- a/src/main/java/org/assertj/db/error/ShouldBeBefore.java +++ b/src/main/java/org/assertj/db/error/ShouldBeBefore.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.error; @@ -17,30 +17,29 @@ /** * Creates an error message indicating that an assertion that verifies that a value is before a value. - * + * * @author Régis Pouiller - * */ public class ShouldBeBefore extends BasicErrorMessageFactory { /** - * Creates a new {@link ShouldBeBefore}. - * - * @param actual The actual value in the failed assertion. + * Constructor. + * + * @param actual The actual value in the failed assertion. * @param expected The expected value to compare to. - * @return the created {@code ErrorMessageFactory}. */ - public static ErrorMessageFactory shouldBeBefore(Object actual, Object expected) { - return new ShouldBeBefore(actual, expected); + private ShouldBeBefore(Object actual, Object expected) { + super("%nExpecting:%n <%s>%nto be before %n <%s>", actual, expected); } /** - * Constructor. - * - * @param actual The actual value in the failed assertion. + * Creates a new {@link ShouldBeBefore}. + * + * @param actual The actual value in the failed assertion. * @param expected The expected value to compare to. + * @return the created {@code ErrorMessageFactory}. */ - private ShouldBeBefore(Object actual, Object expected) { - super("%nExpecting:%n <%s>%nto be before %n <%s>", actual, expected); + public static ErrorMessageFactory shouldBeBefore(Object actual, Object expected) { + return new ShouldBeBefore(actual, expected); } } diff --git a/src/main/java/org/assertj/db/error/ShouldBeBeforeOrEqual.java b/src/main/java/org/assertj/db/error/ShouldBeBeforeOrEqual.java index c15fd4e2..cc702229 100644 --- a/src/main/java/org/assertj/db/error/ShouldBeBeforeOrEqual.java +++ b/src/main/java/org/assertj/db/error/ShouldBeBeforeOrEqual.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.error; @@ -17,30 +17,29 @@ /** * Creates an error message indicating that an assertion that verifies that a value is before or equal a value. - * + * * @author Régis Pouiller - * */ public class ShouldBeBeforeOrEqual extends BasicErrorMessageFactory { /** - * Creates a new {@link ShouldBeBeforeOrEqual}. - * - * @param actual The actual value in the failed assertion. + * Constructor. + * + * @param actual The actual value in the failed assertion. * @param expected The expected value to compare to. - * @return the created {@code ErrorMessageFactory}. */ - public static ErrorMessageFactory shouldBeBeforeOrEqual(Object actual, Object expected) { - return new ShouldBeBeforeOrEqual(actual, expected); + private ShouldBeBeforeOrEqual(Object actual, Object expected) { + super("%nExpecting:%n <%s>%nto be before or equal to %n <%s>", actual, expected); } /** - * Constructor. - * - * @param actual The actual value in the failed assertion. + * Creates a new {@link ShouldBeBeforeOrEqual}. + * + * @param actual The actual value in the failed assertion. * @param expected The expected value to compare to. + * @return the created {@code ErrorMessageFactory}. */ - private ShouldBeBeforeOrEqual(Object actual, Object expected) { - super("%nExpecting:%n <%s>%nto be before or equal to %n <%s>", actual, expected); + public static ErrorMessageFactory shouldBeBeforeOrEqual(Object actual, Object expected) { + return new ShouldBeBeforeOrEqual(actual, expected); } } diff --git a/src/main/java/org/assertj/db/error/ShouldBeChangeType.java b/src/main/java/org/assertj/db/error/ShouldBeChangeType.java index c0146e5a..91b9ccf0 100644 --- a/src/main/java/org/assertj/db/error/ShouldBeChangeType.java +++ b/src/main/java/org/assertj/db/error/ShouldBeChangeType.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.error; @@ -24,26 +24,26 @@ public class ShouldBeChangeType extends BasicErrorMessageFactory { private static final String EXPECTED_MESSAGE = - "%nExpecting:%nto be of type%n" + " <%s>%nbut was of type%n <%s>"; + "%nExpecting:%nto be of type%n" + " <%s>%nbut was of type%n <%s>"; /** - * Creates a new {@link ShouldBeChangeType}. + * Constructor. * * @param expected The expected type. * @param tested The tested type. - * @return the created {@code ErrorMessageFactory}. */ - public static ErrorMessageFactory shouldBeChangeType(ChangeType expected, ChangeType tested) { - return new ShouldBeChangeType(expected, tested); + private ShouldBeChangeType(ChangeType expected, ChangeType tested) { + super(EXPECTED_MESSAGE, expected, tested); } /** - * Constructor. + * Creates a new {@link ShouldBeChangeType}. * * @param expected The expected type. * @param tested The tested type. + * @return the created {@code ErrorMessageFactory}. */ - private ShouldBeChangeType(ChangeType expected, ChangeType tested) { - super(EXPECTED_MESSAGE, expected, tested); + public static ErrorMessageFactory shouldBeChangeType(ChangeType expected, ChangeType tested) { + return new ShouldBeChangeType(expected, tested); } -} \ No newline at end of file +} diff --git a/src/main/java/org/assertj/db/error/ShouldBeClose.java b/src/main/java/org/assertj/db/error/ShouldBeClose.java index e06204ca..991c36a6 100644 --- a/src/main/java/org/assertj/db/error/ShouldBeClose.java +++ b/src/main/java/org/assertj/db/error/ShouldBeClose.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.error; @@ -19,32 +19,31 @@ * Creates an error message indicating that an assertion that verifies that a value is close to another value. * * @author Régis Pouiller - * */ public class ShouldBeClose extends BasicErrorMessageFactory { - private static final String EXPECTED_MESSAGE = "%nExpecting:%n <%s>%nto be close to: %n <%s> %n with tolerance <%s>"; + private static final String EXPECTED_MESSAGE = "%nExpecting:%n <%s>%nto be close to: %n <%s> %n with tolerance <%s>"; /** - * Creates a new {@link ShouldBeClose}. + * Constructor. * - * @param actual The actual value in the failed assertion. - * @param expected The expected value to compare to. + * @param actual The actual value in the failed assertion. + * @param expected The expected value to compare to. * @param tolerance The tolerance of the closeness. - * @return the created {@code ErrorMessageFactory}. */ - public static ErrorMessageFactory shouldBeClose(Object actual, Object expected, Object tolerance) { - return new ShouldBeClose(actual, expected, tolerance); + private ShouldBeClose(Object actual, Object expected, Object tolerance) { + super(EXPECTED_MESSAGE, actual, expected, tolerance); } /** - * Constructor. + * Creates a new {@link ShouldBeClose}. * - * @param actual The actual value in the failed assertion. - * @param expected The expected value to compare to. + * @param actual The actual value in the failed assertion. + * @param expected The expected value to compare to. * @param tolerance The tolerance of the closeness. + * @return the created {@code ErrorMessageFactory}. */ - private ShouldBeClose(Object actual, Object expected, Object tolerance) { - super(EXPECTED_MESSAGE, actual, expected, tolerance); + public static ErrorMessageFactory shouldBeClose(Object actual, Object expected, Object tolerance) { + return new ShouldBeClose(actual, expected, tolerance); } } diff --git a/src/main/java/org/assertj/db/error/ShouldBeCompatible.java b/src/main/java/org/assertj/db/error/ShouldBeCompatible.java index 25155e4d..a9955182 100644 --- a/src/main/java/org/assertj/db/error/ShouldBeCompatible.java +++ b/src/main/java/org/assertj/db/error/ShouldBeCompatible.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.error; @@ -20,44 +20,43 @@ * Creates an error message indicating that an assertion that verifies that a value is compatible with a value. * * @author Régis Pouiller - * */ public class ShouldBeCompatible extends BasicErrorMessageFactory { /** - * Creates a new {@link ShouldBeCompatible}. + * Constructor. * - * @param actual The actual value in the failed assertion. + * @param actual The actual value in the failed assertion. + * @param clazz The class of the expected value. * @param expected The expected value to compare to. - * @return the created {@code ErrorMessageFactory}. */ - public static ErrorMessageFactory shouldBeCompatible(Value actual, Object expected) { - if (expected == null) { - return new ShouldBeCompatible(actual, expected); - } - return new ShouldBeCompatible(actual, expected.getClass(), expected); + private ShouldBeCompatible(Value actual, Class clazz, Object expected) { + super("%nExpecting:%n %s : <%s>%nto be compatible with %n %s : <%s>", actual.getValueTypeRepresentation(), + actual.getValue(), clazz, expected); } /** * Constructor. * - * @param actual The actual value in the failed assertion. - * @param clazz The class of the expected value. + * @param actual The actual value in the failed assertion. * @param expected The expected value to compare to. */ - private ShouldBeCompatible(Value actual, Class clazz, Object expected) { - super("%nExpecting:%n %s : <%s>%nto be compatible with %n %s : <%s>", actual.getValueTypeRepresentation(), - actual.getValue(), clazz, expected); + private ShouldBeCompatible(Value actual, Object expected) { + super("%nExpecting:%n %s : <%s>%nto be compatible with %n <%s>", actual.getValueTypeRepresentation(), + actual.getValue(), expected); } /** - * Constructor. + * Creates a new {@link ShouldBeCompatible}. * - * @param actual The actual value in the failed assertion. + * @param actual The actual value in the failed assertion. * @param expected The expected value to compare to. + * @return the created {@code ErrorMessageFactory}. */ - private ShouldBeCompatible(Value actual, Object expected) { - super("%nExpecting:%n %s : <%s>%nto be compatible with %n <%s>", actual.getValueTypeRepresentation(), - actual.getValue(), expected); + public static ErrorMessageFactory shouldBeCompatible(Value actual, Object expected) { + if (expected == null) { + return new ShouldBeCompatible(actual, expected); + } + return new ShouldBeCompatible(actual, expected.getClass(), expected); } } diff --git a/src/main/java/org/assertj/db/error/ShouldBeDataType.java b/src/main/java/org/assertj/db/error/ShouldBeDataType.java index 6653c8e0..9600108f 100644 --- a/src/main/java/org/assertj/db/error/ShouldBeDataType.java +++ b/src/main/java/org/assertj/db/error/ShouldBeDataType.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.error; @@ -24,26 +24,26 @@ public class ShouldBeDataType extends BasicErrorMessageFactory { private static final String EXPECTED_MESSAGE = - "%nExpecting:%nto be on data type%n" + " <%s>%nbut was on data type%n <%s>"; + "%nExpecting:%nto be on data type%n" + " <%s>%nbut was on data type%n <%s>"; /** - * Creates a new {@link ShouldBeDataType}. + * Constructor. * * @param expected The expected type. * @param tested The tested type. - * @return the created {@code ErrorMessageFactory}. */ - public static ErrorMessageFactory shouldBeDataType(DataType expected, DataType tested) { - return new ShouldBeDataType(expected, tested); + private ShouldBeDataType(DataType expected, DataType tested) { + super(EXPECTED_MESSAGE, expected, tested); } /** - * Constructor. + * Creates a new {@link ShouldBeDataType}. * * @param expected The expected type. * @param tested The tested type. + * @return the created {@code ErrorMessageFactory}. */ - private ShouldBeDataType(DataType expected, DataType tested) { - super(EXPECTED_MESSAGE, expected, tested); + public static ErrorMessageFactory shouldBeDataType(DataType expected, DataType tested) { + return new ShouldBeDataType(expected, tested); } } diff --git a/src/main/java/org/assertj/db/error/ShouldBeEqual.java b/src/main/java/org/assertj/db/error/ShouldBeEqual.java index 7959ef32..d590cf99 100644 --- a/src/main/java/org/assertj/db/error/ShouldBeEqual.java +++ b/src/main/java/org/assertj/db/error/ShouldBeEqual.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.error; @@ -17,9 +17,8 @@ /** * Creates an error message indicating that an assertion that verifies that a value is equal to another value. - * + * * @author Régis Pouiller - * */ public class ShouldBeEqual extends BasicErrorMessageFactory { @@ -29,81 +28,81 @@ public class ShouldBeEqual extends BasicErrorMessageFactory { private static final String EXPECTED_MESSAGE_BUT_NOT_WITH_INDEX = "%nExpecting that the value at index %s to be equal to the expected value but was not equal"; /** - * Creates a new {@link ShouldBeEqual}. - * - * @param actual The actual value in the failed assertion. + * Constructor. + * + * @param actual The actual value in the failed assertion. * @param expected The expected value to compare to. - * @return the created {@code ErrorMessageFactory}. */ - public static ErrorMessageFactory shouldBeEqual(Object actual, Object expected) { - return new ShouldBeEqual(actual, expected); + private ShouldBeEqual(Object actual, Object expected) { + super(EXPECTED_MESSAGE, actual, expected); } /** - * Creates a new {@link ShouldBeEqual}. - * - * @return the created {@code ErrorMessageFactory}. + * Constructor. */ - public static ErrorMessageFactory shouldBeEqual() { - return new ShouldBeEqual(); + private ShouldBeEqual() { + super(EXPECTED_MESSAGE_BUT_NOT); } /** - * Creates a new {@link ShouldBeEqual}. - * - * @param index The index of the value. - * @param actual The actual value in the failed assertion. + * Constructor. + * + * @param index The index of the value. + * @param actual The actual value in the failed assertion. * @param expected The expected value to compare to. - * @return the created {@code ErrorMessageFactory}. */ - public static ErrorMessageFactory shouldBeEqual(int index, Object actual, Object expected) { - return new ShouldBeEqual(index, actual, expected); + private ShouldBeEqual(int index, Object actual, Object expected) { + super(EXPECTED_MESSAGE_WITH_INDEX, index, actual, expected); } /** - * Creates a new {@link ShouldBeEqual}. - * + * Constructor. + * * @param index The index of the value. - * @return the created {@code ErrorMessageFactory}. */ - public static ErrorMessageFactory shouldBeEqual(int index) { - return new ShouldBeEqual(index); + private ShouldBeEqual(int index) { + super(EXPECTED_MESSAGE_BUT_NOT_WITH_INDEX, index); } /** - * Constructor. - * - * @param actual The actual value in the failed assertion. + * Creates a new {@link ShouldBeEqual}. + * + * @param actual The actual value in the failed assertion. * @param expected The expected value to compare to. + * @return the created {@code ErrorMessageFactory}. */ - private ShouldBeEqual(Object actual, Object expected) { - super(EXPECTED_MESSAGE, actual, expected); + public static ErrorMessageFactory shouldBeEqual(Object actual, Object expected) { + return new ShouldBeEqual(actual, expected); } /** - * Constructor. + * Creates a new {@link ShouldBeEqual}. + * + * @return the created {@code ErrorMessageFactory}. */ - private ShouldBeEqual() { - super(EXPECTED_MESSAGE_BUT_NOT); + public static ErrorMessageFactory shouldBeEqual() { + return new ShouldBeEqual(); } /** - * Constructor. - * - * @param index The index of the value. - * @param actual The actual value in the failed assertion. + * Creates a new {@link ShouldBeEqual}. + * + * @param index The index of the value. + * @param actual The actual value in the failed assertion. * @param expected The expected value to compare to. + * @return the created {@code ErrorMessageFactory}. */ - private ShouldBeEqual(int index, Object actual, Object expected) { - super(EXPECTED_MESSAGE_WITH_INDEX, index, actual, expected); + public static ErrorMessageFactory shouldBeEqual(int index, Object actual, Object expected) { + return new ShouldBeEqual(index, actual, expected); } /** - * Constructor. - * + * Creates a new {@link ShouldBeEqual}. + * * @param index The index of the value. + * @return the created {@code ErrorMessageFactory}. */ - private ShouldBeEqual(int index) { - super(EXPECTED_MESSAGE_BUT_NOT_WITH_INDEX, index); + public static ErrorMessageFactory shouldBeEqual(int index) { + return new ShouldBeEqual(index); } } diff --git a/src/main/java/org/assertj/db/error/ShouldBeEqualWithEndPoint.java b/src/main/java/org/assertj/db/error/ShouldBeEqualWithEndPoint.java index e1a0926b..fd9c9537 100644 --- a/src/main/java/org/assertj/db/error/ShouldBeEqualWithEndPoint.java +++ b/src/main/java/org/assertj/db/error/ShouldBeEqualWithEndPoint.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.error; @@ -17,9 +17,8 @@ /** * Creates an error message indicating that an assertion that verifies that a value at end point is equal to another value. - * + * * @author Régis Pouiller - * */ public class ShouldBeEqualWithEndPoint extends BasicErrorMessageFactory { @@ -27,39 +26,39 @@ public class ShouldBeEqualWithEndPoint extends BasicErrorMessageFactory { private static final String EXPECTED_MESSAGE_WITHOUT_VALUES = "%nExpecting that end point to be equal to the expected value but was not equal"; /** - * Creates a new {@link org.assertj.db.error.ShouldBeEqualWithEndPoint}. + * Constructor. * - * @param actual The actual value in the failed assertion. + * @param actual The actual value in the failed assertion. * @param expected The expected value to compare to. - * @return the created {@code ErrorMessageFactory}. */ - public static ErrorMessageFactory shouldBeEqualWithEndPoint(Object actual, Object expected) { - return new ShouldBeEqualWithEndPoint(actual, expected); + private ShouldBeEqualWithEndPoint(Object actual, Object expected) { + super(EXPECTED_MESSAGE, actual, expected); } /** - * Creates a new {@link org.assertj.db.error.ShouldBeEqualWithEndPoint}. - * - * @return the created {@code ErrorMessageFactory}. + * Constructor. */ - public static ErrorMessageFactory shouldBeEqualWithEndPoint() { - return new ShouldBeEqualWithEndPoint(); + private ShouldBeEqualWithEndPoint() { + super(EXPECTED_MESSAGE_WITHOUT_VALUES); } /** - * Constructor. + * Creates a new {@link org.assertj.db.error.ShouldBeEqualWithEndPoint}. * - * @param actual The actual value in the failed assertion. + * @param actual The actual value in the failed assertion. * @param expected The expected value to compare to. + * @return the created {@code ErrorMessageFactory}. */ - private ShouldBeEqualWithEndPoint(Object actual, Object expected) { - super(EXPECTED_MESSAGE, actual, expected); + public static ErrorMessageFactory shouldBeEqualWithEndPoint(Object actual, Object expected) { + return new ShouldBeEqualWithEndPoint(actual, expected); } /** - * Constructor. + * Creates a new {@link org.assertj.db.error.ShouldBeEqualWithEndPoint}. + * + * @return the created {@code ErrorMessageFactory}. */ - private ShouldBeEqualWithEndPoint() { - super(EXPECTED_MESSAGE_WITHOUT_VALUES); + public static ErrorMessageFactory shouldBeEqualWithEndPoint() { + return new ShouldBeEqualWithEndPoint(); } } diff --git a/src/main/java/org/assertj/db/error/ShouldBeEqualWithStartPoint.java b/src/main/java/org/assertj/db/error/ShouldBeEqualWithStartPoint.java index 366041ba..2fa45d4d 100644 --- a/src/main/java/org/assertj/db/error/ShouldBeEqualWithStartPoint.java +++ b/src/main/java/org/assertj/db/error/ShouldBeEqualWithStartPoint.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.error; @@ -17,9 +17,8 @@ /** * Creates an error message indicating that an assertion that verifies that a value at start point is equal to another value. - * + * * @author Régis Pouiller - * */ public class ShouldBeEqualWithStartPoint extends BasicErrorMessageFactory { @@ -27,39 +26,39 @@ public class ShouldBeEqualWithStartPoint extends BasicErrorMessageFactory { private static final String EXPECTED_MESSAGE_WITHOUT_VALUES = "%nExpecting that start point to be equal to the expected value but was not equal"; /** - * Creates a new {@link org.assertj.db.error.ShouldBeEqualWithStartPoint}. + * Constructor. * - * @param actual The actual value in the failed assertion. + * @param actual The actual value in the failed assertion. * @param expected The expected value to compare to. - * @return the created {@code ErrorMessageFactory}. */ - public static ErrorMessageFactory shouldBeEqualWithStartPoint(Object actual, Object expected) { - return new ShouldBeEqualWithStartPoint(actual, expected); + public ShouldBeEqualWithStartPoint(Object actual, Object expected) { + super(EXPECTED_MESSAGE, actual, expected); } /** - * Creates a new {@link org.assertj.db.error.ShouldBeEqualWithStartPoint}. - * - * @return the created {@code ErrorMessageFactory}. + * Constructor. */ - public static ErrorMessageFactory shouldBeEqualWithStartPoint() { - return new ShouldBeEqualWithStartPoint(); + private ShouldBeEqualWithStartPoint() { + super(EXPECTED_MESSAGE_WITHOUT_VALUES); } /** - * Constructor. + * Creates a new {@link org.assertj.db.error.ShouldBeEqualWithStartPoint}. * - * @param actual The actual value in the failed assertion. + * @param actual The actual value in the failed assertion. * @param expected The expected value to compare to. + * @return the created {@code ErrorMessageFactory}. */ - public ShouldBeEqualWithStartPoint(Object actual, Object expected) { - super(EXPECTED_MESSAGE, actual, expected); + public static ErrorMessageFactory shouldBeEqualWithStartPoint(Object actual, Object expected) { + return new ShouldBeEqualWithStartPoint(actual, expected); } /** - * Constructor. + * Creates a new {@link org.assertj.db.error.ShouldBeEqualWithStartPoint}. + * + * @return the created {@code ErrorMessageFactory}. */ - private ShouldBeEqualWithStartPoint() { - super(EXPECTED_MESSAGE_WITHOUT_VALUES); + public static ErrorMessageFactory shouldBeEqualWithStartPoint() { + return new ShouldBeEqualWithStartPoint(); } } diff --git a/src/main/java/org/assertj/db/error/ShouldBeGreater.java b/src/main/java/org/assertj/db/error/ShouldBeGreater.java index 14cb36ad..d7115771 100644 --- a/src/main/java/org/assertj/db/error/ShouldBeGreater.java +++ b/src/main/java/org/assertj/db/error/ShouldBeGreater.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.error; @@ -18,30 +18,29 @@ /** * Creates an error message indicating that an assertion that verifies that a value is greater than another value. - * + * * @author Régis Pouiller - * */ public class ShouldBeGreater extends BasicErrorMessageFactory { /** - * Creates a new {@link ShouldBeGreater}. - * - * @param actual The actual value in the failed assertion. + * Constructor. + * + * @param actual The actual value in the failed assertion. * @param expected The expected value to compare to. - * @return the created {@code ErrorMessageFactory}. */ - public static ErrorMessageFactory shouldBeGreater(Value actual, Object expected) { - return new ShouldBeGreater(actual, expected); + private ShouldBeGreater(Value actual, Object expected) { + super("%nExpecting:%n <%s>%nto be greater than %n <%s>", actual.getValue(), expected); } /** - * Constructor. - * - * @param actual The actual value in the failed assertion. + * Creates a new {@link ShouldBeGreater}. + * + * @param actual The actual value in the failed assertion. * @param expected The expected value to compare to. + * @return the created {@code ErrorMessageFactory}. */ - private ShouldBeGreater(Value actual, Object expected) { - super("%nExpecting:%n <%s>%nto be greater than %n <%s>", actual.getValue(), expected); + public static ErrorMessageFactory shouldBeGreater(Value actual, Object expected) { + return new ShouldBeGreater(actual, expected); } } diff --git a/src/main/java/org/assertj/db/error/ShouldBeGreaterOrEqual.java b/src/main/java/org/assertj/db/error/ShouldBeGreaterOrEqual.java index df86d4dd..65d40316 100644 --- a/src/main/java/org/assertj/db/error/ShouldBeGreaterOrEqual.java +++ b/src/main/java/org/assertj/db/error/ShouldBeGreaterOrEqual.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.error; @@ -19,30 +19,29 @@ /** * Creates an error message indicating that an assertion that verifies that a value is greater than or equal to another * value. - * + * * @author Régis Pouiller - * */ public class ShouldBeGreaterOrEqual extends BasicErrorMessageFactory { /** - * Creates a new {@link ShouldBeGreaterOrEqual}. - * - * @param actual The actual value in the failed assertion. + * Constructor. + * + * @param actual The actual value in the failed assertion. * @param expected The expected value to compare to. - * @return the created {@code ErrorMessageFactory}. */ - public static ErrorMessageFactory shouldBeGreaterOrEqual(Value actual, Object expected) { - return new ShouldBeGreaterOrEqual(actual, expected); + private ShouldBeGreaterOrEqual(Value actual, Object expected) { + super("%nExpecting:%n <%s>%nto be greater than or equal to %n <%s>", actual.getValue(), expected); } /** - * Constructor. - * - * @param actual The actual value in the failed assertion. + * Creates a new {@link ShouldBeGreaterOrEqual}. + * + * @param actual The actual value in the failed assertion. * @param expected The expected value to compare to. + * @return the created {@code ErrorMessageFactory}. */ - private ShouldBeGreaterOrEqual(Value actual, Object expected) { - super("%nExpecting:%n <%s>%nto be greater than or equal to %n <%s>", actual.getValue(), expected); + public static ErrorMessageFactory shouldBeGreaterOrEqual(Value actual, Object expected) { + return new ShouldBeGreaterOrEqual(actual, expected); } } diff --git a/src/main/java/org/assertj/db/error/ShouldBeLess.java b/src/main/java/org/assertj/db/error/ShouldBeLess.java index 5f870953..92458234 100644 --- a/src/main/java/org/assertj/db/error/ShouldBeLess.java +++ b/src/main/java/org/assertj/db/error/ShouldBeLess.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.error; @@ -18,30 +18,29 @@ /** * Creates an error message indicating that an assertion that verifies that a value is less than another value. - * + * * @author Régis Pouiller - * */ public class ShouldBeLess extends BasicErrorMessageFactory { /** - * Creates a new {@link ShouldBeLess}. - * - * @param actual The actual value in the failed assertion. + * Constructor. + * + * @param actual The actual value in the failed assertion. * @param expected The expected value to compare to. - * @return the created {@code ErrorMessageFactory}. */ - public static ErrorMessageFactory shouldBeLess(Value actual, Object expected) { - return new ShouldBeLess(actual, expected); + private ShouldBeLess(Value actual, Object expected) { + super("%nExpecting:%n <%s>%nto be less than %n <%s>", actual.getValue(), expected); } /** - * Constructor. - * - * @param actual The actual value in the failed assertion. + * Creates a new {@link ShouldBeLess}. + * + * @param actual The actual value in the failed assertion. * @param expected The expected value to compare to. + * @return the created {@code ErrorMessageFactory}. */ - private ShouldBeLess(Value actual, Object expected) { - super("%nExpecting:%n <%s>%nto be less than %n <%s>", actual.getValue(), expected); + public static ErrorMessageFactory shouldBeLess(Value actual, Object expected) { + return new ShouldBeLess(actual, expected); } } diff --git a/src/main/java/org/assertj/db/error/ShouldBeLessOrEqual.java b/src/main/java/org/assertj/db/error/ShouldBeLessOrEqual.java index afc55a3b..c8269952 100644 --- a/src/main/java/org/assertj/db/error/ShouldBeLessOrEqual.java +++ b/src/main/java/org/assertj/db/error/ShouldBeLessOrEqual.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.error; @@ -19,30 +19,29 @@ /** * Creates an error message indicating that an assertion that verifies that a value is less than or equal to another * value. - * + * * @author Régis Pouiller - * */ public class ShouldBeLessOrEqual extends BasicErrorMessageFactory { /** - * Creates a new {@link ShouldBeLessOrEqual}. - * - * @param actual The actual value in the failed assertion. + * Constructor. + * + * @param actual The actual value in the failed assertion. * @param expected The expected value to compare to. - * @return the created {@code ErrorMessageFactory}. */ - public static ErrorMessageFactory shouldBeLessOrEqual(Value actual, Object expected) { - return new ShouldBeLessOrEqual(actual, expected); + private ShouldBeLessOrEqual(Value actual, Object expected) { + super("%nExpecting:%n <%s>%nto be less than or equal to %n <%s>", actual.getValue(), expected); } /** - * Constructor. - * - * @param actual The actual value in the failed assertion. + * Creates a new {@link ShouldBeLessOrEqual}. + * + * @param actual The actual value in the failed assertion. * @param expected The expected value to compare to. + * @return the created {@code ErrorMessageFactory}. */ - private ShouldBeLessOrEqual(Value actual, Object expected) { - super("%nExpecting:%n <%s>%nto be less than or equal to %n <%s>", actual.getValue(), expected); + public static ErrorMessageFactory shouldBeLessOrEqual(Value actual, Object expected) { + return new ShouldBeLessOrEqual(actual, expected); } } diff --git a/src/main/java/org/assertj/db/error/ShouldBeModified.java b/src/main/java/org/assertj/db/error/ShouldBeModified.java index 9c9d9fcb..2140cab1 100644 --- a/src/main/java/org/assertj/db/error/ShouldBeModified.java +++ b/src/main/java/org/assertj/db/error/ShouldBeModified.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.error; @@ -20,28 +20,27 @@ * Creates an error message indicating that an assertion that verifies that a column is modified. * * @author Régis Pouiller - * */ public class ShouldBeModified extends BasicErrorMessageFactory { /** - * Creates a new {@link ShouldBeModified}. + * Constructor. * * @param valueAtStartPoint The value at start point. - * @param valueAtEndPoint The value at end point. - * @return the created {@code ErrorMessageFactory}. + * @param valueAtEndPoint The value at end point. */ - public static ErrorMessageFactory shouldBeModified(Value valueAtStartPoint, Value valueAtEndPoint) { - return new ShouldBeModified(valueAtStartPoint, valueAtEndPoint); + private ShouldBeModified(Value valueAtStartPoint, Value valueAtEndPoint) { + super("%nExpecting :%n <%s>%nis modified but is still:%n <%s>", valueAtStartPoint.getValue(), valueAtEndPoint.getValue()); } /** - * Constructor. + * Creates a new {@link ShouldBeModified}. * * @param valueAtStartPoint The value at start point. - * @param valueAtEndPoint The value at end point. + * @param valueAtEndPoint The value at end point. + * @return the created {@code ErrorMessageFactory}. */ - private ShouldBeModified(Value valueAtStartPoint, Value valueAtEndPoint) { - super("%nExpecting :%n <%s>%nis modified but is still:%n <%s>", valueAtStartPoint.getValue(), valueAtEndPoint.getValue()); + public static ErrorMessageFactory shouldBeModified(Value valueAtStartPoint, Value valueAtEndPoint) { + return new ShouldBeModified(valueAtStartPoint, valueAtEndPoint); } } diff --git a/src/main/java/org/assertj/db/error/ShouldBeOnTable.java b/src/main/java/org/assertj/db/error/ShouldBeOnTable.java index eee473e9..ba515d53 100644 --- a/src/main/java/org/assertj/db/error/ShouldBeOnTable.java +++ b/src/main/java/org/assertj/db/error/ShouldBeOnTable.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.error; @@ -23,26 +23,26 @@ public class ShouldBeOnTable extends BasicErrorMessageFactory { private static final String EXPECTED_MESSAGE = - "%nExpecting to be on the table:%n" + " <%s>%nbut was on the table:%n <%s>"; + "%nExpecting to be on the table:%n" + " <%s>%nbut was on the table:%n <%s>"; /** - * Creates a new {@link ShouldBeOnTable}. + * Constructor. * * @param expected The expected table. * @param tested The tested table. - * @return the created {@code ErrorMessageFactory}. */ - public static ErrorMessageFactory shouldBeOnTable(String expected, String tested) { - return new ShouldBeOnTable(expected, tested); + private ShouldBeOnTable(String expected, String tested) { + super(EXPECTED_MESSAGE, expected, tested); } /** - * Constructor. + * Creates a new {@link ShouldBeOnTable}. * * @param expected The expected table. * @param tested The tested table. + * @return the created {@code ErrorMessageFactory}. */ - private ShouldBeOnTable(String expected, String tested) { - super(EXPECTED_MESSAGE, expected, tested); + public static ErrorMessageFactory shouldBeOnTable(String expected, String tested) { + return new ShouldBeOnTable(expected, tested); } } diff --git a/src/main/java/org/assertj/db/error/ShouldBeValueClass.java b/src/main/java/org/assertj/db/error/ShouldBeValueClass.java index b1bfbdde..ed2646db 100644 --- a/src/main/java/org/assertj/db/error/ShouldBeValueClass.java +++ b/src/main/java/org/assertj/db/error/ShouldBeValueClass.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.error; @@ -25,48 +25,19 @@ public class ShouldBeValueClass extends BasicErrorMessageFactory { private static final String EXPECTED_MESSAGE = - "%nExpecting:%n <%s>%nto be of class%n <%s>%nbut was of class%n <%s>"; + "%nExpecting:%n <%s>%nto be of class%n <%s>%nbut was of class%n <%s>"; private static final String EXPECTED_MESSAGE_WITH_INDEX = - "%nExpecting that the value at index %s:%n <%s>%nto be of class%n <%s>%nbut was of class%n <%s>"; + "%nExpecting that the value at index %s:%n <%s>%nto be of class%n <%s>%nbut was of class%n <%s>"; private static final String EXPECTED_MESSAGE_JUST_WITH_EXPECTED = - "%nExpecting:%n <%s>%nto be of class%n <%s>"; + "%nExpecting:%n <%s>%nto be of class%n <%s>"; private static final String EXPECTED_MESSAGE_JUST_WITH_EXPECTED_WITH_INDEX = - "%nExpecting that the value at index %s:%n <%s>%nto be of class%n <%s>"; - - /** - * Creates a new {@link ShouldBeValueClass}. - * - * @param actual The actual value in the failed assertion. - * @param expected The expected class. - * @return the created {@code ErrorMessageFactory}. - */ - public static ErrorMessageFactory shouldBeValueClass(Value actual, Class expected) { - if (actual.getValue() == null) { - return new ShouldBeValueClass(actual, expected); - } - return new ShouldBeValueClass(actual, actual.getValue().getClass(), expected); - } - - /** - * Creates a new {@link ShouldBeValueType}. - * - * @param index The index of the value. - * @param actual The actual value in the failed assertion. - * @param expected The expected type. - * @return the created {@code ErrorMessageFactory}. - */ - public static ErrorMessageFactory shouldBeValueClass(int index, Value actual, Class expected) { - if (actual.getValue() == null) { - return new ShouldBeValueClass(index, actual, expected); - } - return new ShouldBeValueClass(index, actual, actual.getValue().getClass(), expected); - } + "%nExpecting that the value at index %s:%n <%s>%nto be of class%n <%s>"; /** * Constructor. * - * @param actual The actual value in the failed assertion. - * @param tested The tested class. + * @param actual The actual value in the failed assertion. + * @param tested The tested class. * @param expected The expected class. */ private ShouldBeValueClass(Value actual, Class tested, Class expected) { @@ -76,9 +47,9 @@ private ShouldBeValueClass(Value actual, Class tested, Class expected) { /** * Constructor. * - * @param index The index of the value. - * @param actual The actual value in the failed assertion. - * @param tested The tested class. + * @param index The index of the value. + * @param actual The actual value in the failed assertion. + * @param tested The tested class. * @param expected The expected class. */ private ShouldBeValueClass(int index, Value actual, Class tested, Class expected) { @@ -88,7 +59,7 @@ private ShouldBeValueClass(int index, Value actual, Class tested, Class ex /** * Constructor. * - * @param actual The actual value in the failed assertion. + * @param actual The actual value in the failed assertion. * @param expected The expected class. */ private ShouldBeValueClass(Value actual, Class expected) { @@ -98,11 +69,40 @@ private ShouldBeValueClass(Value actual, Class expected) { /** * Constructor. * - * @param index The index of the value. - * @param actual The actual value in the failed assertion. + * @param index The index of the value. + * @param actual The actual value in the failed assertion. * @param expected The expected class. */ private ShouldBeValueClass(int index, Value actual, Class expected) { super(EXPECTED_MESSAGE_JUST_WITH_EXPECTED_WITH_INDEX, index, actual.getValue(), expected); } + + /** + * Creates a new {@link ShouldBeValueClass}. + * + * @param actual The actual value in the failed assertion. + * @param expected The expected class. + * @return the created {@code ErrorMessageFactory}. + */ + public static ErrorMessageFactory shouldBeValueClass(Value actual, Class expected) { + if (actual.getValue() == null) { + return new ShouldBeValueClass(actual, expected); + } + return new ShouldBeValueClass(actual, actual.getValue().getClass(), expected); + } + + /** + * Creates a new {@link ShouldBeValueType}. + * + * @param index The index of the value. + * @param actual The actual value in the failed assertion. + * @param expected The expected type. + * @return the created {@code ErrorMessageFactory}. + */ + public static ErrorMessageFactory shouldBeValueClass(int index, Value actual, Class expected) { + if (actual.getValue() == null) { + return new ShouldBeValueClass(index, actual, expected); + } + return new ShouldBeValueClass(index, actual, actual.getValue().getClass(), expected); + } } diff --git a/src/main/java/org/assertj/db/error/ShouldBeValueClassWithEndPoint.java b/src/main/java/org/assertj/db/error/ShouldBeValueClassWithEndPoint.java index e6f4832e..8fdb3c26 100644 --- a/src/main/java/org/assertj/db/error/ShouldBeValueClassWithEndPoint.java +++ b/src/main/java/org/assertj/db/error/ShouldBeValueClassWithEndPoint.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.error; @@ -18,49 +18,48 @@ /** * Creates an error message indicating that an assertion that verifies that a value is of a class. - * + * * @author Régis Pouiller - * */ public class ShouldBeValueClassWithEndPoint extends BasicErrorMessageFactory { private static final String EXPECTED_MESSAGE = - "%nExpecting that the value at end point:%n <%s>%nto be of class%n <%s>%nbut was of class%n <%s>"; + "%nExpecting that the value at end point:%n <%s>%nto be of class%n <%s>%nbut was of class%n <%s>"; private static final String EXPECTED_MESSAGE_JUST_WITH_EXPECTED = - "%nExpecting that the value at end point:%n <%s>%nto be of class%n <%s>"; + "%nExpecting that the value at end point:%n <%s>%nto be of class%n <%s>"; /** - * Creates a new {@link org.assertj.db.error.ShouldBeValueClassWithEndPoint}. + * Constructor. * - * @param actual The actual value in the failed assertion. + * @param actual The actual value in the failed assertion. + * @param tested The tested class. * @param expected The expected class. - * @return the created {@code ErrorMessageFactory}. */ - public static ErrorMessageFactory shouldBeValueClassWithEndPoint(Value actual, Class expected) { - if (actual.getValue() == null) { - return new ShouldBeValueClassWithEndPoint(actual, expected); - } - return new ShouldBeValueClassWithEndPoint(actual, actual.getValue().getClass(), expected); + private ShouldBeValueClassWithEndPoint(Value actual, Class tested, Class expected) { + super(EXPECTED_MESSAGE, actual.getValue(), expected, tested); } /** * Constructor. * - * @param actual The actual value in the failed assertion. - * @param tested The tested class. + * @param actual The actual value in the failed assertion. * @param expected The expected class. */ - private ShouldBeValueClassWithEndPoint(Value actual, Class tested, Class expected) { - super(EXPECTED_MESSAGE, actual.getValue(), expected, tested); + private ShouldBeValueClassWithEndPoint(Value actual, Class expected) { + super(EXPECTED_MESSAGE_JUST_WITH_EXPECTED, actual.getValue(), expected); } /** - * Constructor. + * Creates a new {@link org.assertj.db.error.ShouldBeValueClassWithEndPoint}. * - * @param actual The actual value in the failed assertion. + * @param actual The actual value in the failed assertion. * @param expected The expected class. + * @return the created {@code ErrorMessageFactory}. */ - private ShouldBeValueClassWithEndPoint(Value actual, Class expected) { - super(EXPECTED_MESSAGE_JUST_WITH_EXPECTED, actual.getValue(), expected); + public static ErrorMessageFactory shouldBeValueClassWithEndPoint(Value actual, Class expected) { + if (actual.getValue() == null) { + return new ShouldBeValueClassWithEndPoint(actual, expected); + } + return new ShouldBeValueClassWithEndPoint(actual, actual.getValue().getClass(), expected); } } diff --git a/src/main/java/org/assertj/db/error/ShouldBeValueClassWithStartPoint.java b/src/main/java/org/assertj/db/error/ShouldBeValueClassWithStartPoint.java index c4d8c10b..63b9cb04 100644 --- a/src/main/java/org/assertj/db/error/ShouldBeValueClassWithStartPoint.java +++ b/src/main/java/org/assertj/db/error/ShouldBeValueClassWithStartPoint.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.error; @@ -18,49 +18,48 @@ /** * Creates an error message indicating that an assertion that verifies that a value is of a class. - * + * * @author Régis Pouiller - * */ public class ShouldBeValueClassWithStartPoint extends BasicErrorMessageFactory { private static final String EXPECTED_MESSAGE = - "%nExpecting that the value at start point:%n <%s>%nto be of class%n <%s>%nbut was of class%n <%s>"; + "%nExpecting that the value at start point:%n <%s>%nto be of class%n <%s>%nbut was of class%n <%s>"; private static final String EXPECTED_MESSAGE_JUST_WITH_EXPECTED = - "%nExpecting that the value at start point:%n <%s>%nto be of class%n <%s>"; + "%nExpecting that the value at start point:%n <%s>%nto be of class%n <%s>"; /** - * Creates a new {@link org.assertj.db.error.ShouldBeValueClassWithStartPoint}. + * Constructor. * - * @param actual The actual value in the failed assertion. + * @param actual The actual value in the failed assertion. + * @param tested The tested class. * @param expected The expected class. - * @return the created {@code ErrorMessageFactory}. */ - public static ErrorMessageFactory shouldBeValueClassWithStartPoint(Value actual, Class expected) { - if (actual.getValue() == null) { - return new ShouldBeValueClassWithStartPoint(actual, expected); - } - return new ShouldBeValueClassWithStartPoint(actual, actual.getValue().getClass(), expected); + private ShouldBeValueClassWithStartPoint(Value actual, Class tested, Class expected) { + super(EXPECTED_MESSAGE, actual.getValue(), expected, tested); } /** * Constructor. * - * @param actual The actual value in the failed assertion. - * @param tested The tested class. + * @param actual The actual value in the failed assertion. * @param expected The expected class. */ - private ShouldBeValueClassWithStartPoint(Value actual, Class tested, Class expected) { - super(EXPECTED_MESSAGE, actual.getValue(), expected, tested); + private ShouldBeValueClassWithStartPoint(Value actual, Class expected) { + super(EXPECTED_MESSAGE_JUST_WITH_EXPECTED, actual.getValue(), expected); } /** - * Constructor. + * Creates a new {@link org.assertj.db.error.ShouldBeValueClassWithStartPoint}. * - * @param actual The actual value in the failed assertion. + * @param actual The actual value in the failed assertion. * @param expected The expected class. + * @return the created {@code ErrorMessageFactory}. */ - private ShouldBeValueClassWithStartPoint(Value actual, Class expected) { - super(EXPECTED_MESSAGE_JUST_WITH_EXPECTED, actual.getValue(), expected); + public static ErrorMessageFactory shouldBeValueClassWithStartPoint(Value actual, Class expected) { + if (actual.getValue() == null) { + return new ShouldBeValueClassWithStartPoint(actual, expected); + } + return new ShouldBeValueClassWithStartPoint(actual, actual.getValue().getClass(), expected); } } diff --git a/src/main/java/org/assertj/db/error/ShouldBeValueType.java b/src/main/java/org/assertj/db/error/ShouldBeValueType.java index edf381fc..e8b761f3 100644 --- a/src/main/java/org/assertj/db/error/ShouldBeValueType.java +++ b/src/main/java/org/assertj/db/error/ShouldBeValueType.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.error; @@ -19,57 +19,25 @@ /** * Creates an error message indicating that an assertion that verifies that a value is of a type. - * + * * @author Régis Pouiller - * */ public class ShouldBeValueType extends BasicErrorMessageFactory { private static final String EXPECTED_MESSAGE = - "%nExpecting:%n <%s>%nto be of type%n <%s>%nbut was of type%n <%s>"; + "%nExpecting:%n <%s>%nto be of type%n <%s>%nbut was of type%n <%s>"; private static final String EXPECTED_MESSAGE_WITH_INDEX = - "%nExpecting that the value at index %s:%n <%s>%nto be of type%n <%s>%nbut was of type%n <%s>"; + "%nExpecting that the value at index %s:%n <%s>%nto be of type%n <%s>%nbut was of type%n <%s>"; private static final String EXPECTED_MESSAGE_NOT_IDENTIFIED = - "%nExpecting:%n <%s>%nto be of type%n <%s>%nbut was of type%n <%s> (%s)"; + "%nExpecting:%n <%s>%nto be of type%n <%s>%nbut was of type%n <%s> (%s)"; private static final String EXPECTED_MESSAGE_NOT_IDENTIFIED_WITH_INDEX = - "%nExpecting that the value at index %s:%n <%s>%nto be of type%n <%s>%nbut was of type%n <%s> (%s)"; - - /** - * Creates a new {@link ShouldBeValueType}. - * - * @param actual The actual value in the failed assertion. - * @param tested The tested type. - * @param expected The expected type. - * @return the created {@code ErrorMessageFactory}. - */ - public static ErrorMessageFactory shouldBeValueType(Value actual, ValueType tested, ValueType expected) { - if (actual.getValue() != null && tested == ValueType.NOT_IDENTIFIED) { - return new ShouldBeValueType(actual, actual.getValue().getClass(), tested, expected); - } - return new ShouldBeValueType(actual, tested, expected); - } - - /** - * Creates a new {@link ShouldBeValueType}. - * - * @param index The index of the value. - * @param actual The actual value in the failed assertion. - * @param tested The tested type. - * @param expected The expected type. - * @return the created {@code ErrorMessageFactory}. - */ - public static ErrorMessageFactory shouldBeValueType(int index, Value actual, ValueType tested, ValueType expected) { - if (actual.getValue() != null && tested == ValueType.NOT_IDENTIFIED) { - return new ShouldBeValueType(index, actual, actual.getValue().getClass(), tested, expected); - } - return new ShouldBeValueType(index, actual, tested, expected); - } + "%nExpecting that the value at index %s:%n <%s>%nto be of type%n <%s>%nbut was of type%n <%s> (%s)"; /** * Constructor. - * - * @param actual The actual value in the failed assertion. - * @param tested The tested type. + * + * @param actual The actual value in the failed assertion. + * @param tested The tested type. * @param expected The expected type. */ private ShouldBeValueType(Value actual, ValueType tested, ValueType expected) { @@ -78,10 +46,10 @@ private ShouldBeValueType(Value actual, ValueType tested, ValueType expected) { /** * Constructor. - * - * @param index The index of the value. - * @param actual The actual value in the failed assertion. - * @param tested The tested type. + * + * @param index The index of the value. + * @param actual The actual value in the failed assertion. + * @param tested The tested type. * @param expected The expected type. */ private ShouldBeValueType(int index, Value actual, ValueType tested, ValueType expected) { @@ -91,10 +59,10 @@ private ShouldBeValueType(int index, Value actual, ValueType tested, ValueType e /** * Constructor. * - * @param actual The actual value in the failed assertion. + * @param actual The actual value in the failed assertion. * @param classOfActual Class of the actual value (for not identified type). - * @param tested The tested type. - * @param expected The expected type. + * @param tested The tested type. + * @param expected The expected type. */ private ShouldBeValueType(Value actual, Class classOfActual, ValueType tested, ValueType expected) { super(EXPECTED_MESSAGE_NOT_IDENTIFIED, actual.getValue(), expected, tested, classOfActual); @@ -103,13 +71,44 @@ private ShouldBeValueType(Value actual, Class classOfActual, ValueType tested /** * Constructor. * - * @param index The index of the value. - * @param actual The actual value in the failed assertion. + * @param index The index of the value. + * @param actual The actual value in the failed assertion. * @param classOfActual Class of the actual value (for not identified type). - * @param tested The tested type. - * @param expected The expected type. + * @param tested The tested type. + * @param expected The expected type. */ private ShouldBeValueType(int index, Value actual, Class classOfActual, ValueType tested, ValueType expected) { super(EXPECTED_MESSAGE_NOT_IDENTIFIED_WITH_INDEX, index, actual.getValue(), expected, tested, classOfActual); } + + /** + * Creates a new {@link ShouldBeValueType}. + * + * @param actual The actual value in the failed assertion. + * @param tested The tested type. + * @param expected The expected type. + * @return the created {@code ErrorMessageFactory}. + */ + public static ErrorMessageFactory shouldBeValueType(Value actual, ValueType tested, ValueType expected) { + if (actual.getValue() != null && tested == ValueType.NOT_IDENTIFIED) { + return new ShouldBeValueType(actual, actual.getValue().getClass(), tested, expected); + } + return new ShouldBeValueType(actual, tested, expected); + } + + /** + * Creates a new {@link ShouldBeValueType}. + * + * @param index The index of the value. + * @param actual The actual value in the failed assertion. + * @param tested The tested type. + * @param expected The expected type. + * @return the created {@code ErrorMessageFactory}. + */ + public static ErrorMessageFactory shouldBeValueType(int index, Value actual, ValueType tested, ValueType expected) { + if (actual.getValue() != null && tested == ValueType.NOT_IDENTIFIED) { + return new ShouldBeValueType(index, actual, actual.getValue().getClass(), tested, expected); + } + return new ShouldBeValueType(index, actual, tested, expected); + } } diff --git a/src/main/java/org/assertj/db/error/ShouldBeValueTypeOfAny.java b/src/main/java/org/assertj/db/error/ShouldBeValueTypeOfAny.java index 60d80797..e6edf03a 100644 --- a/src/main/java/org/assertj/db/error/ShouldBeValueTypeOfAny.java +++ b/src/main/java/org/assertj/db/error/ShouldBeValueTypeOfAny.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.error; @@ -19,58 +19,25 @@ /** * Creates an error message indicating that an assertion that verifies that a value is of any types. - * + * * @author Régis Pouiller - * */ public class ShouldBeValueTypeOfAny extends BasicErrorMessageFactory { private static final String EXPECTED_MESSAGE = - "%nExpecting:%n <%s>%nto be of type%n <%s>%nbut was of type%n <%s>"; + "%nExpecting:%n <%s>%nto be of type%n <%s>%nbut was of type%n <%s>"; private static final String EXPECTED_MESSAGE_WITH_INDEX = - "%nExpecting that the value at index %s:%n <%s>%nto be of type%n <%s>%nbut was of type%n <%s>"; + "%nExpecting that the value at index %s:%n <%s>%nto be of type%n <%s>%nbut was of type%n <%s>"; private static final String EXPECTED_MESSAGE_NOT_IDENTIFIED = - "%nExpecting:%n <%s>%nto be of type%n <%s>%nbut was of type%n <%s> (%s)"; + "%nExpecting:%n <%s>%nto be of type%n <%s>%nbut was of type%n <%s> (%s)"; private static final String EXPECTED_MESSAGE_NOT_IDENTIFIED_WITH_INDEX = - "%nExpecting that the value at index %s:%n <%s>%nto be of type%n <%s>%nbut was of type%n <%s> (%s)"; - - /** - * Creates a new {@link ShouldBeValueTypeOfAny}. - * - * @param actual The actual value in the failed assertion. - * @param tested The tested type. - * @param expected The expected types. - * @return the created {@code ErrorMessageFactory}. - */ - public static ErrorMessageFactory shouldBeValueTypeOfAny(Value actual, ValueType tested, ValueType... expected) { - if (actual.getValue() != null && tested == ValueType.NOT_IDENTIFIED) { - return new ShouldBeValueTypeOfAny(actual, actual.getValue().getClass(), tested, expected); - } - return new ShouldBeValueTypeOfAny(actual, tested, expected); - } - - /** - * Creates a new {@link ShouldBeValueTypeOfAny}. - * - * @param index The index of the value. - * @param actual The actual value in the failed assertion. - * @param tested The tested type. - * @param expected The expected types. - * @return the created {@code ErrorMessageFactory}. - */ - public static ErrorMessageFactory shouldBeValueTypeOfAny(int index, Value actual, ValueType tested, - ValueType... expected) { - if (actual.getValue() != null && tested == ValueType.NOT_IDENTIFIED) { - return new ShouldBeValueTypeOfAny(index, actual, actual.getValue().getClass(), tested, expected); - } - return new ShouldBeValueTypeOfAny(index, actual, tested, expected); - } + "%nExpecting that the value at index %s:%n <%s>%nto be of type%n <%s>%nbut was of type%n <%s> (%s)"; /** * Constructor. - * - * @param actual The actual value in the failed assertion. - * @param tested The tested type. + * + * @param actual The actual value in the failed assertion. + * @param tested The tested type. * @param expected The expected types. */ private ShouldBeValueTypeOfAny(Value actual, ValueType tested, ValueType... expected) { @@ -79,10 +46,10 @@ private ShouldBeValueTypeOfAny(Value actual, ValueType tested, ValueType... expe /** * Constructor. - * - * @param index The index of the value. - * @param actual The actual value in the failed assertion. - * @param tested The tested type. + * + * @param index The index of the value. + * @param actual The actual value in the failed assertion. + * @param tested The tested type. * @param expected The expected types. */ private ShouldBeValueTypeOfAny(int index, Value actual, ValueType tested, ValueType... expected) { @@ -92,10 +59,10 @@ private ShouldBeValueTypeOfAny(int index, Value actual, ValueType tested, ValueT /** * Constructor. * - * @param actual The actual value in the failed assertion. + * @param actual The actual value in the failed assertion. * @param classOfActual Class of the actual value (for not identified type). - * @param tested The tested type. - * @param expected The expected types. + * @param tested The tested type. + * @param expected The expected types. */ private ShouldBeValueTypeOfAny(Value actual, Class classOfActual, ValueType tested, ValueType... expected) { super(EXPECTED_MESSAGE_NOT_IDENTIFIED, actual.getValue(), expected, tested, classOfActual); @@ -104,13 +71,45 @@ private ShouldBeValueTypeOfAny(Value actual, Class classOfActual, ValueType t /** * Constructor. * - * @param index The index of the value. - * @param actual The actual value in the failed assertion. + * @param index The index of the value. + * @param actual The actual value in the failed assertion. * @param classOfActual Class of the actual value (for not identified type). - * @param tested The tested type. - * @param expected The expected types. + * @param tested The tested type. + * @param expected The expected types. */ private ShouldBeValueTypeOfAny(int index, Value actual, Class classOfActual, ValueType tested, ValueType... expected) { super(EXPECTED_MESSAGE_NOT_IDENTIFIED_WITH_INDEX, index, actual.getValue(), expected, tested, classOfActual); } + + /** + * Creates a new {@link ShouldBeValueTypeOfAny}. + * + * @param actual The actual value in the failed assertion. + * @param tested The tested type. + * @param expected The expected types. + * @return the created {@code ErrorMessageFactory}. + */ + public static ErrorMessageFactory shouldBeValueTypeOfAny(Value actual, ValueType tested, ValueType... expected) { + if (actual.getValue() != null && tested == ValueType.NOT_IDENTIFIED) { + return new ShouldBeValueTypeOfAny(actual, actual.getValue().getClass(), tested, expected); + } + return new ShouldBeValueTypeOfAny(actual, tested, expected); + } + + /** + * Creates a new {@link ShouldBeValueTypeOfAny}. + * + * @param index The index of the value. + * @param actual The actual value in the failed assertion. + * @param tested The tested type. + * @param expected The expected types. + * @return the created {@code ErrorMessageFactory}. + */ + public static ErrorMessageFactory shouldBeValueTypeOfAny(int index, Value actual, ValueType tested, + ValueType... expected) { + if (actual.getValue() != null && tested == ValueType.NOT_IDENTIFIED) { + return new ShouldBeValueTypeOfAny(index, actual, actual.getValue().getClass(), tested, expected); + } + return new ShouldBeValueTypeOfAny(index, actual, tested, expected); + } } diff --git a/src/main/java/org/assertj/db/error/ShouldBeValueTypeOfAnyWithEndPoint.java b/src/main/java/org/assertj/db/error/ShouldBeValueTypeOfAnyWithEndPoint.java index dd8f74c9..f8e52930 100644 --- a/src/main/java/org/assertj/db/error/ShouldBeValueTypeOfAnyWithEndPoint.java +++ b/src/main/java/org/assertj/db/error/ShouldBeValueTypeOfAnyWithEndPoint.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.error; @@ -19,38 +19,21 @@ /** * Creates an error message indicating that an assertion that verifies that a value is of any types. - * + * * @author Régis Pouiller - * */ public class ShouldBeValueTypeOfAnyWithEndPoint extends BasicErrorMessageFactory { private static final String EXPECTED_MESSAGE = - "%nExpecting that the value at end point:%n <%s>%nto be of type%n <%s>%nbut was of type%n <%s>"; + "%nExpecting that the value at end point:%n <%s>%nto be of type%n <%s>%nbut was of type%n <%s>"; private static final String EXPECTED_MESSAGE_NOT_IDENTIFIED = - "%nExpecting that the value at end point:%n <%s>%nto be of type%n <%s>%nbut was of type%n <%s> (%s)"; - - /** - * Creates a new {@link org.assertj.db.error.ShouldBeValueTypeOfAnyWithEndPoint}. - * - * @param actual The actual value in the failed assertion. - * @param tested The tested type. - * @param expected The expected types. - * @return the created {@code ErrorMessageFactory}. - */ - public static ErrorMessageFactory shouldBeValueTypeOfAnyWithEndPoint(Value actual, ValueType tested, - ValueType... expected) { - if (actual.getValue() != null && tested == ValueType.NOT_IDENTIFIED) { - return new ShouldBeValueTypeOfAnyWithEndPoint(actual, actual.getValue().getClass(), tested, expected); - } - return new ShouldBeValueTypeOfAnyWithEndPoint(actual, tested, expected); - } + "%nExpecting that the value at end point:%n <%s>%nto be of type%n <%s>%nbut was of type%n <%s> (%s)"; /** * Constructor. * - * @param actual The actual value in the failed assertion. - * @param tested The tested type. + * @param actual The actual value in the failed assertion. + * @param tested The tested type. * @param expected The expected types. */ private ShouldBeValueTypeOfAnyWithEndPoint(Value actual, ValueType tested, ValueType... expected) { @@ -60,12 +43,28 @@ private ShouldBeValueTypeOfAnyWithEndPoint(Value actual, ValueType tested, Value /** * Constructor. * - * @param actual The actual value in the failed assertion. + * @param actual The actual value in the failed assertion. * @param classOfActual Class of the actual value (for not identified type). - * @param tested The tested type. - * @param expected The expected types. + * @param tested The tested type. + * @param expected The expected types. */ private ShouldBeValueTypeOfAnyWithEndPoint(Value actual, Class classOfActual, ValueType tested, ValueType... expected) { super(EXPECTED_MESSAGE_NOT_IDENTIFIED, actual.getValue(), expected, tested, classOfActual); } + + /** + * Creates a new {@link org.assertj.db.error.ShouldBeValueTypeOfAnyWithEndPoint}. + * + * @param actual The actual value in the failed assertion. + * @param tested The tested type. + * @param expected The expected types. + * @return the created {@code ErrorMessageFactory}. + */ + public static ErrorMessageFactory shouldBeValueTypeOfAnyWithEndPoint(Value actual, ValueType tested, + ValueType... expected) { + if (actual.getValue() != null && tested == ValueType.NOT_IDENTIFIED) { + return new ShouldBeValueTypeOfAnyWithEndPoint(actual, actual.getValue().getClass(), tested, expected); + } + return new ShouldBeValueTypeOfAnyWithEndPoint(actual, tested, expected); + } } diff --git a/src/main/java/org/assertj/db/error/ShouldBeValueTypeOfAnyWithStartPoint.java b/src/main/java/org/assertj/db/error/ShouldBeValueTypeOfAnyWithStartPoint.java index 17d88155..6031abef 100644 --- a/src/main/java/org/assertj/db/error/ShouldBeValueTypeOfAnyWithStartPoint.java +++ b/src/main/java/org/assertj/db/error/ShouldBeValueTypeOfAnyWithStartPoint.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.error; @@ -19,38 +19,21 @@ /** * Creates an error message indicating that an assertion that verifies that a value is of any types. - * + * * @author Régis Pouiller - * */ public class ShouldBeValueTypeOfAnyWithStartPoint extends BasicErrorMessageFactory { private static final String EXPECTED_MESSAGE = - "%nExpecting that the value at start point:%n <%s>%nto be of type%n <%s>%nbut was of type%n <%s>"; + "%nExpecting that the value at start point:%n <%s>%nto be of type%n <%s>%nbut was of type%n <%s>"; private static final String EXPECTED_MESSAGE_NOT_IDENTIFIED = - "%nExpecting that the value at start point:%n <%s>%nto be of type%n <%s>%nbut was of type%n <%s> (%s)"; - - /** - * Creates a new {@link org.assertj.db.error.ShouldBeValueTypeOfAnyWithStartPoint}. - * - * @param actual The actual value in the failed assertion. - * @param tested The tested type. - * @param expected The expected types. - * @return the created {@code ErrorMessageFactory}. - */ - public static ErrorMessageFactory shouldBeValueTypeOfAnyWithStartPoint(Value actual, ValueType tested, - ValueType... expected) { - if (actual.getValue() != null && tested == ValueType.NOT_IDENTIFIED) { - return new ShouldBeValueTypeOfAnyWithStartPoint(actual, actual.getValue().getClass(), tested, expected); - } - return new ShouldBeValueTypeOfAnyWithStartPoint(actual, tested, expected); - } + "%nExpecting that the value at start point:%n <%s>%nto be of type%n <%s>%nbut was of type%n <%s> (%s)"; /** * Constructor. * - * @param actual The actual value in the failed assertion. - * @param tested The tested type. + * @param actual The actual value in the failed assertion. + * @param tested The tested type. * @param expected The expected types. */ private ShouldBeValueTypeOfAnyWithStartPoint(Value actual, ValueType tested, ValueType... expected) { @@ -60,12 +43,28 @@ private ShouldBeValueTypeOfAnyWithStartPoint(Value actual, ValueType tested, Val /** * Constructor. * - * @param actual The actual value in the failed assertion. + * @param actual The actual value in the failed assertion. * @param classOfActual Class of the actual value (for not identified type). - * @param tested The tested type. - * @param expected The expected types. + * @param tested The tested type. + * @param expected The expected types. */ private ShouldBeValueTypeOfAnyWithStartPoint(Value actual, Class classOfActual, ValueType tested, ValueType... expected) { super(EXPECTED_MESSAGE_NOT_IDENTIFIED, actual.getValue(), expected, tested, classOfActual); } + + /** + * Creates a new {@link org.assertj.db.error.ShouldBeValueTypeOfAnyWithStartPoint}. + * + * @param actual The actual value in the failed assertion. + * @param tested The tested type. + * @param expected The expected types. + * @return the created {@code ErrorMessageFactory}. + */ + public static ErrorMessageFactory shouldBeValueTypeOfAnyWithStartPoint(Value actual, ValueType tested, + ValueType... expected) { + if (actual.getValue() != null && tested == ValueType.NOT_IDENTIFIED) { + return new ShouldBeValueTypeOfAnyWithStartPoint(actual, actual.getValue().getClass(), tested, expected); + } + return new ShouldBeValueTypeOfAnyWithStartPoint(actual, tested, expected); + } } diff --git a/src/main/java/org/assertj/db/error/ShouldBeValueTypeWithEndPoint.java b/src/main/java/org/assertj/db/error/ShouldBeValueTypeWithEndPoint.java index 283c7fec..c17194ab 100644 --- a/src/main/java/org/assertj/db/error/ShouldBeValueTypeWithEndPoint.java +++ b/src/main/java/org/assertj/db/error/ShouldBeValueTypeWithEndPoint.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.error; @@ -19,37 +19,21 @@ /** * Creates an error message indicating that an assertion that verifies that a value is of a type. - * + * * @author Régis Pouiller - * */ public class ShouldBeValueTypeWithEndPoint extends BasicErrorMessageFactory { private static final String EXPECTED_MESSAGE = - "%nExpecting that the value at end point:%n <%s>%nto be of type%n <%s>%nbut was of type%n <%s>"; + "%nExpecting that the value at end point:%n <%s>%nto be of type%n <%s>%nbut was of type%n <%s>"; private static final String EXPECTED_MESSAGE_NOT_IDENTIFIED = - "%nExpecting that the value at end point:%n <%s>%nto be of type%n <%s>%nbut was of type%n <%s> (%s)"; - - /** - * Creates a new {@link org.assertj.db.error.ShouldBeValueTypeWithEndPoint}. - * - * @param actual The actual value in the failed assertion. - * @param tested The tested type. - * @param expected The expected type. - * @return the created {@code ErrorMessageFactory}. - */ - public static ErrorMessageFactory shouldBeValueTypeWithEndPoint(Value actual, ValueType tested, ValueType expected) { - if (actual.getValue() != null && tested == ValueType.NOT_IDENTIFIED) { - return new ShouldBeValueTypeWithEndPoint(actual, actual.getValue().getClass(), tested, expected); - } - return new ShouldBeValueTypeWithEndPoint(actual, tested, expected); - } + "%nExpecting that the value at end point:%n <%s>%nto be of type%n <%s>%nbut was of type%n <%s> (%s)"; /** * Constructor. * - * @param actual The actual value in the failed assertion. - * @param tested The tested type. + * @param actual The actual value in the failed assertion. + * @param tested The tested type. * @param expected The expected type. */ private ShouldBeValueTypeWithEndPoint(Value actual, ValueType tested, ValueType expected) { @@ -59,12 +43,27 @@ private ShouldBeValueTypeWithEndPoint(Value actual, ValueType tested, ValueType /** * Constructor. * - * @param actual The actual value in the failed assertion. + * @param actual The actual value in the failed assertion. * @param classOfActual Class of the actual value (for not identified type). - * @param tested The tested type. - * @param expected The expected type. + * @param tested The tested type. + * @param expected The expected type. */ private ShouldBeValueTypeWithEndPoint(Value actual, Class classOfActual, ValueType tested, ValueType expected) { super(EXPECTED_MESSAGE_NOT_IDENTIFIED, actual.getValue(), expected, tested, classOfActual); } + + /** + * Creates a new {@link org.assertj.db.error.ShouldBeValueTypeWithEndPoint}. + * + * @param actual The actual value in the failed assertion. + * @param tested The tested type. + * @param expected The expected type. + * @return the created {@code ErrorMessageFactory}. + */ + public static ErrorMessageFactory shouldBeValueTypeWithEndPoint(Value actual, ValueType tested, ValueType expected) { + if (actual.getValue() != null && tested == ValueType.NOT_IDENTIFIED) { + return new ShouldBeValueTypeWithEndPoint(actual, actual.getValue().getClass(), tested, expected); + } + return new ShouldBeValueTypeWithEndPoint(actual, tested, expected); + } } diff --git a/src/main/java/org/assertj/db/error/ShouldBeValueTypeWithStartPoint.java b/src/main/java/org/assertj/db/error/ShouldBeValueTypeWithStartPoint.java index 9fa8ce19..cdc2066c 100644 --- a/src/main/java/org/assertj/db/error/ShouldBeValueTypeWithStartPoint.java +++ b/src/main/java/org/assertj/db/error/ShouldBeValueTypeWithStartPoint.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.error; @@ -19,37 +19,21 @@ /** * Creates an error message indicating that an assertion that verifies that a value is of a type. - * + * * @author Régis Pouiller - * */ public class ShouldBeValueTypeWithStartPoint extends BasicErrorMessageFactory { private static final String EXPECTED_MESSAGE = - "%nExpecting that the value at start point:%n <%s>%nto be of type%n <%s>%nbut was of type%n <%s>"; + "%nExpecting that the value at start point:%n <%s>%nto be of type%n <%s>%nbut was of type%n <%s>"; private static final String EXPECTED_MESSAGE_NOT_IDENTIFIED = - "%nExpecting that the value at start point:%n <%s>%nto be of type%n <%s>%nbut was of type%n <%s> (%s)"; - - /** - * Creates a new {@link org.assertj.db.error.ShouldBeValueTypeWithStartPoint}. - * - * @param actual The actual value in the failed assertion. - * @param tested The tested type. - * @param expected The expected type. - * @return the created {@code ErrorMessageFactory}. - */ - public static ErrorMessageFactory shouldBeValueTypeWithStartPoint(Value actual, ValueType tested, ValueType expected) { - if (actual.getValue() != null && tested == ValueType.NOT_IDENTIFIED) { - return new ShouldBeValueTypeWithStartPoint(actual, actual.getValue().getClass(), tested, expected); - } - return new ShouldBeValueTypeWithStartPoint(actual, tested, expected); - } + "%nExpecting that the value at start point:%n <%s>%nto be of type%n <%s>%nbut was of type%n <%s> (%s)"; /** * Constructor. * - * @param actual The actual value in the failed assertion. - * @param tested The tested type. + * @param actual The actual value in the failed assertion. + * @param tested The tested type. * @param expected The expected type. */ private ShouldBeValueTypeWithStartPoint(Value actual, ValueType tested, ValueType expected) { @@ -59,12 +43,27 @@ private ShouldBeValueTypeWithStartPoint(Value actual, ValueType tested, ValueTyp /** * Constructor. * - * @param actual The actual value in the failed assertion. + * @param actual The actual value in the failed assertion. * @param classOfActual Class of the actual value (for not identified type). - * @param tested The tested type. - * @param expected The expected type. + * @param tested The tested type. + * @param expected The expected type. */ private ShouldBeValueTypeWithStartPoint(Value actual, Class classOfActual, ValueType tested, ValueType expected) { super(EXPECTED_MESSAGE_NOT_IDENTIFIED, actual.getValue(), expected, tested, classOfActual); } + + /** + * Creates a new {@link org.assertj.db.error.ShouldBeValueTypeWithStartPoint}. + * + * @param actual The actual value in the failed assertion. + * @param tested The tested type. + * @param expected The expected type. + * @return the created {@code ErrorMessageFactory}. + */ + public static ErrorMessageFactory shouldBeValueTypeWithStartPoint(Value actual, ValueType tested, ValueType expected) { + if (actual.getValue() != null && tested == ValueType.NOT_IDENTIFIED) { + return new ShouldBeValueTypeWithStartPoint(actual, actual.getValue().getClass(), tested, expected); + } + return new ShouldBeValueTypeWithStartPoint(actual, tested, expected); + } } diff --git a/src/main/java/org/assertj/db/error/ShouldContainsOnlyNotNull.java b/src/main/java/org/assertj/db/error/ShouldContainsOnlyNotNull.java index 28cfb2e1..5b12dfa2 100644 --- a/src/main/java/org/assertj/db/error/ShouldContainsOnlyNotNull.java +++ b/src/main/java/org/assertj/db/error/ShouldContainsOnlyNotNull.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.error; @@ -17,28 +17,27 @@ /** * Creates an error message indicating that an assertion that verifies that a value is null. - * + * * @author Régis Pouiller - * */ public class ShouldContainsOnlyNotNull extends BasicErrorMessageFactory { /** - * Creates a new {@link ShouldContainsOnlyNotNull}. - * + * Constructor. + * * @param index The index of value in the failed assertion. - * @return the created {@code ErrorMessageFactory}. */ - public static ErrorMessageFactory shouldContainsOnlyNotNull(int index) { - return new ShouldContainsOnlyNotNull(index); + private ShouldContainsOnlyNotNull(int index) { + super("%nExpecting to contain only not null:%nbut contains null at index: %s", index); } /** - * Constructor. - * + * Creates a new {@link ShouldContainsOnlyNotNull}. + * * @param index The index of value in the failed assertion. + * @return the created {@code ErrorMessageFactory}. */ - private ShouldContainsOnlyNotNull(int index) { - super("%nExpecting to contain only not null:%nbut contains null at index: %s", index); + public static ErrorMessageFactory shouldContainsOnlyNotNull(int index) { + return new ShouldContainsOnlyNotNull(index); } } diff --git a/src/main/java/org/assertj/db/error/ShouldContainsOnlyNull.java b/src/main/java/org/assertj/db/error/ShouldContainsOnlyNull.java index 861b4cb8..1042ded3 100644 --- a/src/main/java/org/assertj/db/error/ShouldContainsOnlyNull.java +++ b/src/main/java/org/assertj/db/error/ShouldContainsOnlyNull.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.error; @@ -17,28 +17,27 @@ /** * Creates an error message indicating that an assertion that verifies that a value is not null. - * + * * @author Régis Pouiller - * */ public class ShouldContainsOnlyNull extends BasicErrorMessageFactory { /** - * Creates a new {@link ShouldContainsOnlyNull}. - * + * Constructor. + * * @param index The index of value in the failed assertion. - * @return the created {@code ErrorMessageFactory}. */ - public static ErrorMessageFactory shouldContainsOnlyNull(int index) { - return new ShouldContainsOnlyNull(index); + private ShouldContainsOnlyNull(int index) { + super("%nExpecting to contain only null:%nbut contains not null at index: %s", index); } /** - * Constructor. - * + * Creates a new {@link ShouldContainsOnlyNull}. + * * @param index The index of value in the failed assertion. + * @return the created {@code ErrorMessageFactory}. */ - private ShouldContainsOnlyNull(int index) { - super("%nExpecting to contain only null:%nbut contains not null at index: %s", index); + public static ErrorMessageFactory shouldContainsOnlyNull(int index) { + return new ShouldContainsOnlyNull(index); } } diff --git a/src/main/java/org/assertj/db/error/ShouldContainsValue.java b/src/main/java/org/assertj/db/error/ShouldContainsValue.java index cfe3481d..7131dafc 100644 --- a/src/main/java/org/assertj/db/error/ShouldContainsValue.java +++ b/src/main/java/org/assertj/db/error/ShouldContainsValue.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.error; @@ -17,9 +17,8 @@ /** * Creates an error message indicating that an assertion that verifies that values are contained in values. - * + * * @author Régis Pouiller - * */ public class ShouldContainsValue extends BasicErrorMessageFactory { @@ -27,46 +26,46 @@ public class ShouldContainsValue extends BasicErrorMessageFactory { private static final String EXPECTED_MESSAGE_BUT_NOT = "%nExpecting to contain values but not%n (parameter at index %s is not found)"; /** - * Creates a new {@link org.assertj.db.error.ShouldContainsValue}. + * Constructor. * - * @param actual The actual values in the failed assertion. + * @param actual The actual values in the failed assertion. * @param expected The expected values to compare to. - * @param value The value which is not found. - * @param index The index of the value which is not found. - * @return the created {@code ErrorMessageFactory}. + * @param value The value which is not found. + * @param index The index of the value which is not found. */ - public static ErrorMessageFactory shouldContainsValue(Object actual, Object expected, Object value, int index) { - return new ShouldContainsValue(actual, expected, value, index); + private ShouldContainsValue(Object actual, Object expected, Object value, int index) { + super(EXPECTED_MESSAGE, actual, expected, value, index); } /** - * Creates a new {@link org.assertj.db.error.ShouldContainsValue}. + * Constructor. * * @param index The index of the value which is not found. - * @return the created {@code ErrorMessageFactory}. */ - public static ErrorMessageFactory shouldContainsValue(int index) { - return new ShouldContainsValue(index); + private ShouldContainsValue(int index) { + super(EXPECTED_MESSAGE_BUT_NOT, index); } /** - * Constructor. + * Creates a new {@link org.assertj.db.error.ShouldContainsValue}. * - * @param actual The actual values in the failed assertion. + * @param actual The actual values in the failed assertion. * @param expected The expected values to compare to. - * @param value The value which is not found. - * @param index The index of the value which is not found. + * @param value The value which is not found. + * @param index The index of the value which is not found. + * @return the created {@code ErrorMessageFactory}. */ - private ShouldContainsValue(Object actual, Object expected, Object value, int index) { - super(EXPECTED_MESSAGE, actual, expected, value, index); + public static ErrorMessageFactory shouldContainsValue(Object actual, Object expected, Object value, int index) { + return new ShouldContainsValue(actual, expected, value, index); } /** - * Constructor. + * Creates a new {@link org.assertj.db.error.ShouldContainsValue}. * * @param index The index of the value which is not found. + * @return the created {@code ErrorMessageFactory}. */ - private ShouldContainsValue(int index) { - super(EXPECTED_MESSAGE_BUT_NOT, index); + public static ErrorMessageFactory shouldContainsValue(int index) { + return new ShouldContainsValue(index); } } diff --git a/src/main/java/org/assertj/db/error/ShouldExist.java b/src/main/java/org/assertj/db/error/ShouldExist.java index 2fcb76d9..86a6c7a3 100644 --- a/src/main/java/org/assertj/db/error/ShouldExist.java +++ b/src/main/java/org/assertj/db/error/ShouldExist.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.error; @@ -17,14 +17,20 @@ /** * Creates an error message indicating that an assertion that verifies that a row exists. - * + * * @author Régis Pouiller - * */ public class ShouldExist extends BasicErrorMessageFactory { private static final String EXPECTED_MESSAGE = "%nExpecting exist but do not exist"; + /** + * Constructor. + */ + private ShouldExist() { + super(EXPECTED_MESSAGE); + } + /** * Creates a new {@link org.assertj.db.error.ShouldExist}. * @@ -33,11 +39,4 @@ public class ShouldExist extends BasicErrorMessageFactory { public static ErrorMessageFactory shouldExist() { return new ShouldExist(); } - - /** - * Constructor. - */ - private ShouldExist() { - super(EXPECTED_MESSAGE); - } } diff --git a/src/main/java/org/assertj/db/error/ShouldHaveChangesSize.java b/src/main/java/org/assertj/db/error/ShouldHaveChangesSize.java index 5fd81acb..f3d665d5 100644 --- a/src/main/java/org/assertj/db/error/ShouldHaveChangesSize.java +++ b/src/main/java/org/assertj/db/error/ShouldHaveChangesSize.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.error; @@ -17,30 +17,29 @@ /** * Creates an error message indicating that an assertion that verifies the changes size a value failed. - * + * * @author Régis Pouiller - * */ public class ShouldHaveChangesSize extends BasicErrorMessageFactory { /** - * Creates a new {@link ShouldHaveChangesSize}. - * - * @param actualSize the size of {@code actual}. + * Constructor. + * + * @param actualSize the size of {@code actual}. * @param expectedSize the expected size. - * @return the created {@code ErrorMessageFactory}. */ - public static ErrorMessageFactory shouldHaveChangesSize(int actualSize, int expectedSize) { - return new ShouldHaveChangesSize(actualSize, expectedSize); + private ShouldHaveChangesSize(int actualSize, int expectedSize) { + super("%nExpecting size (number of changes) to be equal to :%n <%s>%nbut was:%n <%s>", expectedSize, actualSize); } /** - * Constructor. - * - * @param actualSize the size of {@code actual}. + * Creates a new {@link ShouldHaveChangesSize}. + * + * @param actualSize the size of {@code actual}. * @param expectedSize the expected size. + * @return the created {@code ErrorMessageFactory}. */ - private ShouldHaveChangesSize(int actualSize, int expectedSize) { - super("%nExpecting size (number of changes) to be equal to :%n <%s>%nbut was:%n <%s>", expectedSize, actualSize); + public static ErrorMessageFactory shouldHaveChangesSize(int actualSize, int expectedSize) { + return new ShouldHaveChangesSize(actualSize, expectedSize); } } diff --git a/src/main/java/org/assertj/db/error/ShouldHaveChangesSizeGreater.java b/src/main/java/org/assertj/db/error/ShouldHaveChangesSizeGreater.java index 728bd48d..06e8f381 100644 --- a/src/main/java/org/assertj/db/error/ShouldHaveChangesSizeGreater.java +++ b/src/main/java/org/assertj/db/error/ShouldHaveChangesSizeGreater.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.error; @@ -19,28 +19,27 @@ * Creates an error message indicating that an assertion that verifies the changes size a value failed. * * @author Régis Pouiller - * */ public class ShouldHaveChangesSizeGreater extends BasicErrorMessageFactory { /** - * Creates a new {@link ShouldHaveChangesSizeGreater}. + * Constructor. * - * @param actualSize the size of {@code actual}. + * @param actualSize the size of {@code actual}. * @param expectedSize the expected size. - * @return the created {@code ErrorMessageFactory}. */ - public static ErrorMessageFactory shouldHaveChangesSizeGreater(int actualSize, int expectedSize) { - return new ShouldHaveChangesSizeGreater(actualSize, expectedSize); + private ShouldHaveChangesSizeGreater(int actualSize, int expectedSize) { + super("%nExpecting size (number of changes) to be greater than :%n <%s>%nbut was:%n <%s>", expectedSize, actualSize); } /** - * Constructor. + * Creates a new {@link ShouldHaveChangesSizeGreater}. * - * @param actualSize the size of {@code actual}. + * @param actualSize the size of {@code actual}. * @param expectedSize the expected size. + * @return the created {@code ErrorMessageFactory}. */ - private ShouldHaveChangesSizeGreater(int actualSize, int expectedSize) { - super("%nExpecting size (number of changes) to be greater than :%n <%s>%nbut was:%n <%s>", expectedSize, actualSize); + public static ErrorMessageFactory shouldHaveChangesSizeGreater(int actualSize, int expectedSize) { + return new ShouldHaveChangesSizeGreater(actualSize, expectedSize); } } diff --git a/src/main/java/org/assertj/db/error/ShouldHaveChangesSizeGreaterOrEqual.java b/src/main/java/org/assertj/db/error/ShouldHaveChangesSizeGreaterOrEqual.java index 0c18c640..e36ebeff 100644 --- a/src/main/java/org/assertj/db/error/ShouldHaveChangesSizeGreaterOrEqual.java +++ b/src/main/java/org/assertj/db/error/ShouldHaveChangesSizeGreaterOrEqual.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.error; @@ -19,28 +19,27 @@ * Creates an error message indicating that an assertion that verifies the changes size a value failed. * * @author Régis Pouiller - * */ public class ShouldHaveChangesSizeGreaterOrEqual extends BasicErrorMessageFactory { /** - * Creates a new {@link ShouldHaveChangesSizeGreaterOrEqual}. + * Constructor. * - * @param actualSize the size of {@code actual}. + * @param actualSize the size of {@code actual}. * @param expectedSize the expected size. - * @return the created {@code ErrorMessageFactory}. */ - public static ErrorMessageFactory shouldHaveChangesSizeGreaterOrEqual(int actualSize, int expectedSize) { - return new ShouldHaveChangesSizeGreaterOrEqual(actualSize, expectedSize); + private ShouldHaveChangesSizeGreaterOrEqual(int actualSize, int expectedSize) { + super("%nExpecting size (number of changes) to be greater than or equal to :%n <%s>%nbut was:%n <%s>", expectedSize, actualSize); } /** - * Constructor. + * Creates a new {@link ShouldHaveChangesSizeGreaterOrEqual}. * - * @param actualSize the size of {@code actual}. + * @param actualSize the size of {@code actual}. * @param expectedSize the expected size. + * @return the created {@code ErrorMessageFactory}. */ - private ShouldHaveChangesSizeGreaterOrEqual(int actualSize, int expectedSize) { - super("%nExpecting size (number of changes) to be greater than or equal to :%n <%s>%nbut was:%n <%s>", expectedSize, actualSize); + public static ErrorMessageFactory shouldHaveChangesSizeGreaterOrEqual(int actualSize, int expectedSize) { + return new ShouldHaveChangesSizeGreaterOrEqual(actualSize, expectedSize); } } diff --git a/src/main/java/org/assertj/db/error/ShouldHaveChangesSizeLess.java b/src/main/java/org/assertj/db/error/ShouldHaveChangesSizeLess.java index 887c17d1..0f458f87 100644 --- a/src/main/java/org/assertj/db/error/ShouldHaveChangesSizeLess.java +++ b/src/main/java/org/assertj/db/error/ShouldHaveChangesSizeLess.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.error; @@ -19,28 +19,27 @@ * Creates an error message indicating that an assertion that verifies the changes size a value failed. * * @author Régis Pouiller - * */ public class ShouldHaveChangesSizeLess extends BasicErrorMessageFactory { /** - * Creates a new {@link ShouldHaveChangesSizeLess}. + * Constructor. * - * @param actualSize the size of {@code actual}. + * @param actualSize the size of {@code actual}. * @param expectedSize the expected size. - * @return the created {@code ErrorMessageFactory}. */ - public static ErrorMessageFactory shouldHaveChangesSizeLess(int actualSize, int expectedSize) { - return new ShouldHaveChangesSizeLess(actualSize, expectedSize); + private ShouldHaveChangesSizeLess(int actualSize, int expectedSize) { + super("%nExpecting size (number of changes) to be less than :%n <%s>%nbut was:%n <%s>", expectedSize, actualSize); } /** - * Constructor. + * Creates a new {@link ShouldHaveChangesSizeLess}. * - * @param actualSize the size of {@code actual}. + * @param actualSize the size of {@code actual}. * @param expectedSize the expected size. + * @return the created {@code ErrorMessageFactory}. */ - private ShouldHaveChangesSizeLess(int actualSize, int expectedSize) { - super("%nExpecting size (number of changes) to be less than :%n <%s>%nbut was:%n <%s>", expectedSize, actualSize); + public static ErrorMessageFactory shouldHaveChangesSizeLess(int actualSize, int expectedSize) { + return new ShouldHaveChangesSizeLess(actualSize, expectedSize); } } diff --git a/src/main/java/org/assertj/db/error/ShouldHaveChangesSizeLessOrEqual.java b/src/main/java/org/assertj/db/error/ShouldHaveChangesSizeLessOrEqual.java index 3a0c7839..0b388a27 100644 --- a/src/main/java/org/assertj/db/error/ShouldHaveChangesSizeLessOrEqual.java +++ b/src/main/java/org/assertj/db/error/ShouldHaveChangesSizeLessOrEqual.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.error; @@ -19,28 +19,27 @@ * Creates an error message indicating that an assertion that verifies the changes size a value failed. * * @author Régis Pouiller - * */ public class ShouldHaveChangesSizeLessOrEqual extends BasicErrorMessageFactory { /** - * Creates a new {@link ShouldHaveChangesSizeLessOrEqual}. + * Constructor. * - * @param actualSize the size of {@code actual}. + * @param actualSize the size of {@code actual}. * @param expectedSize the expected size. - * @return the created {@code ErrorMessageFactory}. */ - public static ErrorMessageFactory shouldHaveChangesSizeLessOrEqual(int actualSize, int expectedSize) { - return new ShouldHaveChangesSizeLessOrEqual(actualSize, expectedSize); + private ShouldHaveChangesSizeLessOrEqual(int actualSize, int expectedSize) { + super("%nExpecting size (number of changes) to be less than or equal to :%n <%s>%nbut was:%n <%s>", expectedSize, actualSize); } /** - * Constructor. + * Creates a new {@link ShouldHaveChangesSizeLessOrEqual}. * - * @param actualSize the size of {@code actual}. + * @param actualSize the size of {@code actual}. * @param expectedSize the expected size. + * @return the created {@code ErrorMessageFactory}. */ - private ShouldHaveChangesSizeLessOrEqual(int actualSize, int expectedSize) { - super("%nExpecting size (number of changes) to be less than or equal to :%n <%s>%nbut was:%n <%s>", expectedSize, actualSize); + public static ErrorMessageFactory shouldHaveChangesSizeLessOrEqual(int actualSize, int expectedSize) { + return new ShouldHaveChangesSizeLessOrEqual(actualSize, expectedSize); } } diff --git a/src/main/java/org/assertj/db/error/ShouldHaveColumnsSize.java b/src/main/java/org/assertj/db/error/ShouldHaveColumnsSize.java index d5c4c5cd..91fe7edf 100644 --- a/src/main/java/org/assertj/db/error/ShouldHaveColumnsSize.java +++ b/src/main/java/org/assertj/db/error/ShouldHaveColumnsSize.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.error; @@ -17,30 +17,29 @@ /** * Creates an error message indicating that an assertion that verifies the columns size a value failed. - * + * * @author Régis Pouiller - * */ public class ShouldHaveColumnsSize extends BasicErrorMessageFactory { /** - * Creates a new {@link ShouldHaveColumnsSize}. - * - * @param actualSize the size of {@code actual}. + * Constructor. + * + * @param actualSize the size of {@code actual}. * @param expectedSize the expected size. - * @return the created {@code ErrorMessageFactory}. */ - public static ErrorMessageFactory shouldHaveColumnsSize(int actualSize, int expectedSize) { - return new ShouldHaveColumnsSize(actualSize, expectedSize); + private ShouldHaveColumnsSize(int actualSize, int expectedSize) { + super("%nExpecting size (number of columns) to be equal to :%n <%s>%nbut was:%n <%s>", expectedSize, actualSize); } /** - * Constructor. - * - * @param actualSize the size of {@code actual}. + * Creates a new {@link ShouldHaveColumnsSize}. + * + * @param actualSize the size of {@code actual}. * @param expectedSize the expected size. + * @return the created {@code ErrorMessageFactory}. */ - private ShouldHaveColumnsSize(int actualSize, int expectedSize) { - super("%nExpecting size (number of columns) to be equal to :%n <%s>%nbut was:%n <%s>", expectedSize, actualSize); + public static ErrorMessageFactory shouldHaveColumnsSize(int actualSize, int expectedSize) { + return new ShouldHaveColumnsSize(actualSize, expectedSize); } } diff --git a/src/main/java/org/assertj/db/error/ShouldHaveColumnsSizeGreater.java b/src/main/java/org/assertj/db/error/ShouldHaveColumnsSizeGreater.java index 70fefbfb..a55bc46a 100644 --- a/src/main/java/org/assertj/db/error/ShouldHaveColumnsSizeGreater.java +++ b/src/main/java/org/assertj/db/error/ShouldHaveColumnsSizeGreater.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.error; @@ -24,23 +24,23 @@ public class ShouldHaveColumnsSizeGreater extends BasicErrorMessageFactory { /** - * Creates a new {@link ShouldHaveColumnsSizeGreater}. + * Constructor. * - * @param actualSize the size of {@code actual}. + * @param actualSize the size of {@code actual}. * @param expectedSize the expected size. - * @return the created {@code ErrorMessageFactory}. */ - public static ErrorMessageFactory shouldHaveColumnsSizeGreater(int actualSize, int expectedSize) { - return new ShouldHaveColumnsSizeGreater(actualSize, expectedSize); + private ShouldHaveColumnsSizeGreater(int actualSize, int expectedSize) { + super("%nExpecting size (number of columns) to be greater than :%n <%s>%nbut was:%n <%s>", expectedSize, actualSize); } /** - * Constructor. + * Creates a new {@link ShouldHaveColumnsSizeGreater}. * - * @param actualSize the size of {@code actual}. + * @param actualSize the size of {@code actual}. * @param expectedSize the expected size. + * @return the created {@code ErrorMessageFactory}. */ - private ShouldHaveColumnsSizeGreater(int actualSize, int expectedSize) { - super("%nExpecting size (number of columns) to be greater than :%n <%s>%nbut was:%n <%s>", expectedSize, actualSize); + public static ErrorMessageFactory shouldHaveColumnsSizeGreater(int actualSize, int expectedSize) { + return new ShouldHaveColumnsSizeGreater(actualSize, expectedSize); } } diff --git a/src/main/java/org/assertj/db/error/ShouldHaveColumnsSizeGreaterOrEqual.java b/src/main/java/org/assertj/db/error/ShouldHaveColumnsSizeGreaterOrEqual.java index 8eff0fdb..5c860b81 100644 --- a/src/main/java/org/assertj/db/error/ShouldHaveColumnsSizeGreaterOrEqual.java +++ b/src/main/java/org/assertj/db/error/ShouldHaveColumnsSizeGreaterOrEqual.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.error; @@ -24,23 +24,23 @@ public class ShouldHaveColumnsSizeGreaterOrEqual extends BasicErrorMessageFactory { /** - * Creates a new {@link ShouldHaveColumnsSizeGreaterOrEqual}. + * Constructor. * - * @param actualSize the size of {@code actual}. + * @param actualSize the size of {@code actual}. * @param expectedSize the expected size. - * @return the created {@code ErrorMessageFactory}. */ - public static ErrorMessageFactory shouldHaveColumnsSizeGreaterOrEqual(int actualSize, int expectedSize) { - return new ShouldHaveColumnsSizeGreaterOrEqual(actualSize, expectedSize); + private ShouldHaveColumnsSizeGreaterOrEqual(int actualSize, int expectedSize) { + super("%nExpecting size (number of columns) to be greater than or equal to :%n <%s>%nbut was:%n <%s>", expectedSize, actualSize); } /** - * Constructor. + * Creates a new {@link ShouldHaveColumnsSizeGreaterOrEqual}. * - * @param actualSize the size of {@code actual}. + * @param actualSize the size of {@code actual}. * @param expectedSize the expected size. + * @return the created {@code ErrorMessageFactory}. */ - private ShouldHaveColumnsSizeGreaterOrEqual(int actualSize, int expectedSize) { - super("%nExpecting size (number of columns) to be greater than or equal to :%n <%s>%nbut was:%n <%s>", expectedSize, actualSize); + public static ErrorMessageFactory shouldHaveColumnsSizeGreaterOrEqual(int actualSize, int expectedSize) { + return new ShouldHaveColumnsSizeGreaterOrEqual(actualSize, expectedSize); } } diff --git a/src/main/java/org/assertj/db/error/ShouldHaveColumnsSizeLess.java b/src/main/java/org/assertj/db/error/ShouldHaveColumnsSizeLess.java index 9bf2d781..a412e776 100644 --- a/src/main/java/org/assertj/db/error/ShouldHaveColumnsSizeLess.java +++ b/src/main/java/org/assertj/db/error/ShouldHaveColumnsSizeLess.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.error; @@ -24,23 +24,23 @@ public class ShouldHaveColumnsSizeLess extends BasicErrorMessageFactory { /** - * Creates a new {@link ShouldHaveColumnsSizeLess}. + * Constructor. * - * @param actualSize the size of {@code actual}. + * @param actualSize the size of {@code actual}. * @param expectedSize the expected size. - * @return the created {@code ErrorMessageFactory}. */ - public static ErrorMessageFactory shouldHaveColumnsSizeLess(int actualSize, int expectedSize) { - return new ShouldHaveColumnsSizeLess(actualSize, expectedSize); + private ShouldHaveColumnsSizeLess(int actualSize, int expectedSize) { + super("%nExpecting size (number of columns) to be less than :%n <%s>%nbut was:%n <%s>", expectedSize, actualSize); } /** - * Constructor. + * Creates a new {@link ShouldHaveColumnsSizeLess}. * - * @param actualSize the size of {@code actual}. + * @param actualSize the size of {@code actual}. * @param expectedSize the expected size. + * @return the created {@code ErrorMessageFactory}. */ - private ShouldHaveColumnsSizeLess(int actualSize, int expectedSize) { - super("%nExpecting size (number of columns) to be less than :%n <%s>%nbut was:%n <%s>", expectedSize, actualSize); + public static ErrorMessageFactory shouldHaveColumnsSizeLess(int actualSize, int expectedSize) { + return new ShouldHaveColumnsSizeLess(actualSize, expectedSize); } -} \ No newline at end of file +} diff --git a/src/main/java/org/assertj/db/error/ShouldHaveColumnsSizeLessOrEqual.java b/src/main/java/org/assertj/db/error/ShouldHaveColumnsSizeLessOrEqual.java index db4464ed..b41c72ce 100644 --- a/src/main/java/org/assertj/db/error/ShouldHaveColumnsSizeLessOrEqual.java +++ b/src/main/java/org/assertj/db/error/ShouldHaveColumnsSizeLessOrEqual.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.error; @@ -24,23 +24,23 @@ public class ShouldHaveColumnsSizeLessOrEqual extends BasicErrorMessageFactory { /** - * Creates a new {@link ShouldHaveColumnsSizeLessOrEqual}. + * Constructor. * - * @param actualSize the size of {@code actual}. + * @param actualSize the size of {@code actual}. * @param expectedSize the expected size. - * @return the created {@code ErrorMessageFactory}. */ - public static ErrorMessageFactory shouldHaveColumnsSizeLessOrEqual(int actualSize, int expectedSize) { - return new ShouldHaveColumnsSizeLessOrEqual(actualSize, expectedSize); + private ShouldHaveColumnsSizeLessOrEqual(int actualSize, int expectedSize) { + super("%nExpecting size (number of columns) to be less than or equal to :%n <%s>%nbut was:%n <%s>", expectedSize, actualSize); } /** - * Constructor. + * Creates a new {@link ShouldHaveColumnsSizeLessOrEqual}. * - * @param actualSize the size of {@code actual}. + * @param actualSize the size of {@code actual}. * @param expectedSize the expected size. + * @return the created {@code ErrorMessageFactory}. */ - private ShouldHaveColumnsSizeLessOrEqual(int actualSize, int expectedSize) { - super("%nExpecting size (number of columns) to be less than or equal to :%n <%s>%nbut was:%n <%s>", expectedSize, actualSize); + public static ErrorMessageFactory shouldHaveColumnsSizeLessOrEqual(int actualSize, int expectedSize) { + return new ShouldHaveColumnsSizeLessOrEqual(actualSize, expectedSize); } -} \ No newline at end of file +} diff --git a/src/main/java/org/assertj/db/error/ShouldHaveModifications.java b/src/main/java/org/assertj/db/error/ShouldHaveModifications.java index 73d8f581..2f668f78 100644 --- a/src/main/java/org/assertj/db/error/ShouldHaveModifications.java +++ b/src/main/java/org/assertj/db/error/ShouldHaveModifications.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.error; @@ -19,49 +19,48 @@ * Creates an error message indicating that an assertion that verifies the modified columns. * * @author Régis Pouiller - * */ public class ShouldHaveModifications extends BasicErrorMessageFactory { /** - * Creates a new {@link ShouldHaveModifications}. + * Constructor. * - * @param modifications The modifications. + * @param modifications The modifications. * @param expectedModifications The expected modifications. - * @return the created {@code ErrorMessageFactory}. */ - public static ErrorMessageFactory shouldHaveModifications(Integer[] modifications, Integer[] expectedModifications) { - return new ShouldHaveModifications(modifications, expectedModifications); + private ShouldHaveModifications(Integer[] modifications, Integer[] expectedModifications) { + super("%nExpecting :%n %s%nas indexes of modified columns but was:%n %s", expectedModifications, modifications); } /** - * Creates a new {@link ShouldHaveModifications}. + * Constructor. * - * @param modifications The modifications. + * @param modifications The modifications. * @param expectedModifications The expected modifications. - * @return the created {@code ErrorMessageFactory}. */ - public static ErrorMessageFactory shouldHaveModifications(String[] modifications, String[] expectedModifications) { - return new ShouldHaveModifications(modifications, expectedModifications); + private ShouldHaveModifications(String[] modifications, String[] expectedModifications) { + super("%nExpecting :%n %s%nas modified columns but was:%n %s", expectedModifications, modifications); } /** - * Constructor. + * Creates a new {@link ShouldHaveModifications}. * - * @param modifications The modifications. + * @param modifications The modifications. * @param expectedModifications The expected modifications. + * @return the created {@code ErrorMessageFactory}. */ - private ShouldHaveModifications(Integer[] modifications, Integer[] expectedModifications) { - super("%nExpecting :%n %s%nas indexes of modified columns but was:%n %s", expectedModifications, modifications); + public static ErrorMessageFactory shouldHaveModifications(Integer[] modifications, Integer[] expectedModifications) { + return new ShouldHaveModifications(modifications, expectedModifications); } /** - * Constructor. + * Creates a new {@link ShouldHaveModifications}. * - * @param modifications The modifications. + * @param modifications The modifications. * @param expectedModifications The expected modifications. + * @return the created {@code ErrorMessageFactory}. */ - private ShouldHaveModifications(String[] modifications, String[] expectedModifications) { - super("%nExpecting :%n %s%nas modified columns but was:%n %s", expectedModifications, modifications); + public static ErrorMessageFactory shouldHaveModifications(String[] modifications, String[] expectedModifications) { + return new ShouldHaveModifications(modifications, expectedModifications); } } diff --git a/src/main/java/org/assertj/db/error/ShouldHaveName.java b/src/main/java/org/assertj/db/error/ShouldHaveName.java index b3b69491..dd7381a0 100644 --- a/src/main/java/org/assertj/db/error/ShouldHaveName.java +++ b/src/main/java/org/assertj/db/error/ShouldHaveName.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.error; @@ -19,28 +19,27 @@ * Creates an error message indicating that an assertion that verifies the name of the column. * * @author Régis Pouiller - * */ public class ShouldHaveName extends BasicErrorMessageFactory { /** - * Creates a new {@link org.assertj.db.error.ShouldHaveName}. + * Constructor. * - * @param name The name of the column. + * @param name The name of the column. * @param expectedName The expected name of the column. - * @return the created {@code ErrorMessageFactory}. */ - public static ErrorMessageFactory shouldHaveName(String name, String expectedName) { - return new ShouldHaveName(name, expectedName); + private ShouldHaveName(String name, String expectedName) { + super("%nExpecting :%n %s%nto be the name of the column but was:%n %s", expectedName, name); } /** - * Constructor. + * Creates a new {@link org.assertj.db.error.ShouldHaveName}. * - * @param name The name of the column. + * @param name The name of the column. * @param expectedName The expected name of the column. + * @return the created {@code ErrorMessageFactory}. */ - private ShouldHaveName(String name, String expectedName) { - super("%nExpecting :%n %s%nto be the name of the column but was:%n %s", expectedName, name); + public static ErrorMessageFactory shouldHaveName(String name, String expectedName) { + return new ShouldHaveName(name, expectedName); } } diff --git a/src/main/java/org/assertj/db/error/ShouldHaveNumberOfModifications.java b/src/main/java/org/assertj/db/error/ShouldHaveNumberOfModifications.java index 19b1495f..511be010 100644 --- a/src/main/java/org/assertj/db/error/ShouldHaveNumberOfModifications.java +++ b/src/main/java/org/assertj/db/error/ShouldHaveNumberOfModifications.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.error; @@ -19,28 +19,27 @@ * Creates an error message indicating that an assertion that verifies the number of modified columns. * * @author Régis Pouiller - * */ public class ShouldHaveNumberOfModifications extends BasicErrorMessageFactory { /** - * Creates a new {@link ShouldHaveNumberOfModifications}. + * Constructor. * * @param numberOfModifications The number of modifications. - * @param expectedNumber The expected number of modifications. - * @return the created {@code ErrorMessageFactory}. + * @param expectedNumber The expected number of modifications. */ - public static ErrorMessageFactory shouldHaveNumberOfModifications(int numberOfModifications, int expectedNumber) { - return new ShouldHaveNumberOfModifications(numberOfModifications, expectedNumber); + private ShouldHaveNumberOfModifications(int numberOfModifications, int expectedNumber) { + super("%nExpecting :%n %s modifications%nbut was:%n %s", expectedNumber, numberOfModifications); } /** - * Constructor. + * Creates a new {@link ShouldHaveNumberOfModifications}. * * @param numberOfModifications The number of modifications. - * @param expectedNumber The expected number of modifications. + * @param expectedNumber The expected number of modifications. + * @return the created {@code ErrorMessageFactory}. */ - private ShouldHaveNumberOfModifications(int numberOfModifications, int expectedNumber) { - super("%nExpecting :%n %s modifications%nbut was:%n %s", expectedNumber, numberOfModifications); + public static ErrorMessageFactory shouldHaveNumberOfModifications(int numberOfModifications, int expectedNumber) { + return new ShouldHaveNumberOfModifications(numberOfModifications, expectedNumber); } } diff --git a/src/main/java/org/assertj/db/error/ShouldHaveNumberOfModificationsGreater.java b/src/main/java/org/assertj/db/error/ShouldHaveNumberOfModificationsGreater.java index ee623494..03d1c3c3 100644 --- a/src/main/java/org/assertj/db/error/ShouldHaveNumberOfModificationsGreater.java +++ b/src/main/java/org/assertj/db/error/ShouldHaveNumberOfModificationsGreater.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.error; @@ -19,28 +19,27 @@ * Creates an error message indicating that an assertion that verifies the number of modified columns. * * @author Régis Pouiller - * */ public class ShouldHaveNumberOfModificationsGreater extends BasicErrorMessageFactory { /** - * Creates a new {@link ShouldHaveNumberOfModificationsGreater}. + * Constructor. * * @param numberOfModifications The number of modifications. - * @param expectedNumber The expected number of modifications. - * @return the created {@code ErrorMessageFactory}. + * @param expectedNumber The expected number of modifications. */ - public static ErrorMessageFactory shouldHaveNumberOfModificationsGreater(int numberOfModifications, int expectedNumber) { - return new ShouldHaveNumberOfModificationsGreater(numberOfModifications, expectedNumber); + private ShouldHaveNumberOfModificationsGreater(int numberOfModifications, int expectedNumber) { + super("%nExpecting :%n number of modifications is greater than %s%nbut was:%n %s", expectedNumber, numberOfModifications); } /** - * Constructor. + * Creates a new {@link ShouldHaveNumberOfModificationsGreater}. * * @param numberOfModifications The number of modifications. - * @param expectedNumber The expected number of modifications. + * @param expectedNumber The expected number of modifications. + * @return the created {@code ErrorMessageFactory}. */ - private ShouldHaveNumberOfModificationsGreater(int numberOfModifications, int expectedNumber) { - super("%nExpecting :%n number of modifications is greater than %s%nbut was:%n %s", expectedNumber, numberOfModifications); + public static ErrorMessageFactory shouldHaveNumberOfModificationsGreater(int numberOfModifications, int expectedNumber) { + return new ShouldHaveNumberOfModificationsGreater(numberOfModifications, expectedNumber); } } diff --git a/src/main/java/org/assertj/db/error/ShouldHaveNumberOfModificationsGreaterOrEqual.java b/src/main/java/org/assertj/db/error/ShouldHaveNumberOfModificationsGreaterOrEqual.java index 258323c8..8386211a 100644 --- a/src/main/java/org/assertj/db/error/ShouldHaveNumberOfModificationsGreaterOrEqual.java +++ b/src/main/java/org/assertj/db/error/ShouldHaveNumberOfModificationsGreaterOrEqual.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.error; @@ -19,28 +19,27 @@ * Creates an error message indicating that an assertion that verifies the number of modified columns. * * @author Régis Pouiller - * */ public class ShouldHaveNumberOfModificationsGreaterOrEqual extends BasicErrorMessageFactory { /** - * Creates a new {@link ShouldHaveNumberOfModificationsGreaterOrEqual}. + * Constructor. * * @param numberOfModifications The number of modifications. - * @param expectedNumber The expected number of modifications. - * @return the created {@code ErrorMessageFactory}. + * @param expectedNumber The expected number of modifications. */ - public static ErrorMessageFactory shouldHaveNumberOfModificationsGreaterOrEqual(int numberOfModifications, int expectedNumber) { - return new ShouldHaveNumberOfModificationsGreaterOrEqual(numberOfModifications, expectedNumber); + private ShouldHaveNumberOfModificationsGreaterOrEqual(int numberOfModifications, int expectedNumber) { + super("%nExpecting :%n number of modifications is greater than or equal to %s%nbut was:%n %s", expectedNumber, numberOfModifications); } /** - * Constructor. + * Creates a new {@link ShouldHaveNumberOfModificationsGreaterOrEqual}. * * @param numberOfModifications The number of modifications. - * @param expectedNumber The expected number of modifications. + * @param expectedNumber The expected number of modifications. + * @return the created {@code ErrorMessageFactory}. */ - private ShouldHaveNumberOfModificationsGreaterOrEqual(int numberOfModifications, int expectedNumber) { - super("%nExpecting :%n number of modifications is greater than or equal to %s%nbut was:%n %s", expectedNumber, numberOfModifications); + public static ErrorMessageFactory shouldHaveNumberOfModificationsGreaterOrEqual(int numberOfModifications, int expectedNumber) { + return new ShouldHaveNumberOfModificationsGreaterOrEqual(numberOfModifications, expectedNumber); } } diff --git a/src/main/java/org/assertj/db/error/ShouldHaveNumberOfModificationsLess.java b/src/main/java/org/assertj/db/error/ShouldHaveNumberOfModificationsLess.java index 62e4359a..7617cb4b 100644 --- a/src/main/java/org/assertj/db/error/ShouldHaveNumberOfModificationsLess.java +++ b/src/main/java/org/assertj/db/error/ShouldHaveNumberOfModificationsLess.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.error; @@ -19,28 +19,27 @@ * Creates an error message indicating that an assertion that verifies the number of modified columns. * * @author Régis Pouiller - * */ public class ShouldHaveNumberOfModificationsLess extends BasicErrorMessageFactory { /** - * Creates a new {@link ShouldHaveNumberOfModificationsLess}. + * Constructor. * * @param numberOfModifications The number of modifications. - * @param expectedNumber The expected number of modifications. - * @return the created {@code ErrorMessageFactory}. + * @param expectedNumber The expected number of modifications. */ - public static ErrorMessageFactory shouldHaveNumberOfModificationsLess(int numberOfModifications, int expectedNumber) { - return new ShouldHaveNumberOfModificationsLess(numberOfModifications, expectedNumber); + private ShouldHaveNumberOfModificationsLess(int numberOfModifications, int expectedNumber) { + super("%nExpecting :%n number of modifications is less than %s%nbut was:%n %s", expectedNumber, numberOfModifications); } /** - * Constructor. + * Creates a new {@link ShouldHaveNumberOfModificationsLess}. * * @param numberOfModifications The number of modifications. - * @param expectedNumber The expected number of modifications. + * @param expectedNumber The expected number of modifications. + * @return the created {@code ErrorMessageFactory}. */ - private ShouldHaveNumberOfModificationsLess(int numberOfModifications, int expectedNumber) { - super("%nExpecting :%n number of modifications is less than %s%nbut was:%n %s", expectedNumber, numberOfModifications); + public static ErrorMessageFactory shouldHaveNumberOfModificationsLess(int numberOfModifications, int expectedNumber) { + return new ShouldHaveNumberOfModificationsLess(numberOfModifications, expectedNumber); } } diff --git a/src/main/java/org/assertj/db/error/ShouldHaveNumberOfModificationsLessOrEqual.java b/src/main/java/org/assertj/db/error/ShouldHaveNumberOfModificationsLessOrEqual.java index 33c7c8e1..feb66290 100644 --- a/src/main/java/org/assertj/db/error/ShouldHaveNumberOfModificationsLessOrEqual.java +++ b/src/main/java/org/assertj/db/error/ShouldHaveNumberOfModificationsLessOrEqual.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.error; @@ -19,28 +19,27 @@ * Creates an error message indicating that an assertion that verifies the number of modified columns. * * @author Régis Pouiller - * */ public class ShouldHaveNumberOfModificationsLessOrEqual extends BasicErrorMessageFactory { /** - * Creates a new {@link ShouldHaveNumberOfModificationsLessOrEqual}. + * Constructor. * * @param numberOfModifications The number of modifications. - * @param expectedNumber The expected number of modifications. - * @return the created {@code ErrorMessageFactory}. + * @param expectedNumber The expected number of modifications. */ - public static ErrorMessageFactory shouldHaveNumberOfModificationsLessOrEqual(int numberOfModifications, int expectedNumber) { - return new ShouldHaveNumberOfModificationsLessOrEqual(numberOfModifications, expectedNumber); + private ShouldHaveNumberOfModificationsLessOrEqual(int numberOfModifications, int expectedNumber) { + super("%nExpecting :%n number of modifications is less than or equal to %s%nbut was:%n %s", expectedNumber, numberOfModifications); } /** - * Constructor. + * Creates a new {@link ShouldHaveNumberOfModificationsLessOrEqual}. * * @param numberOfModifications The number of modifications. - * @param expectedNumber The expected number of modifications. + * @param expectedNumber The expected number of modifications. + * @return the created {@code ErrorMessageFactory}. */ - private ShouldHaveNumberOfModificationsLessOrEqual(int numberOfModifications, int expectedNumber) { - super("%nExpecting :%n number of modifications is less than or equal to %s%nbut was:%n %s", expectedNumber, numberOfModifications); + public static ErrorMessageFactory shouldHaveNumberOfModificationsLessOrEqual(int numberOfModifications, int expectedNumber) { + return new ShouldHaveNumberOfModificationsLessOrEqual(numberOfModifications, expectedNumber); } } diff --git a/src/main/java/org/assertj/db/error/ShouldHavePksNames.java b/src/main/java/org/assertj/db/error/ShouldHavePksNames.java index c4dc9567..0e6c461d 100644 --- a/src/main/java/org/assertj/db/error/ShouldHavePksNames.java +++ b/src/main/java/org/assertj/db/error/ShouldHavePksNames.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.error; @@ -19,28 +19,27 @@ * Creates an error message indicating that an assertion that verifies the names of the columns of the primary key. * * @author Régis Pouiller - * */ public class ShouldHavePksNames extends BasicErrorMessageFactory { /** - * Creates a new {@link ShouldHavePksNames}. + * Constructor. * - * @param names The names of the columns. + * @param names The names of the columns. * @param expectedNames The expected names of the columns. - * @return the created {@code ErrorMessageFactory}. */ - public static ErrorMessageFactory shouldHavePksNames(String[] names, String[] expectedNames) { - return new ShouldHavePksNames(names, expectedNames); + private ShouldHavePksNames(String[] names, String[] expectedNames) { + super("%nExpecting :%n %s%nto be the name of the columns of the primary keys but was:%n %s", expectedNames, names); } /** - * Constructor. + * Creates a new {@link ShouldHavePksNames}. * - * @param names The names of the columns. + * @param names The names of the columns. * @param expectedNames The expected names of the columns. + * @return the created {@code ErrorMessageFactory}. */ - private ShouldHavePksNames(String[] names, String[] expectedNames) { - super("%nExpecting :%n %s%nto be the name of the columns of the primary keys but was:%n %s", expectedNames, names); + public static ErrorMessageFactory shouldHavePksNames(String[] names, String[] expectedNames) { + return new ShouldHavePksNames(names, expectedNames); } } diff --git a/src/main/java/org/assertj/db/error/ShouldHavePksValues.java b/src/main/java/org/assertj/db/error/ShouldHavePksValues.java index 4564f864..dde2811a 100644 --- a/src/main/java/org/assertj/db/error/ShouldHavePksValues.java +++ b/src/main/java/org/assertj/db/error/ShouldHavePksValues.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.error; @@ -19,28 +19,27 @@ * Creates an error message indicating that an assertion that verifies the values of the columns of the primary key. * * @author Régis Pouiller - * */ public class ShouldHavePksValues extends BasicErrorMessageFactory { /** - * Creates a new {@link ShouldHavePksValues}. + * Constructor. * - * @param values The values of the columns. + * @param values The values of the columns. * @param expectedValues The expected values of the columns. - * @return the created {@code ErrorMessageFactory}. */ - public static ErrorMessageFactory shouldHavePksValues(Object[] values, Object[] expectedValues) { - return new ShouldHavePksValues(values, expectedValues); + private ShouldHavePksValues(Object[] values, Object[] expectedValues) { + super("%nExpecting :%n %s%nto be the values of the columns of the primary keys but was:%n %s", expectedValues, values); } /** - * Constructor. + * Creates a new {@link ShouldHavePksValues}. * - * @param values The values of the columns. + * @param values The values of the columns. * @param expectedValues The expected values of the columns. + * @return the created {@code ErrorMessageFactory}. */ - private ShouldHavePksValues(Object[] values, Object[] expectedValues) { - super("%nExpecting :%n %s%nto be the values of the columns of the primary keys but was:%n %s", expectedValues, values); + public static ErrorMessageFactory shouldHavePksValues(Object[] values, Object[] expectedValues) { + return new ShouldHavePksValues(values, expectedValues); } -} \ No newline at end of file +} diff --git a/src/main/java/org/assertj/db/error/ShouldHaveRowsSize.java b/src/main/java/org/assertj/db/error/ShouldHaveRowsSize.java index 052d1efa..fc9b6108 100644 --- a/src/main/java/org/assertj/db/error/ShouldHaveRowsSize.java +++ b/src/main/java/org/assertj/db/error/ShouldHaveRowsSize.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.error; @@ -17,30 +17,29 @@ /** * Creates an error message indicating that an assertion that verifies the rows size a value failed. - * + * * @author Régis Pouiller - * */ public class ShouldHaveRowsSize extends BasicErrorMessageFactory { /** - * Creates a new {@link ShouldHaveRowsSize}. - * - * @param actualSize the size of {@code actual}. + * Constructor. + * + * @param actualSize the size of {@code actual}. * @param expectedSize the expected size. - * @return the created {@code ErrorMessageFactory}. */ - public static ErrorMessageFactory shouldHaveRowsSize(int actualSize, int expectedSize) { - return new ShouldHaveRowsSize(actualSize, expectedSize); + private ShouldHaveRowsSize(int actualSize, int expectedSize) { + super("%nExpecting size (number of rows) to be equal to :%n <%s>%nbut was:%n <%s>", expectedSize, actualSize); } /** - * Constructor. - * - * @param actualSize the size of {@code actual}. + * Creates a new {@link ShouldHaveRowsSize}. + * + * @param actualSize the size of {@code actual}. * @param expectedSize the expected size. + * @return the created {@code ErrorMessageFactory}. */ - private ShouldHaveRowsSize(int actualSize, int expectedSize) { - super("%nExpecting size (number of rows) to be equal to :%n <%s>%nbut was:%n <%s>", expectedSize, actualSize); + public static ErrorMessageFactory shouldHaveRowsSize(int actualSize, int expectedSize) { + return new ShouldHaveRowsSize(actualSize, expectedSize); } } diff --git a/src/main/java/org/assertj/db/error/ShouldHaveRowsSizeGreater.java b/src/main/java/org/assertj/db/error/ShouldHaveRowsSizeGreater.java index 31c02e63..d3174fd8 100644 --- a/src/main/java/org/assertj/db/error/ShouldHaveRowsSizeGreater.java +++ b/src/main/java/org/assertj/db/error/ShouldHaveRowsSizeGreater.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.error; @@ -24,23 +24,23 @@ public class ShouldHaveRowsSizeGreater extends BasicErrorMessageFactory { /** - * Creates a new {@link ShouldHaveRowsSizeGreater}. + * Constructor. * - * @param actualSize the size of {@code actual}. + * @param actualSize the size of {@code actual}. * @param expectedSize the expected size. - * @return the created {@code ErrorMessageFactory}. */ - public static ErrorMessageFactory shouldHaveRowsSizeGreater(int actualSize, int expectedSize) { - return new ShouldHaveRowsSizeGreater(actualSize, expectedSize); + private ShouldHaveRowsSizeGreater(int actualSize, int expectedSize) { + super("%nExpecting size (number of rows) to be greater than :%n <%s>%nbut was:%n <%s>", expectedSize, actualSize); } /** - * Constructor. + * Creates a new {@link ShouldHaveRowsSizeGreater}. * - * @param actualSize the size of {@code actual}. + * @param actualSize the size of {@code actual}. * @param expectedSize the expected size. + * @return the created {@code ErrorMessageFactory}. */ - private ShouldHaveRowsSizeGreater(int actualSize, int expectedSize) { - super("%nExpecting size (number of rows) to be greater than :%n <%s>%nbut was:%n <%s>", expectedSize, actualSize); + public static ErrorMessageFactory shouldHaveRowsSizeGreater(int actualSize, int expectedSize) { + return new ShouldHaveRowsSizeGreater(actualSize, expectedSize); } } diff --git a/src/main/java/org/assertj/db/error/ShouldHaveRowsSizeGreaterOrEqual.java b/src/main/java/org/assertj/db/error/ShouldHaveRowsSizeGreaterOrEqual.java index a3449318..5fd67287 100644 --- a/src/main/java/org/assertj/db/error/ShouldHaveRowsSizeGreaterOrEqual.java +++ b/src/main/java/org/assertj/db/error/ShouldHaveRowsSizeGreaterOrEqual.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.error; @@ -24,23 +24,23 @@ public class ShouldHaveRowsSizeGreaterOrEqual extends BasicErrorMessageFactory { /** - * Creates a new {@link ShouldHaveRowsSizeGreaterOrEqual}. + * Constructor. * - * @param actualSize the size of {@code actual}. + * @param actualSize the size of {@code actual}. * @param expectedSize the expected size. - * @return the created {@code ErrorMessageFactory}. */ - public static ErrorMessageFactory shouldHaveRowsSizeGreaterOrEqual(int actualSize, int expectedSize) { - return new ShouldHaveRowsSizeGreaterOrEqual(actualSize, expectedSize); + private ShouldHaveRowsSizeGreaterOrEqual(int actualSize, int expectedSize) { + super("%nExpecting size (number of rows) to be greater than or equal to :%n <%s>%nbut was:%n <%s>", expectedSize, actualSize); } /** - * Constructor. + * Creates a new {@link ShouldHaveRowsSizeGreaterOrEqual}. * - * @param actualSize the size of {@code actual}. + * @param actualSize the size of {@code actual}. * @param expectedSize the expected size. + * @return the created {@code ErrorMessageFactory}. */ - private ShouldHaveRowsSizeGreaterOrEqual(int actualSize, int expectedSize) { - super("%nExpecting size (number of rows) to be greater than or equal to :%n <%s>%nbut was:%n <%s>", expectedSize, actualSize); + public static ErrorMessageFactory shouldHaveRowsSizeGreaterOrEqual(int actualSize, int expectedSize) { + return new ShouldHaveRowsSizeGreaterOrEqual(actualSize, expectedSize); } } diff --git a/src/main/java/org/assertj/db/error/ShouldHaveRowsSizeLess.java b/src/main/java/org/assertj/db/error/ShouldHaveRowsSizeLess.java index ce5cc179..699ca642 100644 --- a/src/main/java/org/assertj/db/error/ShouldHaveRowsSizeLess.java +++ b/src/main/java/org/assertj/db/error/ShouldHaveRowsSizeLess.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.error; @@ -24,23 +24,23 @@ public class ShouldHaveRowsSizeLess extends BasicErrorMessageFactory { /** - * Creates a new {@link ShouldHaveRowsSizeLess}. + * Constructor. * - * @param actualSize the size of {@code actual}. + * @param actualSize the size of {@code actual}. * @param expectedSize the expected size. - * @return the created {@code ErrorMessageFactory}. */ - public static ErrorMessageFactory shouldHaveRowsSizeLess(int actualSize, int expectedSize) { - return new ShouldHaveRowsSizeLess(actualSize, expectedSize); + private ShouldHaveRowsSizeLess(int actualSize, int expectedSize) { + super("%nExpecting size (number of rows) to be less than :%n <%s>%nbut was:%n <%s>", expectedSize, actualSize); } /** - * Constructor. + * Creates a new {@link ShouldHaveRowsSizeLess}. * - * @param actualSize the size of {@code actual}. + * @param actualSize the size of {@code actual}. * @param expectedSize the expected size. + * @return the created {@code ErrorMessageFactory}. */ - private ShouldHaveRowsSizeLess(int actualSize, int expectedSize) { - super("%nExpecting size (number of rows) to be less than :%n <%s>%nbut was:%n <%s>", expectedSize, actualSize); + public static ErrorMessageFactory shouldHaveRowsSizeLess(int actualSize, int expectedSize) { + return new ShouldHaveRowsSizeLess(actualSize, expectedSize); } -} \ No newline at end of file +} diff --git a/src/main/java/org/assertj/db/error/ShouldHaveRowsSizeLessOrEqual.java b/src/main/java/org/assertj/db/error/ShouldHaveRowsSizeLessOrEqual.java index cc9137a9..adba38a4 100644 --- a/src/main/java/org/assertj/db/error/ShouldHaveRowsSizeLessOrEqual.java +++ b/src/main/java/org/assertj/db/error/ShouldHaveRowsSizeLessOrEqual.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.error; @@ -24,23 +24,23 @@ public class ShouldHaveRowsSizeLessOrEqual extends BasicErrorMessageFactory { /** - * Creates a new {@link ShouldHaveRowsSizeLessOrEqual}. + * Constructor. * - * @param actualSize the size of {@code actual}. + * @param actualSize the size of {@code actual}. * @param expectedSize the expected size. - * @return the created {@code ErrorMessageFactory}. */ - public static ErrorMessageFactory shouldHaveRowsSizeLessOrEqual(int actualSize, int expectedSize) { - return new ShouldHaveRowsSizeLessOrEqual(actualSize, expectedSize); + private ShouldHaveRowsSizeLessOrEqual(int actualSize, int expectedSize) { + super("%nExpecting size (number of rows) to be less than or equal to :%n <%s>%nbut was:%n <%s>", expectedSize, actualSize); } /** - * Constructor. + * Creates a new {@link ShouldHaveRowsSizeLessOrEqual}. * - * @param actualSize the size of {@code actual}. + * @param actualSize the size of {@code actual}. * @param expectedSize the expected size. + * @return the created {@code ErrorMessageFactory}. */ - private ShouldHaveRowsSizeLessOrEqual(int actualSize, int expectedSize) { - super("%nExpecting size (number of rows) to be less than or equal to :%n <%s>%nbut was:%n <%s>", expectedSize, actualSize); + public static ErrorMessageFactory shouldHaveRowsSizeLessOrEqual(int actualSize, int expectedSize) { + return new ShouldHaveRowsSizeLessOrEqual(actualSize, expectedSize); } -} \ No newline at end of file +} diff --git a/src/main/java/org/assertj/db/error/ShouldNotBeEqual.java b/src/main/java/org/assertj/db/error/ShouldNotBeEqual.java index 457420c5..49a37578 100644 --- a/src/main/java/org/assertj/db/error/ShouldNotBeEqual.java +++ b/src/main/java/org/assertj/db/error/ShouldNotBeEqual.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.error; @@ -18,9 +18,8 @@ /** * Creates an error message indicating that an assertion that verifies that a value is not equal to another * value. - * + * * @author Régis Pouiller - * */ public class ShouldNotBeEqual extends BasicErrorMessageFactory { @@ -28,39 +27,39 @@ public class ShouldNotBeEqual extends BasicErrorMessageFactory { private static final String EXPECTED_MESSAGE_BUT_NOT = "%nExpecting to be not equal to the value but was equal"; /** - * Creates a new {@link ShouldNotBeEqual}. - * - * @param actual The actual value in the failed assertion. + * Constructor. + * + * @param actual The actual value in the failed assertion. * @param expected The expected value to compare to. - * @return the created {@code ErrorMessageFactory}. */ - public static ErrorMessageFactory shouldNotBeEqual(Object actual, Object expected) { - return new ShouldNotBeEqual(actual, expected); + private ShouldNotBeEqual(Object actual, Object expected) { + super(EXPECTED_MESSAGE, actual, expected); } /** - * Creates a new {@link ShouldNotBeEqual}. - * - * @return the created {@code ErrorMessageFactory}. + * Constructor. */ - public static ErrorMessageFactory shouldNotBeEqual() { - return new ShouldNotBeEqual(); + private ShouldNotBeEqual() { + super(EXPECTED_MESSAGE_BUT_NOT); } /** - * Constructor. - * - * @param actual The actual value in the failed assertion. + * Creates a new {@link ShouldNotBeEqual}. + * + * @param actual The actual value in the failed assertion. * @param expected The expected value to compare to. + * @return the created {@code ErrorMessageFactory}. */ - private ShouldNotBeEqual(Object actual, Object expected) { - super(EXPECTED_MESSAGE, actual, expected); + public static ErrorMessageFactory shouldNotBeEqual(Object actual, Object expected) { + return new ShouldNotBeEqual(actual, expected); } /** - * Constructor. + * Creates a new {@link ShouldNotBeEqual}. + * + * @return the created {@code ErrorMessageFactory}. */ - private ShouldNotBeEqual() { - super(EXPECTED_MESSAGE_BUT_NOT); + public static ErrorMessageFactory shouldNotBeEqual() { + return new ShouldNotBeEqual(); } } diff --git a/src/main/java/org/assertj/db/error/ShouldNotBeModified.java b/src/main/java/org/assertj/db/error/ShouldNotBeModified.java index 7066941f..ffbb91c0 100644 --- a/src/main/java/org/assertj/db/error/ShouldNotBeModified.java +++ b/src/main/java/org/assertj/db/error/ShouldNotBeModified.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.error; @@ -20,28 +20,27 @@ * Creates an error message indicating that an assertion that verifies that a column is not modified. * * @author Régis Pouiller - * */ public class ShouldNotBeModified extends BasicErrorMessageFactory { /** - * Creates a new {@link ShouldNotBeModified}. + * Constructor. * * @param valueAtStartPoint The value at start point. - * @param valueAtEndPoint The value at end point. - * @return the created {@code ErrorMessageFactory}. + * @param valueAtEndPoint The value at end point. */ - public static ErrorMessageFactory shouldNotBeModified(Value valueAtStartPoint, Value valueAtEndPoint) { - return new ShouldNotBeModified(valueAtStartPoint, valueAtEndPoint); + private ShouldNotBeModified(Value valueAtStartPoint, Value valueAtEndPoint) { + super("%nExpecting :%n <%s>%nis not modified but is :%n <%s>", valueAtStartPoint.getValue(), valueAtEndPoint.getValue()); } /** - * Constructor. + * Creates a new {@link ShouldNotBeModified}. * * @param valueAtStartPoint The value at start point. - * @param valueAtEndPoint The value at end point. + * @param valueAtEndPoint The value at end point. + * @return the created {@code ErrorMessageFactory}. */ - private ShouldNotBeModified(Value valueAtStartPoint, Value valueAtEndPoint) { - super("%nExpecting :%n <%s>%nis not modified but is :%n <%s>", valueAtStartPoint.getValue(), valueAtEndPoint.getValue()); + public static ErrorMessageFactory shouldNotBeModified(Value valueAtStartPoint, Value valueAtEndPoint) { + return new ShouldNotBeModified(valueAtStartPoint, valueAtEndPoint); } } diff --git a/src/main/java/org/assertj/db/error/ShouldNotExist.java b/src/main/java/org/assertj/db/error/ShouldNotExist.java index 22c54dd0..ee263613 100644 --- a/src/main/java/org/assertj/db/error/ShouldNotExist.java +++ b/src/main/java/org/assertj/db/error/ShouldNotExist.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.error; @@ -17,14 +17,20 @@ /** * Creates an error message indicating that an assertion that verifies that a row does not exist. - * + * * @author Régis Pouiller - * */ public class ShouldNotExist extends BasicErrorMessageFactory { private static final String EXPECTED_MESSAGE = "%nExpecting not exist but exists"; + /** + * Constructor. + */ + private ShouldNotExist() { + super(EXPECTED_MESSAGE); + } + /** * Creates a new {@link org.assertj.db.error.ShouldNotExist}. * @@ -33,11 +39,4 @@ public class ShouldNotExist extends BasicErrorMessageFactory { public static ErrorMessageFactory shouldNotExist() { return new ShouldNotExist(); } - - /** - * Constructor. - */ - private ShouldNotExist() { - super(EXPECTED_MESSAGE); - } } diff --git a/src/main/java/org/assertj/db/error/ShouldSatisfy.java b/src/main/java/org/assertj/db/error/ShouldSatisfy.java index 49219ceb..ec47b440 100644 --- a/src/main/java/org/assertj/db/error/ShouldSatisfy.java +++ b/src/main/java/org/assertj/db/error/ShouldSatisfy.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.error; @@ -20,18 +20,25 @@ * Creates an error message indicating that an assertion that verifies that a value does not satisfying condition. * * @author Julien Roy - * */ public class ShouldSatisfy extends BasicErrorMessageFactory { private static final String EXPECTED_MESSAGE_WITH_INDEX = "%nExpecting that the value at index %s:%n %s%nto satisfy: %n %s"; - public static ErrorMessageFactory shouldSatisfy(int index, Object actual, Condition condition) { - return new ShouldSatisfy(index, actual, condition); - } - private ShouldSatisfy(int index, Object actual, Condition condition) { super(EXPECTED_MESSAGE_WITH_INDEX, index, actual, condition); } + /** + * Verifies that the values of a row satisfy to conditions in parameter. + * + * @param index The index of properties + * @param actual The actual value that triggered assertion error. + * @param condition The condition that triggered assertion error. + * @return {@code this} condition not satisfied error message. + */ + public static ErrorMessageFactory shouldSatisfy(int index, Object actual, Condition condition) { + return new ShouldSatisfy(index, actual, condition); + } + } diff --git a/src/main/java/org/assertj/db/error/package-info.java b/src/main/java/org/assertj/db/error/package-info.java index 2a668cbd..03d7fe93 100644 --- a/src/main/java/org/assertj/db/error/package-info.java +++ b/src/main/java/org/assertj/db/error/package-info.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ /** * This package contains the different error messages used when an assertion methods fail. diff --git a/src/main/java/org/assertj/db/exception/AssertJDBException.java b/src/main/java/org/assertj/db/exception/AssertJDBException.java index b665840f..ebf2e233 100644 --- a/src/main/java/org/assertj/db/exception/AssertJDBException.java +++ b/src/main/java/org/assertj/db/exception/AssertJDBException.java @@ -8,15 +8,14 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.exception; /** * Exception during the assertion (for example : when getting the data in the database, or accessing to file system). - * + * * @author Régis Pouiller - * */ public class AssertJDBException extends RuntimeException { @@ -27,7 +26,7 @@ public class AssertJDBException extends RuntimeException { /** * Constructor of the Exception. - * + * * @param exception Exception inside this one. */ public AssertJDBException(Exception exception) { @@ -36,7 +35,7 @@ public AssertJDBException(Exception exception) { /** * Constructor of the Exception. - * + * * @param message Message of the exception * @param objects Parameters of the message */ diff --git a/src/main/java/org/assertj/db/exception/package-info.java b/src/main/java/org/assertj/db/exception/package-info.java index 5046fb9c..a8e03222 100644 --- a/src/main/java/org/assertj/db/exception/package-info.java +++ b/src/main/java/org/assertj/db/exception/package-info.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ /** * This package contains the different exception thrown when there is an unexpected situation. diff --git a/src/main/java/org/assertj/db/global/AbstractElement.java b/src/main/java/org/assertj/db/global/AbstractElement.java index ceb9bea1..a2308765 100644 --- a/src/main/java/org/assertj/db/global/AbstractElement.java +++ b/src/main/java/org/assertj/db/global/AbstractElement.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.global; @@ -25,7 +25,7 @@ * @author Régis Pouiller */ public abstract class AbstractElement> - implements Descriptable { + implements Descriptable { /** * Writable information about an element. diff --git a/src/main/java/org/assertj/db/global/package-info.java b/src/main/java/org/assertj/db/global/package-info.java index bcbd0264..595112b8 100644 --- a/src/main/java/org/assertj/db/global/package-info.java +++ b/src/main/java/org/assertj/db/global/package-info.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ /** * This package contains the abstract class which is parent of all the elements. diff --git a/src/main/java/org/assertj/db/navigation/Navigation.java b/src/main/java/org/assertj/db/navigation/Navigation.java index 22347a9d..fff6684b 100644 --- a/src/main/java/org/assertj/db/navigation/Navigation.java +++ b/src/main/java/org/assertj/db/navigation/Navigation.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.navigation; diff --git a/src/main/java/org/assertj/db/navigation/Position.java b/src/main/java/org/assertj/db/navigation/Position.java index 9fc62344..15264b79 100644 --- a/src/main/java/org/assertj/db/navigation/Position.java +++ b/src/main/java/org/assertj/db/navigation/Position.java @@ -8,21 +8,21 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.navigation; -import org.assertj.db.exception.AssertJDBException; -import org.assertj.db.global.AbstractElement; -import org.assertj.db.type.DbElement; -import org.assertj.db.type.Row; +import static org.assertj.db.util.Proxies.unProxy; import java.lang.reflect.Constructor; import java.util.HashMap; import java.util.List; import java.util.Map; -import static org.assertj.db.util.Proxies.unProxy; +import org.assertj.db.exception.AssertJDBException; +import org.assertj.db.global.AbstractElement; +import org.assertj.db.type.DbElement; +import org.assertj.db.type.Row; /** * Position during navigation. @@ -30,7 +30,6 @@ * @param The class of the actual position (an sub-class of {@link org.assertj.db.global.AbstractElement} and of {@link org.assertj.db.navigation.Navigation}). * @param The class of the next position where the navigation go (an sub-class of {@link org.assertj.db.global.AbstractElement} and of {@link org.assertj.db.navigation.Navigation}). * @param The class of the database element on which is the next position (an sub-class of {@link org.assertj.db.type.DbElement}). - * * @author Régis Pouiller * @since 1.1.0 */ @@ -40,10 +39,6 @@ public abstract class Position & Navigation, N exte * Actual value. */ private final E myself; - /** - * Index of the next to get. - */ - private int nextIndex; /** * Class of the element of navigation (used to make instance). */ @@ -52,11 +47,15 @@ public abstract class Position & Navigation, N exte * Map the elements of navigation with their index in key (contains the elements of navigation already generated). */ private final Map elementsMap = new HashMap<>(); + /** + * Index of the next to get. + */ + private int nextIndex; /** * Constructor. * - * @param myself Actual value. + * @param myself Actual value. * @param elementClass Class of the element of navigation (used to make instance). */ public Position(E myself, Class elementClass) { @@ -120,12 +119,12 @@ public N getInstance(List elementsList, int index) { return instance; } catch (Exception e) { throw new AssertJDBException(String.format("There is an exception '" + e.getMessage() - + "'%n\t in the instantiation of the element " + elementClass.getName() - + "%n\t on " - + element.getClass() - + " with " + myself.getClass() + ".%n " - + "It is normally impossible.%n That means there is a big mistake in the development of AssertJDB.%n " - + "Please write an issue for that if you meet this problem.")); + + "'%n\t in the instantiation of the element " + elementClass.getName() + + "%n\t on " + + element.getClass() + + " with " + myself.getClass() + ".%n " + + "It is normally impossible.%n That means there is a big mistake in the development of AssertJDB.%n " + + "Please write an issue for that if you meet this problem.")); } } diff --git a/src/main/java/org/assertj/db/navigation/PositionWithChanges.java b/src/main/java/org/assertj/db/navigation/PositionWithChanges.java index 7252e62d..e1e850b3 100644 --- a/src/main/java/org/assertj/db/navigation/PositionWithChanges.java +++ b/src/main/java/org/assertj/db/navigation/PositionWithChanges.java @@ -8,10 +8,18 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.navigation; +import static org.assertj.db.util.Proxies.unProxy; + +import java.lang.reflect.Constructor; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + import org.assertj.db.exception.AssertJDBException; import org.assertj.db.global.AbstractElement; import org.assertj.db.type.Change; @@ -20,17 +28,11 @@ import org.assertj.db.type.Value; import org.assertj.db.util.Values; -import java.lang.reflect.Constructor; -import java.util.*; - -import static org.assertj.db.util.Proxies.unProxy; - /** * Position during navigation. * * @param The class of the actual position (an sub-class of {@link org.assertj.db.global.AbstractElement} and of {@link org.assertj.db.navigation.Navigation}). * @param The class of the next position where the navigation go (an sub-class of {@link org.assertj.db.global.AbstractElement} and of {@link org.assertj.db.navigation.Navigation}). - * * @author Régis Pouiller * @since 1.1.0 */ @@ -65,9 +67,9 @@ public abstract class PositionWithChanges & Navigat /** * Constructor. * - * @param myself Actual value. + * @param myself Actual value. * @param actualElementClass Class of the actual element of navigation (used to make instance). - * @param nextElementClass Class of the next element of navigation (used to make instance). + * @param nextElementClass Class of the next element of navigation (used to make instance). */ public PositionWithChanges(E myself, Class actualElementClass, Class nextElementClass) { this.myself = myself; @@ -93,8 +95,8 @@ private E getFromCache(ChangeType changeType, String tableName) { /** * Sets an instance of changes in the cache. * - * @param changeType Type of the change on which is the instance of change. - * @param tableName Name of the table on which is the instance of change. + * @param changeType Type of the change on which is the instance of change. + * @param tableName Name of the table on which is the instance of change. * @param changesInstance Changes to add in the cache. */ private void setInCache(ChangeType changeType, String tableName, E changesInstance) { @@ -106,7 +108,7 @@ private void setInCache(ChangeType changeType, String tableName, E changesInstan * Gets an instance of changes corresponding to the index and the type of change. If this instance is already instanced, the method * returns it from the cache. * - * @param changes The changes + * @param changes The changes * @param changeType Type of the change on which is the instance of change. * @param tableName Name of the table on which is the instance of change. * @return The changes implementation. @@ -133,19 +135,19 @@ public E getChangesInstance(Changes changes, ChangeType changeType, String table return instance; } catch (Exception e) { throw new AssertJDBException(String.format("There is an exception '" + e.getMessage() - + "'%n\t in the instantiation of the element " + actualElementClass.getName() - + "%n\t on " - + Changes.class - + " with " + myself.getClass() + ".%n " - + "It is normally impossible.%n That means there is a big mistake in the development of AssertJDB.%n " - + "Please write an issue for that if you meet this problem.")); + + "'%n\t in the instantiation of the element " + actualElementClass.getName() + + "%n\t on " + + Changes.class + + " with " + myself.getClass() + ".%n " + + "It is normally impossible.%n That means there is a big mistake in the development of AssertJDB.%n " + + "Please write an issue for that if you meet this problem.")); } } /** * Returns the change of the {@code changeType} on the {@code tableName} at the {@code index} in parameter. * - * @param changes The changes + * @param changes The changes * @param index The index corresponding to the change. * @param changeType The change type corresponding to the change. * @param tableName The table name @@ -173,7 +175,7 @@ private Change getChange(Changes changes, int index, ChangeType changeType, Stri * Gets an instance of change assert corresponding to the index and the type of change. If this instance is already instanced, the method * returns it from the cache. * - * @param changes The changes + * @param changes The changes * @param changeType Type of the change on which is the instance of change assert. * @param tableName Name of the table on which is the instance of change assert. * @return The change assert implementation. @@ -186,7 +188,7 @@ public N getChangeInstance(Changes changes, ChangeType changeType, String tableN * Gets an instance of change assert corresponding to the index and the type of change. If this instance is already instanced, the method * returns it from the cache. * - * @param changes The changes + * @param changes The changes * @param changeType Type of the change on which is the instance of change assert. * @param tableName Name of the table on which is the instance of change assert. * @param index Index of the change on which is the instance of change assert. @@ -209,12 +211,12 @@ public N getChangeInstance(Changes changes, ChangeType changeType, String tableN return instance; } catch (Exception e) { throw new AssertJDBException(String.format("There is an exception '" + e.getMessage() - + "'%n\t in the instantiation of the element " + nextElementClass.getName() - + "%n\t on " - + Change.class - + " with " + myself.getClass() + ".%n " - + "It is normally impossible.%n That means there is a big mistake in the development of AssertJDB.%n " - + "Please write an issue for that if you meet this problem.")); + + "'%n\t in the instantiation of the element " + nextElementClass.getName() + + "%n\t on " + + Change.class + + " with " + myself.getClass() + ".%n " + + "It is normally impossible.%n That means there is a big mistake in the development of AssertJDB.%n " + + "Please write an issue for that if you meet this problem.")); } } @@ -222,8 +224,8 @@ public N getChangeInstance(Changes changes, ChangeType changeType, String tableN * Gets an instance of change assert corresponding to the table and the primary keys. * If this instance is already instanced, the method returns it from the cache. * - * @param changes The changes - * @param tableName Name of the table on which is the instance of change assert. + * @param changes The changes + * @param tableName Name of the table on which is the instance of change assert. * @param pksValues The values of the primary key corresponding to the {@link org.assertj.db.type.Change}. * @return The change assert implementation. */ @@ -253,8 +255,9 @@ public N getChangeInstanceWithPK(Changes changes, String tableName, Object... pk /** * Returns the index of the next change of the type and the table in parameter. + * * @param changeType Type of the change ({@code null} if there is no filter on the type of change) - * @param tableName Name of the table ({@code null} if there is no filter on the table) + * @param tableName Name of the table ({@code null} if there is no filter on the table) * @return The index of the next change. */ private Integer getIndexNextChange(ChangeType changeType, String tableName) { @@ -270,9 +273,10 @@ private Integer getIndexNextChange(ChangeType changeType, String tableName) { /** * Sets the index of the next change of the type and the table in parameter. + * * @param changeType Type of the change ({@code null} if there is no filter on the type of change) - * @param tableName Name of the table ({@code null} if there is no filter on the table) - * @param index The index of the next change. + * @param tableName Name of the table ({@code null} if there is no filter on the table) + * @param index The index of the next change. */ private void setIndexNextChange(ChangeType changeType, String tableName, int index) { Map map = indexNextChangeMap.computeIfAbsent(changeType, k -> new HashMap<>()); diff --git a/src/main/java/org/assertj/db/navigation/PositionWithColumns.java b/src/main/java/org/assertj/db/navigation/PositionWithColumns.java index 2208c95d..098d4ab1 100644 --- a/src/main/java/org/assertj/db/navigation/PositionWithColumns.java +++ b/src/main/java/org/assertj/db/navigation/PositionWithColumns.java @@ -8,25 +8,24 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.navigation; +import java.util.List; + import org.assertj.db.exception.AssertJDBException; import org.assertj.db.global.AbstractElement; import org.assertj.db.type.DbElement; import org.assertj.db.type.lettercase.CaseComparison; import org.assertj.db.util.NameComparator; -import java.util.List; - /** * Position with columns during navigation. * * @param The class of the actual position (an sub-class of {@link org.assertj.db.global.AbstractElement} and of {@link org.assertj.db.navigation.Navigation}). * @param The class of the next position where the navigation go (an sub-class of {@link org.assertj.db.global.AbstractElement} and of {@link org.assertj.db.navigation.Navigation}). * @param The class of the database element on which is the next position (an sub-class of {@link org.assertj.db.type.DbElement}). - * * @author Régis Pouiller * @since 1.1.0 */ @@ -35,7 +34,7 @@ public abstract class PositionWithColumns & Navigat /** * Constructor. * - * @param myself Actual value. + * @param myself Actual value. * @param elementClass Class of the element of navigation (used to make instance). */ public PositionWithColumns(E myself, Class elementClass) { @@ -59,7 +58,7 @@ public N getInstance(List elementsList, List columnsNameList, String int index = NameComparator.INSTANCE.indexOf(columnsNameList, columnName, comparison); if (index == -1) { throw new AssertJDBException(String.format("Column <%s> does not exist%nin <%s>%nwith comparison %s", - columnName, columnsNameList, comparison.getComparisonName())); + columnName, columnsNameList, comparison.getComparisonName())); } return getInstance(elementsList, index); } diff --git a/src/main/java/org/assertj/db/navigation/PositionWithColumnsChange.java b/src/main/java/org/assertj/db/navigation/PositionWithColumnsChange.java index b8ce7ac9..3c709fd1 100644 --- a/src/main/java/org/assertj/db/navigation/PositionWithColumnsChange.java +++ b/src/main/java/org/assertj/db/navigation/PositionWithColumnsChange.java @@ -8,10 +8,18 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.navigation; +import static org.assertj.db.util.Proxies.unProxy; + +import java.lang.reflect.Constructor; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + import org.assertj.db.exception.AssertJDBException; import org.assertj.db.global.AbstractElement; import org.assertj.db.type.Change; @@ -21,20 +29,11 @@ import org.assertj.db.util.Changes; import org.assertj.db.util.NameComparator; -import java.lang.reflect.Constructor; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import static org.assertj.db.util.Proxies.unProxy; - /** * Position during navigation. * * @param The class of the actual position (an sub-class of {@link org.assertj.db.global.AbstractElement} and of {@link org.assertj.db.navigation.Navigation}). * @param The class of the next position where the navigation go (an sub-class of {@link org.assertj.db.global.AbstractElement} and of {@link org.assertj.db.navigation.Navigation}). - * * @author Régis Pouiller * @since 1.1.0 */ @@ -44,10 +43,6 @@ public abstract class PositionWithColumnsChange & N * Actual value. */ private final E myself; - /** - * Index of the next to get. - */ - private int nextIndex; /** * Class of the element of navigation (used to make instance). */ @@ -56,11 +51,15 @@ public abstract class PositionWithColumnsChange & N * Map the elements of navigation with their index in key (contains the elements of navigation already generated). */ private final Map elementsMap = new HashMap<>(); + /** + * Index of the next to get. + */ + private int nextIndex; /** * Constructor. * - * @param myself Actual value. + * @param myself Actual value. * @param elementClass Class of the element of navigation (used to make instance). */ public PositionWithColumnsChange(E myself, Class elementClass) { @@ -85,7 +84,7 @@ public N getChangeColumnInstance(Change change) { * returns it from the cache. * * @param change The change - * @param index Index of the instance. + * @param index Index of the instance. * @return The instance. * @throws org.assertj.db.exception.AssertJDBException If the {@code index} is out of the bounds. */ @@ -128,10 +127,10 @@ public N getChangeColumnInstance(Change change, int index) { return instance; } catch (Exception e) { throw new AssertJDBException(String.format("There is an exception '" + e.getMessage() - + "'%n\t in the instantiation of the element " + elementClass.getName() + "%n" - + "\t with " + myself.getClass() + ".%n " - + "It is normally impossible.%n That means there is a big mistake in the development of AssertJDB.%n " - + "Please write an issue for that if you meet this problem.")); + + "'%n\t in the instantiation of the element " + elementClass.getName() + "%n" + + "\t with " + myself.getClass() + ".%n " + + "It is normally impossible.%n That means there is a big mistake in the development of AssertJDB.%n " + + "Please write an issue for that if you meet this problem.")); } } @@ -139,9 +138,9 @@ public N getChangeColumnInstance(Change change, int index) { * Gets an instance of element corresponding to the column name in parameter. * If this instance is already instanced, the method returns it from the cache. * - * @param change The change - * @param columnName Name of the column of the element on which is the instance of element of navigation. - * @param comparison Case comparison for column name. + * @param change The change + * @param columnName Name of the column of the element on which is the instance of element of navigation. + * @param comparison Case comparison for column name. * @return The instance. * @throws org.assertj.db.exception.AssertJDBException If the {@code index} is out of the bounds. */ @@ -153,7 +152,7 @@ public N getChangeColumnInstance(Change change, String columnName, CaseCompariso int index = NameComparator.INSTANCE.indexOf(columnsNameList, columnName, comparison); if (index == -1) { throw new AssertJDBException(String.format("Column <%s> does not exist%nin <%s>%nwith comparison %s", - columnName, columnsNameList, comparison.getComparisonName())); + columnName, columnsNameList, comparison.getComparisonName())); } return getChangeColumnInstance(change, index); } @@ -181,7 +180,7 @@ public N getModifiedChangeColumnInstance(Change change) { * returns it from the cache. * * @param change The change - * @param index Index of the instance. + * @param index Index of the instance. * @return The instance. * @throws org.assertj.db.exception.AssertJDBException If the {@code index} is out of the bounds. */ @@ -199,9 +198,9 @@ public N getModifiedChangeColumnInstance(Change change, int index) { * Gets an instance of modified element corresponding to the column name in parameter. * If this instance is already instanced, the method returns it from the cache. * - * @param change The change - * @param columnName Name of the column of the element on which is the instance of element of navigation. - * @param comparison Case comparison for column name. + * @param change The change + * @param columnName Name of the column of the element on which is the instance of element of navigation. + * @param comparison Case comparison for column name. * @return The instance. * @throws org.assertj.db.exception.AssertJDBException If the {@code index} is out of the bounds. */ @@ -220,15 +219,15 @@ public N getModifiedChangeColumnInstance(Change change, String columnName, CaseC } } throw new AssertJDBException( - String.format("Column <%s> does not exist among the modified columns%nin <%s>%nwith comparison %s", - columnName, modifiedColumnsNameList, comparison.getComparisonName())); + String.format("Column <%s> does not exist among the modified columns%nin <%s>%nwith comparison %s", + columnName, modifiedColumnsNameList, comparison.getComparisonName())); } /** * Returns the description. * - * @param index Index of the value. - * @param columnName Name of the column of the element. + * @param index Index of the value. + * @param columnName Name of the column of the element. * @return The description */ protected abstract String getDescription(int index, String columnName); diff --git a/src/main/java/org/assertj/db/navigation/PositionWithPoints.java b/src/main/java/org/assertj/db/navigation/PositionWithPoints.java index 56d70362..a724e2a7 100644 --- a/src/main/java/org/assertj/db/navigation/PositionWithPoints.java +++ b/src/main/java/org/assertj/db/navigation/PositionWithPoints.java @@ -8,17 +8,17 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.navigation; -import org.assertj.db.exception.AssertJDBException; -import org.assertj.db.global.AbstractElement; -import org.assertj.db.type.DbElement; +import static org.assertj.db.util.Proxies.unProxy; import java.lang.reflect.Constructor; -import static org.assertj.db.util.Proxies.unProxy; +import org.assertj.db.exception.AssertJDBException; +import org.assertj.db.global.AbstractElement; +import org.assertj.db.type.DbElement; /** * Position with point (start point and end point) during navigation. @@ -26,7 +26,6 @@ * @param The class of the actual position (an sub-class of {@link org.assertj.db.global.AbstractElement} and of {@link org.assertj.db.navigation.Navigation}). * @param The class of the next position where the navigation go (an sub-class of {@link org.assertj.db.global.AbstractElement} and of {@link org.assertj.db.navigation.Navigation}). * @param The class of the database element on which is the next position (an sub-class of {@link org.assertj.db.type.DbElement}). - * * @author Régis Pouiller * @since 1.1.0 */ @@ -67,11 +66,11 @@ public abstract class PositionWithPoints & Navigati /** * Constructor. * - * @param myself Actual value. + * @param myself Actual value. * @param elementClass Class of the element of navigation (used to make instance). - * @param pointClass Class of the database element at the next point (used to make instance). + * @param pointClass Class of the database element at the next point (used to make instance). * @param atStartPoint The element at start point - * @param atEndPoint The element at end point + * @param atEndPoint The element at end point */ public PositionWithPoints(E myself, Class elementClass, Class pointClass, D atStartPoint, D atEndPoint) { this.myself = myself; @@ -122,23 +121,25 @@ protected N getInstance(D element) { return constructor.newInstance(myself, element); } catch (Exception e) { throw new AssertJDBException(String.format("There is an exception '" + e.getMessage() - + "'%n\t in the instantiation of the element " + elementClass.getName() - + "%n\t on " - + pointClass - + " with " + myself.getClass() + ".%n " - + "It is normally impossible.%n That means there is a big mistake in the development of AssertJDB.%n " - + "Please write an issue for that if you meet this problem.")); + + "'%n\t in the instantiation of the element " + elementClass.getName() + + "%n\t on " + + pointClass + + " with " + myself.getClass() + ".%n " + + "It is normally impossible.%n That means there is a big mistake in the development of AssertJDB.%n " + + "Please write an issue for that if you meet this problem.")); } } /** * Returns the description at start point. + * * @return The description at start point */ protected abstract String getDescriptionAtStartPoint(); /** * Returns the description at end point. + * * @return The description at end point */ protected abstract String getDescriptionAtEndPoint(); diff --git a/src/main/java/org/assertj/db/navigation/ToChange.java b/src/main/java/org/assertj/db/navigation/ToChange.java index e1159830..568754a9 100644 --- a/src/main/java/org/assertj/db/navigation/ToChange.java +++ b/src/main/java/org/assertj/db/navigation/ToChange.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.navigation; @@ -50,9 +50,8 @@ * * * - * @author Régis Pouiller - * * @param The class of a assertion on a change (an sub-class of {@link org.assertj.db.navigation.element.ChangeElement}). + * @author Régis Pouiller */ public interface ToChange extends Navigation { @@ -191,7 +190,7 @@ public interface ToChange extends Navigation { * Returns assertion methods on the {@link org.assertj.db.type.Change} on the table {@code tableName} at the {@code index} in parameter. * * @param tableName The table name - * @param index The index corresponding to the {@link org.assertj.db.type.Change}. + * @param index The index corresponding to the {@link org.assertj.db.type.Change}. * @return An object to make assertions on the {@link org.assertj.db.type.Change}. * @throws org.assertj.db.exception.AssertJDBException If the {@code index} is out of the bounds. * @see org.assertj.db.api.ChangesAssert#changeOnTable(String, int) @@ -238,7 +237,7 @@ public interface ToChange extends Navigation { * Returns assertion methods on the {@link org.assertj.db.type.Change} of creation ({@link org.assertj.db.type.ChangeType#CREATION}) on the table {@code tableName} at the {@code index} in parameter. * * @param tableName The table name - * @param index The index corresponding to the {@link org.assertj.db.type.Change} of creation ({@link org.assertj.db.type.ChangeType#CREATION}). + * @param index The index corresponding to the {@link org.assertj.db.type.Change} of creation ({@link org.assertj.db.type.ChangeType#CREATION}). * @return An object to make assertions on the {@link org.assertj.db.type.Change} of creation ({@link org.assertj.db.type.ChangeType#CREATION}). * @throws org.assertj.db.exception.AssertJDBException If the {@code index} is out of the bounds. * @see org.assertj.db.api.ChangesAssert#changeOfCreationOnTable(String, int) @@ -269,7 +268,7 @@ public interface ToChange extends Navigation { * Returns assertion methods on the {@link org.assertj.db.type.Change} of modification ({@link org.assertj.db.type.ChangeType#MODIFICATION}) on the table {@code tableName} at the {@code index} in parameter. * * @param tableName The table name - * @param index The index corresponding to the {@link org.assertj.db.type.Change} of modification ({@link org.assertj.db.type.ChangeType#MODIFICATION}). + * @param index The index corresponding to the {@link org.assertj.db.type.Change} of modification ({@link org.assertj.db.type.ChangeType#MODIFICATION}). * @return An object to make assertions on the {@link org.assertj.db.type.Change} of modification ({@link org.assertj.db.type.ChangeType#MODIFICATION}). * @throws org.assertj.db.exception.AssertJDBException If the {@code index} is out of the bounds. * @see org.assertj.db.api.ChangesAssert#changeOfModificationOnTable(String, int) @@ -300,7 +299,7 @@ public interface ToChange extends Navigation { * Returns assertion methods on the {@link org.assertj.db.type.Change} of deletion ({@link org.assertj.db.type.ChangeType#DELETION}) on the table {@code tableName} at the {@code index} in parameter. * * @param tableName The table name - * @param index The index corresponding to the {@link org.assertj.db.type.Change} of deletion ({@link org.assertj.db.type.ChangeType#DELETION}). + * @param index The index corresponding to the {@link org.assertj.db.type.Change} of deletion ({@link org.assertj.db.type.ChangeType#DELETION}). * @return An object to make assertions on the {@link org.assertj.db.type.Change} of deletion ({@link org.assertj.db.type.ChangeType#DELETION}). * @throws org.assertj.db.exception.AssertJDBException If the {@code index} is out of the bounds. * @see org.assertj.db.api.ChangesAssert#changeOfDeletionOnTable(String, int) diff --git a/src/main/java/org/assertj/db/navigation/ToChanges.java b/src/main/java/org/assertj/db/navigation/ToChanges.java index 6010b526..13470ab6 100644 --- a/src/main/java/org/assertj/db/navigation/ToChanges.java +++ b/src/main/java/org/assertj/db/navigation/ToChanges.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.navigation; @@ -48,9 +48,9 @@ * assertThat(changes).change().rowAtEndPoint().value().returnToRow().returnToChange().returnToChanges().ofAll()......; * * - * @author Régis Pouiller * * @param The class of a assertion on changes (an sub-class of {@link org.assertj.db.navigation.element.ChangesElement}). + * @author Régis Pouiller */ public interface ToChanges extends Navigation { diff --git a/src/main/java/org/assertj/db/navigation/ToColumn.java b/src/main/java/org/assertj/db/navigation/ToColumn.java index e2ebe0d9..c794de76 100644 --- a/src/main/java/org/assertj/db/navigation/ToColumn.java +++ b/src/main/java/org/assertj/db/navigation/ToColumn.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.navigation; @@ -76,9 +76,8 @@ * * * - * @author Régis Pouiller - * * @param The class of a assertion on a column (an sub-class of {@link org.assertj.db.navigation.element.ColumnElement}). + * @author Régis Pouiller */ public interface ToColumn extends Navigation { @@ -126,7 +125,7 @@ public interface ToColumn extends Navigation { * * @param columnName The column name. * @return An object to make assertions on the {@link org.assertj.db.type.Column}. - * @throws NullPointerException If the column name in parameter is {@code null}. + * @throws NullPointerException If the column name in parameter is {@code null}. * @throws org.assertj.db.exception.AssertJDBException If there is no {@link org.assertj.db.type.Column} with this name. * @see org.assertj.db.api.TableAssert#column(String) * @see org.assertj.db.api.RequestAssert#column(String) diff --git a/src/main/java/org/assertj/db/navigation/ToColumnFromChange.java b/src/main/java/org/assertj/db/navigation/ToColumnFromChange.java index 4a7c56e7..8cd69608 100644 --- a/src/main/java/org/assertj/db/navigation/ToColumnFromChange.java +++ b/src/main/java/org/assertj/db/navigation/ToColumnFromChange.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.navigation; @@ -52,9 +52,8 @@ * * * - * @author Régis Pouiller - * * @param The class of a assertion on a column (an sub-class of {@link org.assertj.db.navigation.element.ColumnElement}). + * @author Régis Pouiller */ public interface ToColumnFromChange extends Navigation { diff --git a/src/main/java/org/assertj/db/navigation/ToRow.java b/src/main/java/org/assertj/db/navigation/ToRow.java index 28a3bef1..63089d4b 100644 --- a/src/main/java/org/assertj/db/navigation/ToRow.java +++ b/src/main/java/org/assertj/db/navigation/ToRow.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.navigation; @@ -53,15 +53,14 @@ * * * - * @author Régis Pouiller - * * @param The class of a assertion on a row (an sub-class of {@link org.assertj.db.navigation.element.RowElement}). + * @author Régis Pouiller */ public interface ToRow extends Navigation { /** * Returns assertion methods on the next {@link org.assertj.db.type.Row} in the list of {@link org.assertj.db.type.Row}. - * + * * @return An object to make assertions on the next {@link Row}. * @throws AssertJDBException If there are no more {@link org.assertj.db.type.Row} in the list of {@link org.assertj.db.type.Row}s. * @see org.assertj.db.api.TableAssert#row() @@ -75,7 +74,7 @@ public interface ToRow extends Navigation { /** * Returns assertion methods on the {@link org.assertj.db.type.Row} at the {@code index} in parameter. - * + * * @param index The index corresponding to the {@link org.assertj.db.type.Row}. * @return An object to make assertions on the {@link org.assertj.db.type.Row}. * @throws AssertJDBException If the {@code index} is out of the bounds. diff --git a/src/main/java/org/assertj/db/navigation/ToRowFromChange.java b/src/main/java/org/assertj/db/navigation/ToRowFromChange.java index b8c8bb9a..0da64888 100644 --- a/src/main/java/org/assertj/db/navigation/ToRowFromChange.java +++ b/src/main/java/org/assertj/db/navigation/ToRowFromChange.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.navigation; @@ -46,9 +46,8 @@ * * * - * @author Régis Pouiller - * * @param The class of a assertion on a row (an sub-class of {@link org.assertj.db.navigation.element.RowElement}). + * @author Régis Pouiller */ public interface ToRowFromChange extends Navigation { diff --git a/src/main/java/org/assertj/db/navigation/ToValue.java b/src/main/java/org/assertj/db/navigation/ToValue.java index f8684440..3e0ac3b8 100644 --- a/src/main/java/org/assertj/db/navigation/ToValue.java +++ b/src/main/java/org/assertj/db/navigation/ToValue.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.navigation; @@ -70,9 +70,8 @@ * * * - * @author Régis Pouiller - * * @param The class of a assertion on a value (an sub-class of {@link org.assertj.db.navigation.element.ValueElement}). + * @author Régis Pouiller */ public interface ToValue extends Navigation { diff --git a/src/main/java/org/assertj/db/navigation/ToValueFromColumn.java b/src/main/java/org/assertj/db/navigation/ToValueFromColumn.java index 526922cb..b376921d 100644 --- a/src/main/java/org/assertj/db/navigation/ToValueFromColumn.java +++ b/src/main/java/org/assertj/db/navigation/ToValueFromColumn.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.navigation; @@ -42,9 +42,8 @@ * * * - * @author Régis Pouiller - * * @param The class of a assertion on a value (an sub-class of {@link org.assertj.db.navigation.element.ValueElement}). + * @author Régis Pouiller */ public interface ToValueFromColumn extends Navigation { diff --git a/src/main/java/org/assertj/db/navigation/ToValueFromRow.java b/src/main/java/org/assertj/db/navigation/ToValueFromRow.java index 6e931d00..ca320e1e 100644 --- a/src/main/java/org/assertj/db/navigation/ToValueFromRow.java +++ b/src/main/java/org/assertj/db/navigation/ToValueFromRow.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.navigation; @@ -66,9 +66,8 @@ * * * - * @author Régis Pouiller - * * @param The class of a assertion on a value (an sub-class of {@link org.assertj.db.navigation.element.ValueElement}). + * @author Régis Pouiller */ public interface ToValueFromRow extends Navigation { @@ -77,7 +76,7 @@ public interface ToValueFromRow extends Navigation { * * @param columnName The column name. * @return An object to make assertions on the value. - * @throws NullPointerException If the column name in parameter is {@code null}. + * @throws NullPointerException If the column name in parameter is {@code null}. * @throws org.assertj.db.exception.AssertJDBException If there is no column with this name. * @see org.assertj.db.api.AbstractRowAssert#value(String) * @see org.assertj.db.api.AbstractRowValueAssert#value(String) diff --git a/src/main/java/org/assertj/db/navigation/element/ChangeElement.java b/src/main/java/org/assertj/db/navigation/element/ChangeElement.java index 82e313a3..bbe29ba2 100644 --- a/src/main/java/org/assertj/db/navigation/element/ChangeElement.java +++ b/src/main/java/org/assertj/db/navigation/element/ChangeElement.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.navigation.element; diff --git a/src/main/java/org/assertj/db/navigation/element/ChangesElement.java b/src/main/java/org/assertj/db/navigation/element/ChangesElement.java index 1c2f1f07..74829d2e 100644 --- a/src/main/java/org/assertj/db/navigation/element/ChangesElement.java +++ b/src/main/java/org/assertj/db/navigation/element/ChangesElement.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.navigation.element; diff --git a/src/main/java/org/assertj/db/navigation/element/ColumnElement.java b/src/main/java/org/assertj/db/navigation/element/ColumnElement.java index c2a51715..af680b3b 100644 --- a/src/main/java/org/assertj/db/navigation/element/ColumnElement.java +++ b/src/main/java/org/assertj/db/navigation/element/ColumnElement.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.navigation.element; diff --git a/src/main/java/org/assertj/db/navigation/element/Element.java b/src/main/java/org/assertj/db/navigation/element/Element.java index e3cc4dd1..94a46be6 100644 --- a/src/main/java/org/assertj/db/navigation/element/Element.java +++ b/src/main/java/org/assertj/db/navigation/element/Element.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.navigation.element; diff --git a/src/main/java/org/assertj/db/navigation/element/RowElement.java b/src/main/java/org/assertj/db/navigation/element/RowElement.java index 3a4cdeeb..7348e4df 100644 --- a/src/main/java/org/assertj/db/navigation/element/RowElement.java +++ b/src/main/java/org/assertj/db/navigation/element/RowElement.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.navigation.element; diff --git a/src/main/java/org/assertj/db/navigation/element/ValueElement.java b/src/main/java/org/assertj/db/navigation/element/ValueElement.java index 48206d7b..d38f3972 100644 --- a/src/main/java/org/assertj/db/navigation/element/ValueElement.java +++ b/src/main/java/org/assertj/db/navigation/element/ValueElement.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.navigation.element; diff --git a/src/main/java/org/assertj/db/navigation/element/package-info.java b/src/main/java/org/assertj/db/navigation/element/package-info.java index 24c43c4b..5dd5e8fd 100644 --- a/src/main/java/org/assertj/db/navigation/element/package-info.java +++ b/src/main/java/org/assertj/db/navigation/element/package-info.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ /** * This package contains interfaces about the different elements in assertions or outputs. diff --git a/src/main/java/org/assertj/db/navigation/origin/Origin.java b/src/main/java/org/assertj/db/navigation/origin/Origin.java index 2b5941dc..39c8cf87 100644 --- a/src/main/java/org/assertj/db/navigation/origin/Origin.java +++ b/src/main/java/org/assertj/db/navigation/origin/Origin.java @@ -8,13 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.navigation.origin; /** * Defines a class which is the origin of another. - * + * * @author Régis Pouiller */ public interface Origin { diff --git a/src/main/java/org/assertj/db/navigation/origin/OriginWithChanges.java b/src/main/java/org/assertj/db/navigation/origin/OriginWithChanges.java index b554c28e..f1bbb862 100644 --- a/src/main/java/org/assertj/db/navigation/origin/OriginWithChanges.java +++ b/src/main/java/org/assertj/db/navigation/origin/OriginWithChanges.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.navigation.origin; @@ -21,13 +21,12 @@ * Defines a class which is the {@link Origin} of another * and have {@link org.assertj.db.navigation.element.ChangesElement}. * - * @author Régis Pouiller - * * @param The class of a element of navigation on changes (an sub-class of {@link org.assertj.db.navigation.element.ChangesElement}). - * @param The class of a element of navigation on a change (an sub-class of {@link org.assertj.db.navigation.element.ChangeElement}). + * @param The class of a element of navigation on a change (an sub-class of {@link org.assertj.db.navigation.element.ChangeElement}). + * @author Régis Pouiller */ public interface OriginWithChanges - extends Origin, - ToChanges, - ToChange { + extends Origin, + ToChanges, + ToChange { } diff --git a/src/main/java/org/assertj/db/navigation/origin/OriginWithColumnsAndRows.java b/src/main/java/org/assertj/db/navigation/origin/OriginWithColumnsAndRows.java index 9a6f1a3f..e6f59e05 100644 --- a/src/main/java/org/assertj/db/navigation/origin/OriginWithColumnsAndRows.java +++ b/src/main/java/org/assertj/db/navigation/origin/OriginWithColumnsAndRows.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.navigation.origin; @@ -21,13 +21,12 @@ * Defines a class which is the {@link Origin} of another * and have {@link org.assertj.db.type.Column}s and {@link org.assertj.db.type.Row}s. * - * @author Régis Pouiller - * * @param The class of a element of navigation on column (an sub-class of {@link org.assertj.db.navigation.element.ColumnElement}). * @param The class of a element of navigation on a row (an sub-class of {@link org.assertj.db.navigation.element.RowElement}). + * @author Régis Pouiller */ public interface OriginWithColumnsAndRows - extends Origin, - ToColumn, - ToRow { + extends Origin, + ToColumn, + ToRow { } diff --git a/src/main/java/org/assertj/db/navigation/origin/OriginWithColumnsAndRowsFromChange.java b/src/main/java/org/assertj/db/navigation/origin/OriginWithColumnsAndRowsFromChange.java index e29465c4..477a6027 100644 --- a/src/main/java/org/assertj/db/navigation/origin/OriginWithColumnsAndRowsFromChange.java +++ b/src/main/java/org/assertj/db/navigation/origin/OriginWithColumnsAndRowsFromChange.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.navigation.origin; @@ -24,16 +24,15 @@ * Defines a class which is the {@link Origin} of another * and have {@link org.assertj.db.type.Column}s and {@link org.assertj.db.type.Row}s from a {@link org.assertj.db.type.Change}. * - * @author Régis Pouiller - * * @param The class of a element of navigation on changes (an sub-class of {@link org.assertj.db.navigation.element.ChangesElement}). - * @param The class of a element of navigation on a change (an sub-class of {@link org.assertj.db.navigation.element.ChangeElement}). - * @param The class of a element of navigation on column (an sub-class of {@link org.assertj.db.navigation.element.ColumnElement}). - * @param The class of a element of navigation on a row (an sub-class of {@link org.assertj.db.navigation.element.RowElement}). + * @param The class of a element of navigation on a change (an sub-class of {@link org.assertj.db.navigation.element.ChangeElement}). + * @param The class of a element of navigation on column (an sub-class of {@link org.assertj.db.navigation.element.ColumnElement}). + * @param The class of a element of navigation on a row (an sub-class of {@link org.assertj.db.navigation.element.RowElement}). + * @author Régis Pouiller */ public interface OriginWithColumnsAndRowsFromChange - extends OriginWithChanges, - ToColumn, - ToColumnFromChange, - ToRowFromChange { + extends OriginWithChanges, + ToColumn, + ToColumnFromChange, + ToRowFromChange { } diff --git a/src/main/java/org/assertj/db/navigation/origin/OriginWithValuesFromColumn.java b/src/main/java/org/assertj/db/navigation/origin/OriginWithValuesFromColumn.java index 1396a524..e20c8de6 100644 --- a/src/main/java/org/assertj/db/navigation/origin/OriginWithValuesFromColumn.java +++ b/src/main/java/org/assertj/db/navigation/origin/OriginWithValuesFromColumn.java @@ -8,26 +8,29 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.navigation.origin; import org.assertj.db.navigation.ToValueFromColumn; -import org.assertj.db.navigation.element.*; +import org.assertj.db.navigation.element.ChangeElement; +import org.assertj.db.navigation.element.ChangesElement; +import org.assertj.db.navigation.element.ColumnElement; +import org.assertj.db.navigation.element.RowElement; +import org.assertj.db.navigation.element.ValueElement; /** * Defines a class which is the {@link Origin} of another * and have values from a {@link org.assertj.db.type.Column} of a {@link org.assertj.db.type.Change}. * - * @author Régis Pouiller - * * @param The class of a element of navigation on changes (an sub-class of {@link org.assertj.db.navigation.element.ChangesElement}). - * @param The class of a element of navigation on a change (an sub-class of {@link org.assertj.db.navigation.element.ChangeElement}). - * @param The class of a element of navigation on column (an sub-class of {@link org.assertj.db.navigation.element.ColumnElement}). - * @param The class of a element of navigation on a row (an sub-class of {@link org.assertj.db.navigation.element.RowElement}). - * @param The class of a element of navigation on a value (an sub-class of {@link org.assertj.db.navigation.element.ValueElement}). + * @param The class of a element of navigation on a change (an sub-class of {@link org.assertj.db.navigation.element.ChangeElement}). + * @param The class of a element of navigation on column (an sub-class of {@link org.assertj.db.navigation.element.ColumnElement}). + * @param The class of a element of navigation on a row (an sub-class of {@link org.assertj.db.navigation.element.RowElement}). + * @param The class of a element of navigation on a value (an sub-class of {@link org.assertj.db.navigation.element.ValueElement}). + * @author Régis Pouiller */ public interface OriginWithValuesFromColumn - extends OriginWithColumnsAndRowsFromChange, - ToValueFromColumn { + extends OriginWithColumnsAndRowsFromChange, + ToValueFromColumn { } diff --git a/src/main/java/org/assertj/db/navigation/origin/OriginWithValuesFromRow.java b/src/main/java/org/assertj/db/navigation/origin/OriginWithValuesFromRow.java index d374713c..57c49323 100644 --- a/src/main/java/org/assertj/db/navigation/origin/OriginWithValuesFromRow.java +++ b/src/main/java/org/assertj/db/navigation/origin/OriginWithValuesFromRow.java @@ -8,28 +8,31 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.navigation.origin; import org.assertj.db.navigation.ToValue; import org.assertj.db.navigation.ToValueFromRow; -import org.assertj.db.navigation.element.*; +import org.assertj.db.navigation.element.ChangeElement; +import org.assertj.db.navigation.element.ChangesElement; +import org.assertj.db.navigation.element.ColumnElement; +import org.assertj.db.navigation.element.RowElement; +import org.assertj.db.navigation.element.ValueElement; /** * Defines a class which is the {@link Origin} of another * and have values from a {@link org.assertj.db.type.Row}. * - * @author Régis Pouiller - * * @param The class of a element of navigation on changes (an sub-class of {@link org.assertj.db.navigation.element.ChangesElement}). - * @param The class of a element of navigation on a change (an sub-class of {@link org.assertj.db.navigation.element.ChangeElement}). - * @param The class of a element of navigation on column (an sub-class of {@link org.assertj.db.navigation.element.ColumnElement}). - * @param The class of a element of navigation on a row (an sub-class of {@link org.assertj.db.navigation.element.RowElement}). - * @param The class of a element of navigation on a value (an sub-class of {@link org.assertj.db.navigation.element.ValueElement}). + * @param The class of a element of navigation on a change (an sub-class of {@link org.assertj.db.navigation.element.ChangeElement}). + * @param The class of a element of navigation on column (an sub-class of {@link org.assertj.db.navigation.element.ColumnElement}). + * @param The class of a element of navigation on a row (an sub-class of {@link org.assertj.db.navigation.element.RowElement}). + * @param The class of a element of navigation on a value (an sub-class of {@link org.assertj.db.navigation.element.ValueElement}). + * @author Régis Pouiller */ public interface OriginWithValuesFromRow - extends OriginWithColumnsAndRowsFromChange, - ToValue, - ToValueFromRow { + extends OriginWithColumnsAndRowsFromChange, + ToValue, + ToValueFromRow { } diff --git a/src/main/java/org/assertj/db/navigation/origin/package-info.java b/src/main/java/org/assertj/db/navigation/origin/package-info.java index 3bc267ba..22756eb7 100644 --- a/src/main/java/org/assertj/db/navigation/origin/package-info.java +++ b/src/main/java/org/assertj/db/navigation/origin/package-info.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ /** * This package contains interfaces that defines the different {@link org.assertj.db.navigation.origin.Origin}s used by the navigation. diff --git a/src/main/java/org/assertj/db/navigation/package-info.java b/src/main/java/org/assertj/db/navigation/package-info.java index 02eeb34f..827af00e 100644 --- a/src/main/java/org/assertj/db/navigation/package-info.java +++ b/src/main/java/org/assertj/db/navigation/package-info.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ /** * This package contains interfaces that defines the different navigation methods. diff --git a/src/main/java/org/assertj/db/output/AbstractColumnOutputter.java b/src/main/java/org/assertj/db/output/AbstractColumnOutputter.java index 84570882..88ba9bc1 100644 --- a/src/main/java/org/assertj/db/output/AbstractColumnOutputter.java +++ b/src/main/java/org/assertj/db/output/AbstractColumnOutputter.java @@ -8,10 +8,14 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.output; +import static org.assertj.db.util.Descriptions.getColumnValueDescription; + +import java.util.List; + import org.assertj.db.navigation.Position; import org.assertj.db.navigation.element.ColumnElement; import org.assertj.db.output.impl.Output; @@ -19,25 +23,20 @@ import org.assertj.db.type.Column; import org.assertj.db.type.Value; -import java.util.List; - -import static org.assertj.db.util.Descriptions.getColumnValueDescription; - /** * Base class for all {@link Column}s outputs. * - * @author Régis Pouiller - * - * @param The class of the actual value (an sub-class of {@link AbstractDbData}). - * @param The class of the original assertion (an sub-class of {@link AbstractDbOutputter}). - * @param The class of this assertion (an sub-class of {@link AbstractColumnOutputter}). + * @param The class of the actual value (an sub-class of {@link AbstractDbData}). + * @param The class of the original assertion (an sub-class of {@link AbstractDbOutputter}). + * @param The class of this assertion (an sub-class of {@link AbstractColumnOutputter}). * @param The class of this assertion on the value (an sub-class of {@link AbstractColumnValueOutputter}). - * @param The class of the equivalent row assertion (an sub-class of {@link AbstractRowOutputter}). + * @param The class of the equivalent row assertion (an sub-class of {@link AbstractRowOutputter}). * @param The class of the equivalent row assertion on the value (an sub-class of {@link AbstractRowValueOutputter}). + * @author Régis Pouiller */ public abstract class AbstractColumnOutputter, A extends AbstractDbOutputter, C extends AbstractColumnOutputter, CV extends AbstractColumnValueOutputter, R extends AbstractRowOutputter, RV extends AbstractRowValueOutputter> - extends AbstractSubOutputter - implements ColumnElement { + extends AbstractSubOutputter + implements ColumnElement { /** * Position of navigation to value. @@ -53,32 +52,39 @@ public abstract class AbstractColumnOutputter, A ext * Constructor. * * @param originalDbOutputter The original assert. That could be a {@link RequestOutputter} or a {@link TableOutputter}. - * @param selfType Type of this assertion class : a sub-class of {@code AbstractColumnOutputter}. - * @param valueType Class of the assert on the value : a sub-class of {@code AbstractColumnValueOutputter}. + * @param selfType Type of this assertion class : a sub-class of {@code AbstractColumnOutputter}. + * @param valueType Class of the assert on the value : a sub-class of {@code AbstractColumnValueOutputter}. */ AbstractColumnOutputter(A originalDbOutputter, Class selfType, Class valueType, Column column) { super(originalDbOutputter, selfType); this.column = column; valuePosition = new Position(selfType.cast(this), valueType) { - @Override protected String getDescription(int index) { + @Override + protected String getDescription(int index) { return getValueDescription(index); } }; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override protected String getValueDescription(int index) { return getColumnValueDescription(info, index); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override protected Position getValuePosition() { return valuePosition; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override protected List getValuesList() { return column.getValuesList(); diff --git a/src/main/java/org/assertj/db/output/AbstractColumnValueOutputter.java b/src/main/java/org/assertj/db/output/AbstractColumnValueOutputter.java index 5787c2a3..06b84bdc 100644 --- a/src/main/java/org/assertj/db/output/AbstractColumnValueOutputter.java +++ b/src/main/java/org/assertj/db/output/AbstractColumnValueOutputter.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.output; @@ -19,17 +19,16 @@ /** * Output methods about a value in a {@link Column}. * - * @author Régis Pouiller - * - * @param The class of the actual value (an sub-class of {@link AbstractDbData}). - * @param The class of the original assertion (an sub-class of {@link AbstractDbOutputter}). - * @param The class of this assertion (an sub-class of {@link AbstractColumnOutputter}). + * @param The class of the actual value (an sub-class of {@link AbstractDbData}). + * @param The class of the original assertion (an sub-class of {@link AbstractDbOutputter}). + * @param The class of this assertion (an sub-class of {@link AbstractColumnOutputter}). * @param The class of this assertion on the value (an sub-class of {@link AbstractColumnValueOutputter}). - * @param The class of the equivalent row assertion (an sub-class of {@link AbstractRowOutputter}). + * @param The class of the equivalent row assertion (an sub-class of {@link AbstractRowOutputter}). * @param The class of the equivalent row assertion on the value (an sub-class of {@link AbstractRowValueOutputter}). + * @author Régis Pouiller */ public abstract class AbstractColumnValueOutputter, A extends AbstractDbOutputter, C extends AbstractColumnOutputter, CV extends AbstractColumnValueOutputter, R extends AbstractRowOutputter, RV extends AbstractRowValueOutputter> - extends AbstractValueOutputter { + extends AbstractValueOutputter { /** * Constructor. @@ -50,4 +49,4 @@ public abstract class AbstractColumnValueOutputter, public C returnToColumn() { return returnToOrigin(); } -} \ No newline at end of file +} diff --git a/src/main/java/org/assertj/db/output/AbstractDbOutputter.java b/src/main/java/org/assertj/db/output/AbstractDbOutputter.java index 80fcdd4a..9070f5dc 100644 --- a/src/main/java/org/assertj/db/output/AbstractDbOutputter.java +++ b/src/main/java/org/assertj/db/output/AbstractDbOutputter.java @@ -8,10 +8,15 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.output; +import static org.assertj.db.util.Descriptions.getColumnDescription; +import static org.assertj.db.util.Descriptions.getRowDescription; + +import java.util.List; + import org.assertj.db.navigation.Position; import org.assertj.db.navigation.PositionWithColumns; import org.assertj.db.navigation.origin.OriginWithColumnsAndRows; @@ -20,26 +25,20 @@ import org.assertj.db.type.Column; import org.assertj.db.type.Row; -import java.util.List; - -import static org.assertj.db.util.Descriptions.getColumnDescription; -import static org.assertj.db.util.Descriptions.getRowDescription; - /** * Base class for all data ({@code Table} or {@code Request}) outputs. * - * @author Régis Pouiller - * - * @param The class of the actual value (an sub-class of {@link AbstractDbData}). - * @param The class of the original assert (an sub-class of {@link AbstractDbOutputter}). - * @param The class of this assert (an sub-class of {@link AbstractColumnOutputter}). + * @param The class of the actual value (an sub-class of {@link AbstractDbData}). + * @param The class of the original assert (an sub-class of {@link AbstractDbOutputter}). + * @param The class of this assert (an sub-class of {@link AbstractColumnOutputter}). * @param The class of this assertion on the value (an sub-class of {@link AbstractColumnValueOutputter}). - * @param The class of the equivalent row assert (an sub-class of {@link AbstractRowOutputter}). + * @param The class of the equivalent row assert (an sub-class of {@link AbstractRowOutputter}). * @param The class of the equivalent row assertion on the value (an sub-class of {@link AbstractRowValueOutputter}). + * @author Régis Pouiller */ public abstract class AbstractDbOutputter, A extends AbstractDbOutputter, C extends AbstractColumnOutputter, CV extends AbstractColumnValueOutputter, R extends AbstractRowOutputter, RV extends AbstractRowValueOutputter> - extends AbstractOutputter - implements OriginWithColumnsAndRows { + extends AbstractOutputter + implements OriginWithColumnsAndRows { /** * The actual value on which the assertion is. @@ -58,58 +57,70 @@ public abstract class AbstractDbOutputter, A extends /** * Constructor of the database assertions. * - * @param actualValue The actual value on which the assertion is. - * @param selfType Type of this assertion class. + * @param actualValue The actual value on which the assertion is. + * @param selfType Type of this assertion class. * @param columnAssertType Class of the assertion on the column. - * @param rowAssertType Class of the assertion on the row. + * @param rowAssertType Class of the assertion on the row. */ AbstractDbOutputter(D actualValue, Class selfType, Class columnAssertType, Class rowAssertType) { super(selfType); actual = actualValue; columnPosition = new PositionWithColumns(selfType.cast(this), columnAssertType) { - @Override protected String getDescription(int index) { + @Override + protected String getDescription(int index) { List columnsNameList = actual.getColumnsNameList(); String columnName = columnsNameList.get(index); return getColumnDescription(myself.getInfo(), index, columnName); } }; rowPosition = new Position(selfType.cast(this), rowAssertType) { - @Override protected String getDescription(int index) { + @Override + protected String getDescription(int index) { return getRowDescription(myself.getInfo(), index); } }; withType(OutputType.PLAIN); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public R row() { return rowPosition.getInstance(actual.getRowsList()).withType(outputType); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public R row(int index) { return rowPosition.getInstance(actual.getRowsList(), index).withType(outputType); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public C column() { return columnPosition.getInstance(actual.getColumnsList()).withType(outputType); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public C column(int index) { return columnPosition.getInstance(actual.getColumnsList(), index).withType(outputType); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public C column(String columnName) { return columnPosition.getInstance(actual.getColumnsList(), actual.getColumnsNameList(), - columnName, actual.getColumnLetterCase()) - .withType(outputType); + columnName, actual.getColumnLetterCase()) + .withType(outputType); } } diff --git a/src/main/java/org/assertj/db/output/AbstractOutputter.java b/src/main/java/org/assertj/db/output/AbstractOutputter.java index 8efed0ca..f7310808 100644 --- a/src/main/java/org/assertj/db/output/AbstractOutputter.java +++ b/src/main/java/org/assertj/db/output/AbstractOutputter.java @@ -8,16 +8,19 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.output; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.OutputStream; +import java.io.PrintStream; + import org.assertj.db.exception.AssertJDBException; import org.assertj.db.global.AbstractElement; import org.assertj.db.output.impl.Output; -import java.io.*; - /** * Base class for all output of assertj-db. * @@ -28,7 +31,7 @@ * @since 1.1.0 */ public abstract class AbstractOutputter> - extends AbstractElement { + extends AbstractElement { /** * Type of output. @@ -38,7 +41,7 @@ public abstract class AbstractOutputter> /** * Constructor. * - * @param selfType Class of this assertion class : a sub-class of {@code AbstractOutputter}. + * @param selfType Class of this assertion class : a sub-class of {@code AbstractOutputter}. */ AbstractOutputter(Class selfType) { super(selfType); diff --git a/src/main/java/org/assertj/db/output/AbstractOutputterWithOrigin.java b/src/main/java/org/assertj/db/output/AbstractOutputterWithOrigin.java index 23b3fed8..e88c0400 100644 --- a/src/main/java/org/assertj/db/output/AbstractOutputterWithOrigin.java +++ b/src/main/java/org/assertj/db/output/AbstractOutputterWithOrigin.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.output; @@ -17,15 +17,14 @@ /** * Base class for all outputs with an {@link org.assertj.db.navigation.origin.Origin}. * - * @author Régis Pouiller - * * @param The "self" type of this assertion class. Please read "Emulating 'self types' using Java Generics to simplify fluent API implementation" - * for more details. + * target="_blank">Emulating 'self types' using Java Generics to simplify fluent API implementation" + * for more details. * @param The type of the assertion class of {@link org.assertj.db.navigation.origin.Origin}. + * @author Régis Pouiller */ public abstract class AbstractOutputterWithOrigin, O extends Origin> - extends AbstractOutputter { + extends AbstractOutputter { /** * The assertion of origin. @@ -36,7 +35,7 @@ public abstract class AbstractOutputterWithOrigin selfType, O origin) { super(selfType); diff --git a/src/main/java/org/assertj/db/output/AbstractOutputterWithOriginWithChanges.java b/src/main/java/org/assertj/db/output/AbstractOutputterWithOriginWithChanges.java index 46e9dab7..6fb594bb 100644 --- a/src/main/java/org/assertj/db/output/AbstractOutputterWithOriginWithChanges.java +++ b/src/main/java/org/assertj/db/output/AbstractOutputterWithOriginWithChanges.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.output; @@ -27,15 +27,15 @@ * @author Régis Pouiller */ public abstract class AbstractOutputterWithOriginWithChanges, O extends OriginWithChanges> - extends AbstractOutputterWithOrigin - implements ToChanges, - ToChange { + extends AbstractOutputterWithOrigin + implements ToChanges, + ToChange { /** * Constructor. * * @param selfType Type of this output class : a sub-class of {@code AbstractOutputterWithOriginWithChanges}. - * @param origin The output of {@link org.assertj.db.navigation.origin.Origin}. + * @param origin The output of {@link org.assertj.db.navigation.origin.Origin}. */ AbstractOutputterWithOriginWithChanges(Class selfType, O origin) { super(selfType, origin); diff --git a/src/main/java/org/assertj/db/output/AbstractOutputterWithOriginWithColumnsAndRows.java b/src/main/java/org/assertj/db/output/AbstractOutputterWithOriginWithColumnsAndRows.java index 97b997ea..0653fb30 100644 --- a/src/main/java/org/assertj/db/output/AbstractOutputterWithOriginWithColumnsAndRows.java +++ b/src/main/java/org/assertj/db/output/AbstractOutputterWithOriginWithColumnsAndRows.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.output; @@ -34,15 +34,15 @@ * @author Régis Pouiller */ public abstract class AbstractOutputterWithOriginWithColumnsAndRows, O extends OriginWithColumnsAndRows, D extends AbstractDbData, A extends AbstractDbOutputter, C extends AbstractColumnOutputter, CV extends AbstractColumnValueOutputter, R extends AbstractRowOutputter, RV extends AbstractRowValueOutputter> - extends AbstractOutputterWithOrigin - implements ToColumn, - ToRow { + extends AbstractOutputterWithOrigin + implements ToColumn, + ToRow { /** * Constructor. * * @param selfType Type of this assertion class : a sub-class of {@code AbstractOutputterWithOriginWithColumnsAndRows}. - * @param origin The assertion of {@link org.assertj.db.navigation.origin.Origin}. + * @param origin The assertion of {@link org.assertj.db.navigation.origin.Origin}. */ AbstractOutputterWithOriginWithColumnsAndRows(Class selfType, O origin) { super(selfType, origin); diff --git a/src/main/java/org/assertj/db/output/AbstractOutputterWithOriginWithColumnsAndRowsFromChange.java b/src/main/java/org/assertj/db/output/AbstractOutputterWithOriginWithColumnsAndRowsFromChange.java index 07a40f38..c899e801 100644 --- a/src/main/java/org/assertj/db/output/AbstractOutputterWithOriginWithColumnsAndRowsFromChange.java +++ b/src/main/java/org/assertj/db/output/AbstractOutputterWithOriginWithColumnsAndRowsFromChange.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.output; @@ -28,16 +28,16 @@ * @author Régis Pouiller */ public abstract class AbstractOutputterWithOriginWithColumnsAndRowsFromChange, O extends OriginWithColumnsAndRowsFromChange> - extends AbstractOutputterWithOriginWithChanges - implements ToColumn, - ToColumnFromChange, - ToRowFromChange { + extends AbstractOutputterWithOriginWithChanges + implements ToColumn, + ToColumnFromChange, + ToRowFromChange { /** * Constructor. * * @param selfType Type of this output class : a sub-class of {@code AbstractOutputterWithOriginWithColumnsAndRowsFromChange}. - * @param origin The output of {@link org.assertj.db.navigation.origin.Origin}. + * @param origin The output of {@link org.assertj.db.navigation.origin.Origin}. */ AbstractOutputterWithOriginWithColumnsAndRowsFromChange(Class selfType, O origin) { super(selfType, origin); @@ -59,37 +59,49 @@ public ChangeRowOutputter rowAtEndPoint() { return origin.rowAtEndPoint(); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ChangeColumnOutputter column() { return origin.column(); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ChangeColumnOutputter column(int index) { return origin.column(index); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ChangeColumnOutputter column(String columnName) { return origin.column(columnName); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ChangeColumnOutputter columnAmongTheModifiedOnes() { return origin.columnAmongTheModifiedOnes(); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ChangeColumnOutputter columnAmongTheModifiedOnes(int index) { return origin.columnAmongTheModifiedOnes(index); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ChangeColumnOutputter columnAmongTheModifiedOnes(String columnName) { return origin.columnAmongTheModifiedOnes(columnName); diff --git a/src/main/java/org/assertj/db/output/AbstractOutputterWithValues.java b/src/main/java/org/assertj/db/output/AbstractOutputterWithValues.java index b097d4b7..d6e6996f 100644 --- a/src/main/java/org/assertj/db/output/AbstractOutputterWithValues.java +++ b/src/main/java/org/assertj/db/output/AbstractOutputterWithValues.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.output; @@ -26,8 +26,8 @@ * @author Régis Pouiller */ public abstract class AbstractOutputterWithValues, O extends OriginWithColumnsAndRowsFromChange> - extends AbstractOutputterWithOriginWithColumnsAndRowsFromChange - implements ValueElement { + extends AbstractOutputterWithOriginWithColumnsAndRowsFromChange + implements ValueElement { /** * The actual value on which the assertion is. */ @@ -37,8 +37,8 @@ public abstract class AbstractOutputterWithValues selfType, O origin, Value value) { super(selfType, origin); diff --git a/src/main/java/org/assertj/db/output/AbstractRowOutputter.java b/src/main/java/org/assertj/db/output/AbstractRowOutputter.java index 9367ff25..c033568d 100644 --- a/src/main/java/org/assertj/db/output/AbstractRowOutputter.java +++ b/src/main/java/org/assertj/db/output/AbstractRowOutputter.java @@ -8,10 +8,14 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.output; +import static org.assertj.db.util.Descriptions.getRowValueDescription; + +import java.util.List; + import org.assertj.db.navigation.Position; import org.assertj.db.navigation.PositionWithColumns; import org.assertj.db.navigation.ToValueFromRow; @@ -21,27 +25,22 @@ import org.assertj.db.type.Row; import org.assertj.db.type.Value; -import java.util.List; - -import static org.assertj.db.util.Descriptions.getRowValueDescription; - /** * Base class for all {@link Row}s outputs. * - * @author Régis Pouiller - * - * @param The class of the actual value (an sub-class of {@link AbstractDbData}). - * @param The class of the original assertion (an sub-class of {@link AbstractDbOutputter}). - * @param The class of the equivalent column assertion (an sub-class of {@link AbstractColumnOutputter}). + * @param The class of the actual value (an sub-class of {@link AbstractDbData}). + * @param The class of the original assertion (an sub-class of {@link AbstractDbOutputter}). + * @param The class of the equivalent column assertion (an sub-class of {@link AbstractColumnOutputter}). * @param The class of the equivalent column assertion on the value (an sub-class of {@link AbstractColumnValueOutputter} - * ). - * @param The class of this assertion (an sub-class of {@link AbstractRowOutputter}). + * ). + * @param The class of this assertion (an sub-class of {@link AbstractRowOutputter}). * @param The class of this assertion on the value (an sub-class of {@link AbstractRowValueOutputter}). + * @author Régis Pouiller */ public abstract class AbstractRowOutputter, A extends AbstractDbOutputter, C extends AbstractColumnOutputter, CV extends AbstractColumnValueOutputter, R extends AbstractRowOutputter, RV extends AbstractRowValueOutputter> - extends AbstractSubOutputter - implements RowElement, - ToValueFromRow { + extends AbstractSubOutputter + implements RowElement, + ToValueFromRow { /** * Position of navigation to value. @@ -57,20 +56,23 @@ public abstract class AbstractRowOutputter, A extend * Constructor. * * @param originalDbOutputter The original assert. That could be a {@link RequestOutputter} or a {@link TableOutputter}. - * @param selfType Type of this assertion class : a sub-class of {@code AbstractRowOutputter}. - * @param valueType Class of the assert on the value : a sub-class of {@code AbstractRowValueOutputter}. + * @param selfType Type of this assertion class : a sub-class of {@code AbstractRowOutputter}. + * @param valueType Class of the assert on the value : a sub-class of {@code AbstractRowValueOutputter}. */ AbstractRowOutputter(A originalDbOutputter, Class selfType, Class valueType, Row row) { super(originalDbOutputter, selfType); this.row = row; valuePosition = new PositionWithColumns(selfType.cast(this), valueType) { - @Override protected String getDescription(int index) { + @Override + protected String getDescription(int index) { return getValueDescription(index); } }; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override protected String getValueDescription(int index) { List columnsNameList = row.getColumnsNameList(); @@ -78,23 +80,29 @@ protected String getValueDescription(int index) { return getRowValueDescription(info, index, columnName); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override protected Position getValuePosition() { return valuePosition; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override protected List getValuesList() { return row.getValuesList(); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public RV value(String columnName) { return valuePosition.getInstance(getValuesList(), row.getColumnsNameList(), columnName, row.getColumnLetterCase()) - .withType(outputType); + .withType(outputType); } /** diff --git a/src/main/java/org/assertj/db/output/AbstractRowValueOutputter.java b/src/main/java/org/assertj/db/output/AbstractRowValueOutputter.java index 12ef91bc..851c5e52 100644 --- a/src/main/java/org/assertj/db/output/AbstractRowValueOutputter.java +++ b/src/main/java/org/assertj/db/output/AbstractRowValueOutputter.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.output; @@ -20,32 +20,33 @@ /** * Output methods about a value in a {@link Row}. * - * @author Régis Pouiller - * - * @param The class of the actual value (an sub-class of {@link AbstractDbData}). - * @param The class of the original assertion (an sub-class of {@link AbstractDbOutputter}). - * @param The class of the equivalent row assertion (an sub-class of {@link AbstractColumnOutputter}). + * @param The class of the actual value (an sub-class of {@link AbstractDbData}). + * @param The class of the original assertion (an sub-class of {@link AbstractDbOutputter}). + * @param The class of the equivalent row assertion (an sub-class of {@link AbstractColumnOutputter}). * @param The class of the equivalent row assertion on the value (an sub-class of {@link AbstractColumnValueOutputter} - * ). - * @param The class of this assertion (an sub-class of {@link AbstractRowOutputter}). + * ). + * @param The class of this assertion (an sub-class of {@link AbstractRowOutputter}). * @param The class of this assertion on the value (an sub-class of {@link AbstractRowValueOutputter}). + * @author Régis Pouiller */ public abstract class AbstractRowValueOutputter, A extends AbstractDbOutputter, C extends AbstractColumnOutputter, CV extends AbstractColumnValueOutputter, R extends AbstractRowOutputter, RV extends AbstractRowValueOutputter> - extends AbstractValueOutputter - implements ToValueFromRow { + extends AbstractValueOutputter + implements ToValueFromRow { /** * Constructor. * - * @param selfType Type of this assertion class : a sub-class of {@code AbstractValueOutputter}. - * @param origin The assertion of {@link org.assertj.db.navigation.origin.Origin}. + * @param selfType Type of this assertion class : a sub-class of {@code AbstractValueOutputter}. + * @param origin The assertion of {@link org.assertj.db.navigation.origin.Origin}. * @param actualValue The value on which are the assertion methods. */ AbstractRowValueOutputter(Class selfType, R origin, Value actualValue) { super(selfType, origin, actualValue); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public RV value(String columnName) { return returnToOrigin().value(columnName); diff --git a/src/main/java/org/assertj/db/output/AbstractSubOutputter.java b/src/main/java/org/assertj/db/output/AbstractSubOutputter.java index 61fc6677..d3bbab86 100644 --- a/src/main/java/org/assertj/db/output/AbstractSubOutputter.java +++ b/src/main/java/org/assertj/db/output/AbstractSubOutputter.java @@ -8,10 +8,12 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.output; +import java.util.List; + import org.assertj.db.api.RequestAssert; import org.assertj.db.api.TableAssert; import org.assertj.db.navigation.Position; @@ -22,32 +24,29 @@ import org.assertj.db.type.Row; import org.assertj.db.type.Value; -import java.util.List; - /** * Output methods about {@link Column} or {@link Row}. * - * @author Régis Pouiller - * - * @param The class of the actual value (an sub-class of {@link AbstractDbData}). - * @param The class of the original assertion (an sub-class of {@link AbstractDbOutputter}). - * @param The class of this assertion (an sub-class of {@link AbstractSubOutputter}). - * @param The class of this assertion on the value (an sub-class of {@link AbstractValueOutputter}). - * @param The class of this assertion (an sub-class of {@link AbstractColumnOutputter}). + * @param The class of the actual value (an sub-class of {@link AbstractDbData}). + * @param The class of the original assertion (an sub-class of {@link AbstractDbOutputter}). + * @param The class of this assertion (an sub-class of {@link AbstractSubOutputter}). + * @param The class of this assertion on the value (an sub-class of {@link AbstractValueOutputter}). + * @param The class of this assertion (an sub-class of {@link AbstractColumnOutputter}). * @param The class of this assertion on the value (an sub-class of {@link AbstractColumnValueOutputter}). - * @param The class of the equivalent row assertion (an sub-class of {@link AbstractRowOutputter}). + * @param The class of the equivalent row assertion (an sub-class of {@link AbstractRowOutputter}). * @param The class of the equivalent row assertion on the value (an sub-class of {@link AbstractRowValueOutputter}). + * @author Régis Pouiller */ public abstract class AbstractSubOutputter, A extends AbstractDbOutputter, S extends AbstractSubOutputter, V extends AbstractValueOutputter, C extends AbstractColumnOutputter, CV extends AbstractColumnValueOutputter, R extends AbstractRowOutputter, RV extends AbstractRowValueOutputter> - extends AbstractOutputterWithOriginWithColumnsAndRows - implements OriginWithColumnsAndRows, - ToValue { + extends AbstractOutputterWithOriginWithColumnsAndRows + implements OriginWithColumnsAndRows, + ToValue { /** * Constructor. * * @param originalDbAssert The original assert. That could be a {@link RequestAssert} or a {@link TableAssert}. - * @param selfType Type of this assertion class : a sub-class of {@code AbstractSubAssert}. + * @param selfType Type of this assertion class : a sub-class of {@code AbstractSubAssert}. */ AbstractSubOutputter(A originalDbAssert, Class selfType) { super(selfType, originalDbAssert); @@ -55,18 +54,23 @@ public abstract class AbstractSubOutputter, A extend /** * Returns the value description. + * * @param index The index of the value. * @return The description. */ protected abstract String getValueDescription(int index); - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V value() { return getValuePosition().getInstance(getValuesList()).withType(outputType); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V value(int index) { return getValuePosition().getInstance(getValuesList(), index).withType(outputType); @@ -74,6 +78,7 @@ public V value(int index) { /** * Returns the position of navigation to value. + * * @return The position of navigation to value. */ protected abstract Position getValuePosition(); diff --git a/src/main/java/org/assertj/db/output/AbstractValueOutputter.java b/src/main/java/org/assertj/db/output/AbstractValueOutputter.java index dea75146..3d9ca134 100644 --- a/src/main/java/org/assertj/db/output/AbstractValueOutputter.java +++ b/src/main/java/org/assertj/db/output/AbstractValueOutputter.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.output; @@ -23,22 +23,21 @@ /** * Base class for all values outputs. * - * @author Régis Pouiller - * - * @param The class of the actual value (an sub-class of {@link AbstractDbData}). - * @param The class of the original assertion (an sub-class of {@link AbstractDbOutputter}). - * @param The class of which contains assertion methods about {@link Column} or {@link Row} (an sub-class of - * {@link AbstractSubOutputter}). - * @param The class of this assertion (an sub-class of {@link AbstractValueOutputter}). - * @param The class of this assertion (an sub-class of {@link AbstractColumnOutputter}). + * @param The class of the actual value (an sub-class of {@link AbstractDbData}). + * @param The class of the original assertion (an sub-class of {@link AbstractDbOutputter}). + * @param The class of which contains assertion methods about {@link Column} or {@link Row} (an sub-class of + * {@link AbstractSubOutputter}). + * @param The class of this assertion (an sub-class of {@link AbstractValueOutputter}). + * @param The class of this assertion (an sub-class of {@link AbstractColumnOutputter}). * @param The class of this assertion on the value (an sub-class of {@link AbstractColumnValueOutputter}). - * @param The class of the equivalent row assertion (an sub-class of {@link AbstractRowOutputter}). + * @param The class of the equivalent row assertion (an sub-class of {@link AbstractRowOutputter}). * @param The class of the equivalent row assertion on the value (an sub-class of {@link AbstractRowValueOutputter}). + * @author Régis Pouiller */ public abstract class AbstractValueOutputter, A extends AbstractDbOutputter, S extends AbstractSubOutputter, V extends AbstractValueOutputter, C extends AbstractColumnOutputter, CV extends AbstractColumnValueOutputter, R extends AbstractRowOutputter, RV extends AbstractRowValueOutputter> - extends AbstractOutputterWithOriginWithColumnsAndRows - implements ValueElement, - ToValue { + extends AbstractOutputterWithOriginWithColumnsAndRows + implements ValueElement, + ToValue { /** * The actual value on which this assertion is. @@ -47,22 +46,27 @@ public abstract class AbstractValueOutputter, A exte /** * Constructor. + * * @param selfType Type of this assertion class : a sub-class of {@code AbstractValueOutputter}. - * @param origin The assertion of {@link org.assertj.db.navigation.origin.Origin}. - * @param value The value on which are the assertion methods. + * @param origin The assertion of {@link org.assertj.db.navigation.origin.Origin}. + * @param value The value on which are the assertion methods. */ AbstractValueOutputter(Class selfType, S origin, Value value) { super(selfType, origin); this.value = value; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V value() { return returnToOrigin().value(); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public V value(int index) { return returnToOrigin().value(index); @@ -75,4 +79,4 @@ public V value(int index) { protected String getOutput(Output outputType) { return outputType.getValueOutput(info, value); } -} \ No newline at end of file +} diff --git a/src/main/java/org/assertj/db/output/ChangeColumnOutputter.java b/src/main/java/org/assertj/db/output/ChangeColumnOutputter.java index 38051665..6b432cb5 100644 --- a/src/main/java/org/assertj/db/output/ChangeColumnOutputter.java +++ b/src/main/java/org/assertj/db/output/ChangeColumnOutputter.java @@ -8,28 +8,28 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.output; +import static org.assertj.db.util.Descriptions.getColumnValueAtEndPointDescription; +import static org.assertj.db.util.Descriptions.getColumnValueAtStartPointDescription; + import org.assertj.db.navigation.PositionWithPoints; import org.assertj.db.navigation.element.ColumnElement; import org.assertj.db.navigation.origin.OriginWithValuesFromColumn; import org.assertj.db.output.impl.Output; import org.assertj.db.type.Value; -import static org.assertj.db.util.Descriptions.getColumnValueAtEndPointDescription; -import static org.assertj.db.util.Descriptions.getColumnValueAtStartPointDescription; - /** * Output methods for a {@code Column} of a {@code Change}. * * @author Régis Pouiller */ public class ChangeColumnOutputter - extends AbstractOutputterWithOriginWithColumnsAndRowsFromChange - implements ColumnElement, - OriginWithValuesFromColumn { + extends AbstractOutputterWithOriginWithColumnsAndRowsFromChange + implements ColumnElement, + OriginWithValuesFromColumn { /** * The name of the column. @@ -53,10 +53,10 @@ public class ChangeColumnOutputter /** * Constructor. * - * @param columnName The column name. - * @param origin The output of {@link org.assertj.db.navigation.origin.Origin}. + * @param columnName The column name. + * @param origin The output of {@link org.assertj.db.navigation.origin.Origin}. * @param valueAtStartPoint The value at start point. - * @param valueAtEndPoint The value at end point. + * @param valueAtEndPoint The value at end point. */ public ChangeColumnOutputter(ChangeOutputter origin, String columnName, Value valueAtStartPoint, Value valueAtEndPoint) { @@ -66,23 +66,29 @@ public ChangeColumnOutputter(ChangeOutputter origin, String columnName, Value va this.valueAtEndPoint = valueAtEndPoint; valuePosition = new PositionWithPoints(this, ChangeColumnValueOutputter.class, Value.class, valueAtStartPoint, valueAtEndPoint) { - @Override protected String getDescriptionAtStartPoint() { + @Override + protected String getDescriptionAtStartPoint() { return getColumnValueAtStartPointDescription(info); } - @Override protected String getDescriptionAtEndPoint() { + @Override + protected String getDescriptionAtEndPoint() { return getColumnValueAtEndPointDescription(info); } }; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ChangeColumnValueOutputter valueAtStartPoint() { return valuePosition.getInstanceAtStartPoint().withType(outputType); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ChangeColumnValueOutputter valueAtEndPoint() { return valuePosition.getInstanceAtEndPoint().withType(outputType); diff --git a/src/main/java/org/assertj/db/output/ChangeColumnValueOutputter.java b/src/main/java/org/assertj/db/output/ChangeColumnValueOutputter.java index 2218ee0d..fa630883 100644 --- a/src/main/java/org/assertj/db/output/ChangeColumnValueOutputter.java +++ b/src/main/java/org/assertj/db/output/ChangeColumnValueOutputter.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.output; @@ -20,29 +20,32 @@ * Output methods for a value of a {@code Column} of a {@code Change}. * * @author Régis Pouiller - * */ public class ChangeColumnValueOutputter - extends AbstractOutputterWithValues - implements ToValueFromColumn { + extends AbstractOutputterWithValues + implements ToValueFromColumn { /** * Constructor. * * @param origin The output of {@link org.assertj.db.navigation.origin.Origin}. - * @param value The value on which are the displays. + * @param value The value on which are the displays. */ public ChangeColumnValueOutputter(ChangeColumnOutputter origin, Value value) { super(ChangeColumnValueOutputter.class, origin, value); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ChangeColumnValueOutputter valueAtStartPoint() { return origin.valueAtStartPoint(); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ChangeColumnValueOutputter valueAtEndPoint() { return origin.valueAtEndPoint(); diff --git a/src/main/java/org/assertj/db/output/ChangeOutputter.java b/src/main/java/org/assertj/db/output/ChangeOutputter.java index 4759a3a1..c340cd8d 100644 --- a/src/main/java/org/assertj/db/output/ChangeOutputter.java +++ b/src/main/java/org/assertj/db/output/ChangeOutputter.java @@ -8,10 +8,14 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.output; +import static org.assertj.db.util.Descriptions.getColumnDescription; +import static org.assertj.db.util.Descriptions.getRowAtEndPointDescription; +import static org.assertj.db.util.Descriptions.getRowAtStartPointDescription; + import org.assertj.db.navigation.PositionWithColumnsChange; import org.assertj.db.navigation.PositionWithPoints; import org.assertj.db.navigation.element.ChangeElement; @@ -21,17 +25,15 @@ import org.assertj.db.type.Row; import org.assertj.db.util.Changes; -import static org.assertj.db.util.Descriptions.*; - /** * Output methods for a {@link Change}. * * @author Régis Pouiller */ public class ChangeOutputter - extends AbstractOutputterWithOriginWithChanges - implements ChangeElement, - OriginWithColumnsAndRowsFromChange { + extends AbstractOutputterWithOriginWithChanges + implements ChangeElement, + OriginWithColumnsAndRowsFromChange { /** * The actual change on which the output is. @@ -59,70 +61,89 @@ public ChangeOutputter(ChangesOutputter origin, Change change) { this.change = change; rowPosition = new PositionWithPoints(this, ChangeRowOutputter.class, Row.class, change.getRowAtStartPoint(), change.getRowAtEndPoint()) { - @Override protected String getDescriptionAtStartPoint() { + @Override + protected String getDescriptionAtStartPoint() { return getRowAtStartPointDescription(info); } - @Override protected String getDescriptionAtEndPoint() { + @Override + protected String getDescriptionAtEndPoint() { return getRowAtEndPointDescription(info); } }; - columnPosition = new PositionWithColumnsChange(this, ChangeColumnOutputter.class){ + columnPosition = new PositionWithColumnsChange(this, ChangeColumnOutputter.class) { - @Override protected String getDescription(int index, String columnName) { + @Override + protected String getDescription(int index, String columnName) { return getColumnDescription(info, index, columnName); } }; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ChangeRowOutputter rowAtStartPoint() { return rowPosition.getInstanceAtStartPoint().withType(outputType); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ChangeRowOutputter rowAtEndPoint() { return rowPosition.getInstanceAtEndPoint().withType(outputType); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ChangeColumnOutputter column() { return columnPosition.getChangeColumnInstance(change).withType(outputType); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ChangeColumnOutputter column(int index) { return columnPosition.getChangeColumnInstance(change, index).withType(outputType); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ChangeColumnOutputter column(String columnName) { return columnPosition.getChangeColumnInstance(change, columnName, change.getColumnLetterCase()).withType( - outputType); + outputType); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ChangeColumnOutputter columnAmongTheModifiedOnes() { return columnPosition.getModifiedChangeColumnInstance(change).withType(outputType); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ChangeColumnOutputter columnAmongTheModifiedOnes(int index) { return columnPosition.getModifiedChangeColumnInstance(change, index).withType(outputType); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ChangeColumnOutputter columnAmongTheModifiedOnes(String columnName) { return columnPosition.getModifiedChangeColumnInstance(change, columnName, change.getColumnLetterCase()).withType( - outputType); + outputType); } /** diff --git a/src/main/java/org/assertj/db/output/ChangeRowOutputter.java b/src/main/java/org/assertj/db/output/ChangeRowOutputter.java index e2a75234..5f2b699a 100644 --- a/src/main/java/org/assertj/db/output/ChangeRowOutputter.java +++ b/src/main/java/org/assertj/db/output/ChangeRowOutputter.java @@ -8,10 +8,14 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.output; +import static org.assertj.db.util.Descriptions.getRowValueDescription; + +import java.util.List; + import org.assertj.db.exception.AssertJDBException; import org.assertj.db.navigation.PositionWithColumns; import org.assertj.db.navigation.element.RowElement; @@ -20,19 +24,15 @@ import org.assertj.db.type.Row; import org.assertj.db.type.Value; -import java.util.List; - -import static org.assertj.db.util.Descriptions.getRowValueDescription; - /** * Output methods for a {@code Row} of a {@code Change}. * * @author Régis Pouiller */ public class ChangeRowOutputter - extends AbstractOutputterWithOriginWithColumnsAndRowsFromChange - implements RowElement, - OriginWithValuesFromRow { + extends AbstractOutputterWithOriginWithColumnsAndRowsFromChange + implements RowElement, + OriginWithValuesFromRow { /** * Position of navigation to value. @@ -48,13 +48,14 @@ public class ChangeRowOutputter * Constructor. * * @param origin The output of {@link org.assertj.db.navigation.origin.Origin}. - * @param row The {@link Row} on which are the displays. + * @param row The {@link Row} on which are the displays. */ public ChangeRowOutputter(ChangeOutputter origin, Row row) { super(ChangeRowOutputter.class, origin); this.row = row; valuePosition = new PositionWithColumns(this, ChangeRowValueOutputter.class) { - @Override protected String getDescription(int index) { + @Override + protected String getDescription(int index) { List columnsNameList = ChangeRowOutputter.this.row.getColumnsNameList(); String columnName = columnsNameList.get(index); return getRowValueDescription(info, index, columnName); @@ -62,7 +63,9 @@ public ChangeRowOutputter(ChangeOutputter origin, Row row) { }; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ChangeRowValueOutputter value() { if (row == null) { @@ -71,7 +74,9 @@ public ChangeRowValueOutputter value() { return valuePosition.getInstance(row.getValuesList()).withType(outputType); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ChangeRowValueOutputter value(int index) { if (row == null) { @@ -80,14 +85,16 @@ public ChangeRowValueOutputter value(int index) { return valuePosition.getInstance(row.getValuesList(), index).withType(outputType); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ChangeRowValueOutputter value(String columnName) { if (row == null) { throw new AssertJDBException("Row do not exist"); } return valuePosition.getInstance(row.getValuesList(), row.getColumnsNameList(), - columnName, row.getColumnLetterCase()).withType(outputType); + columnName, row.getColumnLetterCase()).withType(outputType); } /** @@ -106,4 +113,4 @@ public ChangeOutputter returnToChange() { protected String getOutput(Output outputType) { return outputType.getRowOutput(info, row); } -} \ No newline at end of file +} diff --git a/src/main/java/org/assertj/db/output/ChangeRowValueOutputter.java b/src/main/java/org/assertj/db/output/ChangeRowValueOutputter.java index f5f4bc09..919b4590 100644 --- a/src/main/java/org/assertj/db/output/ChangeRowValueOutputter.java +++ b/src/main/java/org/assertj/db/output/ChangeRowValueOutputter.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.output; @@ -21,36 +21,41 @@ * Output methods for a value of a {@code Row} of a {@code Change}. * * @author Régis Pouiller - * */ public class ChangeRowValueOutputter - extends AbstractOutputterWithValues - implements ToValue, - ToValueFromRow { + extends AbstractOutputterWithValues + implements ToValue, + ToValueFromRow { /** * Constructor. * * @param origin The output of {@link org.assertj.db.navigation.origin.Origin}. - * @param value The value on which are the displays. + * @param value The value on which are the displays. */ public ChangeRowValueOutputter(ChangeRowOutputter origin, Value value) { super(ChangeRowValueOutputter.class, origin, value); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ChangeRowValueOutputter value() { return origin.value(); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ChangeRowValueOutputter value(int index) { return origin.value(index); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ChangeRowValueOutputter value(String columnName) { return origin.value(columnName); @@ -72,4 +77,4 @@ public ChangeRowOutputter returnToRow() { protected String getOutput(Output outputType) { return outputType.getValueOutput(info, value); } -} \ No newline at end of file +} diff --git a/src/main/java/org/assertj/db/output/ChangesOutputter.java b/src/main/java/org/assertj/db/output/ChangesOutputter.java index b16842d6..845df15b 100644 --- a/src/main/java/org/assertj/db/output/ChangesOutputter.java +++ b/src/main/java/org/assertj/db/output/ChangesOutputter.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.output; @@ -28,9 +28,9 @@ * @author Régis Pouiller */ public class ChangesOutputter - extends AbstractOutputterWithOrigin - implements ChangesElement, - OriginWithChanges { + extends AbstractOutputterWithOrigin + implements ChangesElement, + OriginWithChanges { /** * The actual changes on which the output is. @@ -54,14 +54,14 @@ public class ChangesOutputter /** * Constructor. * - * @param origin The output of {@link org.assertj.db.navigation.origin.Origin}. + * @param origin The output of {@link org.assertj.db.navigation.origin.Origin}. * @param changes The {@link Changes} on which are the displays. */ public ChangesOutputter(ChangesOutputter origin, Changes changes) { super(ChangesOutputter.class, origin); this.changes = changes; - changesPosition = new PositionWithChanges(this, - ChangesOutputter.class, ChangeOutputter.class) { + changesPosition = new PositionWithChanges(this, + ChangesOutputter.class, ChangeOutputter.class) { @Override protected String getChangesDescription(ChangeType changeType, String tableName) { return Descriptions.getChangesDescription(info, changeType, tableName); @@ -77,7 +77,9 @@ protected String getChangeDescription(Changes changes, Change change, int index, withType(OutputType.PLAIN); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ChangesOutputter ofAll() { if (origin != null) { @@ -86,7 +88,9 @@ public ChangesOutputter ofAll() { return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ChangesOutputter ofCreation() { if (origin != null) { @@ -95,7 +99,9 @@ public ChangesOutputter ofCreation() { return changesPosition.getChangesInstance(changes, ChangeType.CREATION, null).withType(outputType); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ChangesOutputter ofModification() { if (origin != null) { @@ -104,7 +110,9 @@ public ChangesOutputter ofModification() { return changesPosition.getChangesInstance(changes, ChangeType.MODIFICATION, null).withType(outputType); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ChangesOutputter ofDeletion() { if (origin != null) { @@ -113,7 +121,9 @@ public ChangesOutputter ofDeletion() { return changesPosition.getChangesInstance(changes, ChangeType.DELETION, null).withType(outputType); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ChangesOutputter ofCreationOnTable(String tableName) { if (origin != null) { @@ -122,7 +132,9 @@ public ChangesOutputter ofCreationOnTable(String tableName) { return changesPosition.getChangesInstance(changes, ChangeType.CREATION, tableName).withType(outputType); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ChangesOutputter ofModificationOnTable(String tableName) { if (origin != null) { @@ -131,7 +143,9 @@ public ChangesOutputter ofModificationOnTable(String tableName) { return changesPosition.getChangesInstance(changes, ChangeType.MODIFICATION, tableName).withType(outputType); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ChangesOutputter ofDeletionOnTable(String tableName) { if (origin != null) { @@ -140,7 +154,9 @@ public ChangesOutputter ofDeletionOnTable(String tableName) { return changesPosition.getChangesInstance(changes, ChangeType.DELETION, tableName).withType(outputType); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ChangesOutputter onTable(String tableName) { if (origin != null) { @@ -149,19 +165,25 @@ public ChangesOutputter onTable(String tableName) { return changesPosition.getChangesInstance(changes, null, tableName).withType(outputType); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ChangeOutputter change() { return changesPosition.getChangeInstance(changes, null, null).withType(outputType); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ChangeOutputter change(int index) { return changesPosition.getChangeInstance(changes, null, null, index).withType(outputType); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ChangeOutputter changeOfCreation() { if (origin != null) { @@ -170,7 +192,9 @@ public ChangeOutputter changeOfCreation() { return changesPosition.getChangeInstance(changes, ChangeType.CREATION, null).withType(outputType); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ChangeOutputter changeOfCreation(int index) { if (origin != null) { @@ -179,7 +203,9 @@ public ChangeOutputter changeOfCreation(int index) { return changesPosition.getChangeInstance(changes, ChangeType.CREATION, null, index).withType(outputType); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ChangeOutputter changeOfModification() { if (origin != null) { @@ -188,7 +214,9 @@ public ChangeOutputter changeOfModification() { return changesPosition.getChangeInstance(changes, ChangeType.MODIFICATION, null).withType(outputType); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ChangeOutputter changeOfModification(int index) { if (origin != null) { @@ -197,7 +225,9 @@ public ChangeOutputter changeOfModification(int index) { return changesPosition.getChangeInstance(changes, ChangeType.MODIFICATION, null, index).withType(outputType); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ChangeOutputter changeOfDeletion() { if (origin != null) { @@ -206,7 +236,9 @@ public ChangeOutputter changeOfDeletion() { return changesPosition.getChangeInstance(changes, ChangeType.DELETION, null).withType(outputType); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ChangeOutputter changeOfDeletion(int index) { if (origin != null) { @@ -215,7 +247,9 @@ public ChangeOutputter changeOfDeletion(int index) { return changesPosition.getChangeInstance(changes, ChangeType.DELETION, null, index).withType(outputType); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ChangeOutputter changeOnTable(String tableName) { if (origin != null) { @@ -224,7 +258,9 @@ public ChangeOutputter changeOnTable(String tableName) { return changesPosition.getChangeInstance(changes, null, tableName).withType(outputType); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ChangeOutputter changeOnTable(String tableName, int index) { if (origin != null) { @@ -233,7 +269,9 @@ public ChangeOutputter changeOnTable(String tableName, int index) { return changesPosition.getChangeInstance(changes, null, tableName, index).withType(outputType); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ChangeOutputter changeOnTableWithPks(String tableName, Object... pksValues) { if (origin != null) { @@ -242,7 +280,9 @@ public ChangeOutputter changeOnTableWithPks(String tableName, Object... pksValue return changesPosition.getChangeInstanceWithPK(changes, tableName, pksValues).withType(outputType); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ChangeOutputter changeOfCreationOnTable(String tableName) { if (origin != null) { @@ -251,7 +291,9 @@ public ChangeOutputter changeOfCreationOnTable(String tableName) { return changesPosition.getChangeInstance(changes, ChangeType.CREATION, tableName).withType(outputType); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ChangeOutputter changeOfCreationOnTable(String tableName, int index) { if (origin != null) { @@ -260,7 +302,9 @@ public ChangeOutputter changeOfCreationOnTable(String tableName, int index) { return changesPosition.getChangeInstance(changes, ChangeType.CREATION, tableName, index).withType(outputType); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ChangeOutputter changeOfModificationOnTable(String tableName) { if (origin != null) { @@ -269,7 +313,9 @@ public ChangeOutputter changeOfModificationOnTable(String tableName) { return changesPosition.getChangeInstance(changes, ChangeType.MODIFICATION, tableName).withType(outputType); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ChangeOutputter changeOfModificationOnTable(String tableName, int index) { if (origin != null) { @@ -278,7 +324,9 @@ public ChangeOutputter changeOfModificationOnTable(String tableName, int index) return changesPosition.getChangeInstance(changes, ChangeType.MODIFICATION, tableName, index).withType(outputType); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ChangeOutputter changeOfDeletionOnTable(String tableName) { if (origin != null) { @@ -287,7 +335,9 @@ public ChangeOutputter changeOfDeletionOnTable(String tableName) { return changesPosition.getChangeInstance(changes, ChangeType.DELETION, tableName).withType(outputType); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ChangeOutputter changeOfDeletionOnTable(String tableName, int index) { if (origin != null) { diff --git a/src/main/java/org/assertj/db/output/Outputs.java b/src/main/java/org/assertj/db/output/Outputs.java index 5e9d0c79..a702aed5 100644 --- a/src/main/java/org/assertj/db/output/Outputs.java +++ b/src/main/java/org/assertj/db/output/Outputs.java @@ -8,16 +8,16 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.output; +import static org.assertj.db.util.Descriptions.getDescription; + import org.assertj.db.type.Changes; import org.assertj.db.type.Request; import org.assertj.db.type.Table; -import static org.assertj.db.util.Descriptions.getDescription; - /** * Entry point of all the outputs. * diff --git a/src/main/java/org/assertj/db/output/RequestColumnOutputter.java b/src/main/java/org/assertj/db/output/RequestColumnOutputter.java index dec84729..455a248a 100644 --- a/src/main/java/org/assertj/db/output/RequestColumnOutputter.java +++ b/src/main/java/org/assertj/db/output/RequestColumnOutputter.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.output; @@ -19,11 +19,10 @@ * Output methods for a {@link Column} of a {@link Request}. * * @author Régis Pouiller - * */ public class RequestColumnOutputter - extends - AbstractColumnOutputter { + extends + AbstractColumnOutputter { /** * Constructor. @@ -43,4 +42,4 @@ public RequestColumnOutputter(RequestOutputter origin, Column column) { public RequestOutputter returnToRequest() { return returnToOrigin(); } -} \ No newline at end of file +} diff --git a/src/main/java/org/assertj/db/output/RequestColumnValueOutputter.java b/src/main/java/org/assertj/db/output/RequestColumnValueOutputter.java index 6c279eed..8644592a 100644 --- a/src/main/java/org/assertj/db/output/RequestColumnValueOutputter.java +++ b/src/main/java/org/assertj/db/output/RequestColumnValueOutputter.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.output; @@ -20,19 +20,18 @@ * Output methods for a value in a {@link Column} of a {@link Request}. * * @author Régis Pouiller - * */ public class RequestColumnValueOutputter - extends - AbstractColumnValueOutputter { + extends + AbstractColumnValueOutputter { /** * Constructor. * * @param origin The assertion of {@link org.assertj.db.navigation.origin.Origin}. - * @param value The value to assert. + * @param value The value to assert. */ public RequestColumnValueOutputter(RequestColumnOutputter origin, Value value) { super(RequestColumnValueOutputter.class, origin, value); } -} \ No newline at end of file +} diff --git a/src/main/java/org/assertj/db/output/RequestOutputter.java b/src/main/java/org/assertj/db/output/RequestOutputter.java index cf3f0ca0..eaedd390 100644 --- a/src/main/java/org/assertj/db/output/RequestOutputter.java +++ b/src/main/java/org/assertj/db/output/RequestOutputter.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.output; @@ -19,10 +19,9 @@ * Output methods for a {@link org.assertj.db.type.Request}. * * @author Régis Pouiller - * */ public class RequestOutputter extends - AbstractDbOutputter { + AbstractDbOutputter { /** * Constructor. diff --git a/src/main/java/org/assertj/db/output/RequestRowOutputter.java b/src/main/java/org/assertj/db/output/RequestRowOutputter.java index 563322d8..94859668 100644 --- a/src/main/java/org/assertj/db/output/RequestRowOutputter.java +++ b/src/main/java/org/assertj/db/output/RequestRowOutputter.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.output; @@ -20,17 +20,16 @@ * Output methods for a {@link Row} of a {@link Table}. * * @author Régis Pouiller - * */ public class RequestRowOutputter - extends - AbstractRowOutputter { + extends + AbstractRowOutputter { /** * Constructor. * * @param origin The assertion of {@link org.assertj.db.navigation.origin.Origin}. - * @param row The row on which do assertion. + * @param row The row on which do assertion. */ public RequestRowOutputter(RequestOutputter origin, Row row) { super(origin, RequestRowOutputter.class, RequestRowValueOutputter.class, row); diff --git a/src/main/java/org/assertj/db/output/RequestRowValueOutputter.java b/src/main/java/org/assertj/db/output/RequestRowValueOutputter.java index bdea28d6..f0eac3db 100644 --- a/src/main/java/org/assertj/db/output/RequestRowValueOutputter.java +++ b/src/main/java/org/assertj/db/output/RequestRowValueOutputter.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.output; @@ -20,11 +20,10 @@ * Output methods for a value in a {@link Row} of a {@link Request}. * * @author Régis Pouiller - * */ public class RequestRowValueOutputter - extends - AbstractRowValueOutputter { + extends + AbstractRowValueOutputter { /** * Constructor. diff --git a/src/main/java/org/assertj/db/output/TableColumnOutputter.java b/src/main/java/org/assertj/db/output/TableColumnOutputter.java index 002dcb34..f284b7fe 100644 --- a/src/main/java/org/assertj/db/output/TableColumnOutputter.java +++ b/src/main/java/org/assertj/db/output/TableColumnOutputter.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.output; @@ -19,11 +19,10 @@ * Output methods for a {@link Column} of a {@link Table}. * * @author Régis Pouiller - * */ public class TableColumnOutputter - extends - AbstractColumnOutputter { + extends + AbstractColumnOutputter { /** * Constructor. diff --git a/src/main/java/org/assertj/db/output/TableColumnValueOutputter.java b/src/main/java/org/assertj/db/output/TableColumnValueOutputter.java index 988a5608..112bc194 100644 --- a/src/main/java/org/assertj/db/output/TableColumnValueOutputter.java +++ b/src/main/java/org/assertj/db/output/TableColumnValueOutputter.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.output; @@ -20,19 +20,18 @@ * Output methods for a value in a {@link Column} of a {@link Table}. * * @author Régis Pouiller - * */ public class TableColumnValueOutputter - extends - AbstractColumnValueOutputter { + extends + AbstractColumnValueOutputter { /** * Constructor. * * @param origin The assertion of {@link org.assertj.db.navigation.origin.Origin}. - * @param value The value to assert. + * @param value The value to assert. */ public TableColumnValueOutputter(TableColumnOutputter origin, Value value) { super(TableColumnValueOutputter.class, origin, value); } -} \ No newline at end of file +} diff --git a/src/main/java/org/assertj/db/output/TableOutputter.java b/src/main/java/org/assertj/db/output/TableOutputter.java index 2cc01df1..7ee39e24 100644 --- a/src/main/java/org/assertj/db/output/TableOutputter.java +++ b/src/main/java/org/assertj/db/output/TableOutputter.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.output; @@ -19,10 +19,9 @@ * Output methods for a {@link org.assertj.db.type.Table}. * * @author Régis Pouiller - * */ public class TableOutputter extends - AbstractDbOutputter { + AbstractDbOutputter { /** * Constructor. diff --git a/src/main/java/org/assertj/db/output/TableRowOutputter.java b/src/main/java/org/assertj/db/output/TableRowOutputter.java index f5aaee3a..78152b2a 100644 --- a/src/main/java/org/assertj/db/output/TableRowOutputter.java +++ b/src/main/java/org/assertj/db/output/TableRowOutputter.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.output; @@ -19,17 +19,16 @@ * Output methods for a {@link Row} of a {@link Table}. * * @author Régis Pouiller - * */ public class TableRowOutputter - extends - AbstractRowOutputter { + extends + AbstractRowOutputter { /** * Constructor. * * @param origin The assertion of {@link org.assertj.db.navigation.origin.Origin}. - * @param row The row on which do assertion. + * @param row The row on which do assertion. */ public TableRowOutputter(TableOutputter origin, Row row) { super(origin, TableRowOutputter.class, TableRowValueOutputter.class, row); @@ -43,4 +42,4 @@ public TableRowOutputter(TableOutputter origin, Row row) { public TableOutputter returnToTable() { return returnToOrigin(); } -} \ No newline at end of file +} diff --git a/src/main/java/org/assertj/db/output/TableRowValueOutputter.java b/src/main/java/org/assertj/db/output/TableRowValueOutputter.java index eb9125ed..d25a343c 100644 --- a/src/main/java/org/assertj/db/output/TableRowValueOutputter.java +++ b/src/main/java/org/assertj/db/output/TableRowValueOutputter.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.output; @@ -20,11 +20,10 @@ * Output methods for a value in a {@link Row} of a {@link Table}. * * @author Régis Pouiller - * */ public class TableRowValueOutputter - extends - AbstractRowValueOutputter { + extends + AbstractRowValueOutputter { /** * Constructor. @@ -35,4 +34,4 @@ public class TableRowValueOutputter public TableRowValueOutputter(TableRowOutputter origin, Value value) { super(TableRowValueOutputter.class, origin, value); } -} \ No newline at end of file +} diff --git a/src/main/java/org/assertj/db/output/impl/HtmlOutput.java b/src/main/java/org/assertj/db/output/impl/HtmlOutput.java index 17588560..a7fa4750 100644 --- a/src/main/java/org/assertj/db/output/impl/HtmlOutput.java +++ b/src/main/java/org/assertj/db/output/impl/HtmlOutput.java @@ -8,15 +8,23 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.output.impl; -import org.assertj.core.api.WritableAssertionInfo; -import org.assertj.db.type.*; - import java.util.List; +import org.assertj.core.api.WritableAssertionInfo; +import org.assertj.db.type.Change; +import org.assertj.db.type.ChangeType; +import org.assertj.db.type.Changes; +import org.assertj.db.type.Column; +import org.assertj.db.type.DataType; +import org.assertj.db.type.Request; +import org.assertj.db.type.Row; +import org.assertj.db.type.Table; +import org.assertj.db.type.Value; + /** * Implementation of html output of assertj-db. * @@ -32,18 +40,19 @@ enum HtmlOutput implements Output { /** * Returns the html document for output. - * @param info Writable information about an assertion. + * + * @param info Writable information about an assertion. * @param content Content of the html document. * @return The html document. */ private static String getHtml(WritableAssertionInfo info, String content) { return "description" - + "

" - + info.descriptionText() - + "

" - + content - + ""; + + "

" + + info.descriptionText() + + "

" + + content + + ""; } /** @@ -508,28 +517,28 @@ public String getChangeColumnOutput(WritableAssertionInfo info, String columnNam String type = valueAtStartPoint.getValue() != null ? typeAtStartPoint : typeAtEndPoint; String stringBuilder = "" - + "" - + "" - + "" - + "" - + "" - + "" - + "" - + "" - + "" - + "" - + "" - + "" - + "
" - + "" - + columnName - + "
" - + type - + "
At start point" - + OutputType.getText(valueAtStartPoint) - + "
At end point" - + OutputType.getText(valueAtEndPoint) - + "
"; + + "" + + "" + + "" + + "" + + columnName + + "
" + + type + + "" + + "" + + "" + + "At start point" + + "" + + OutputType.getText(valueAtStartPoint) + + "" + + "" + + "" + + "At end point" + + "" + + OutputType.getText(valueAtEndPoint) + + "" + + "" + + ""; return getHtml(info, stringBuilder); } @@ -542,19 +551,19 @@ public String getValueOutput(WritableAssertionInfo info, Value value) { String type = OutputType.getType(value); String stringBuilder = "" - + "" - + "" - + "" - + "" - + "" - + "" - + "
" - + columnName - + "
" - + type - + "
" - + OutputType.getText(value) - + "
"; + + "" + + "" + + columnName + + "
" + + type + + "" + + "" + + "" + + "" + + OutputType.getText(value) + + "" + + "" + + ""; return getHtml(info, stringBuilder); } } diff --git a/src/main/java/org/assertj/db/output/impl/Output.java b/src/main/java/org/assertj/db/output/impl/Output.java index db3fd743..96ff9592 100644 --- a/src/main/java/org/assertj/db/output/impl/Output.java +++ b/src/main/java/org/assertj/db/output/impl/Output.java @@ -8,12 +8,18 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.output.impl; import org.assertj.core.api.WritableAssertionInfo; -import org.assertj.db.type.*; +import org.assertj.db.type.Change; +import org.assertj.db.type.Changes; +import org.assertj.db.type.Column; +import org.assertj.db.type.Request; +import org.assertj.db.type.Row; +import org.assertj.db.type.Table; +import org.assertj.db.type.Value; /** * Interface of the output of a output of assertj-db. @@ -80,10 +86,10 @@ public interface Output { /** * Returns the output of a {@code Column} of a {@code Change}. * - * @param info Writable information about an assertion. - * @param columnName Column name. + * @param info Writable information about an assertion. + * @param columnName Column name. * @param valueAtStartPoint Value at start point. - * @param valueAtEndPoint Value at end point. + * @param valueAtEndPoint Value at end point. * @return The output of a {@code Column} of a {@code Change}. */ String getChangeColumnOutput(WritableAssertionInfo info, String columnName, @@ -92,8 +98,8 @@ String getChangeColumnOutput(WritableAssertionInfo info, String columnName, /** * Returns the output of a value. * - * @param info Writable information about an assertion. - * @param value Value. + * @param info Writable information about an assertion. + * @param value Value. * @return The output of a value. */ String getValueOutput(WritableAssertionInfo info, Value value); diff --git a/src/main/java/org/assertj/db/output/impl/OutputType.java b/src/main/java/org/assertj/db/output/impl/OutputType.java index 0ec68628..2f27029d 100644 --- a/src/main/java/org/assertj/db/output/impl/OutputType.java +++ b/src/main/java/org/assertj/db/output/impl/OutputType.java @@ -8,19 +8,30 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.output.impl; -import org.assertj.core.api.WritableAssertionInfo; -import org.assertj.db.type.*; - import java.sql.Date; import java.sql.Time; import java.sql.Timestamp; import java.util.ArrayList; import java.util.List; +import org.assertj.core.api.WritableAssertionInfo; +import org.assertj.db.type.Change; +import org.assertj.db.type.Changes; +import org.assertj.db.type.Column; +import org.assertj.db.type.DataType; +import org.assertj.db.type.DateTimeValue; +import org.assertj.db.type.DateValue; +import org.assertj.db.type.Request; +import org.assertj.db.type.Row; +import org.assertj.db.type.Table; +import org.assertj.db.type.TimeValue; +import org.assertj.db.type.Value; +import org.assertj.db.type.ValueType; + /** * Enumeration of the different types of output. * @@ -31,17 +42,34 @@ public enum OutputType implements Output { /** * Plain output. + * * @see PlainOutput */ PLAIN(PlainOutput.INSTANCE), /** * Html output. + * * @see HtmlOutput */ HTML(HtmlOutput.INSTANCE); + /** + * The implementation of the output. + */ + private final Output displayer; + + /** + * Constructor. + * + * @param displayer The implementation of the output. + */ + OutputType(Output displayer) { + this.displayer = displayer; + } + /** * Returns the data name of the change. + * * @param change The change. * @return The data name. */ @@ -171,49 +199,48 @@ static StringBuilder[] getPksValueStringBuilder(Change... changes) { } /** - * The implementation of the output. - */ - private final Output displayer; - - /** - * Constructor. - * @param displayer The implementation of the output. + * {@inheritDoc} */ - OutputType(Output displayer) { - this.displayer = displayer; - } - - /** {@inheritDoc} */ @Override public String getTableOutput(WritableAssertionInfo info, Table table) { return displayer.getTableOutput(info, table); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public String getRequestOutput(WritableAssertionInfo info, Request request) { return displayer.getRequestOutput(info, request); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public String getChangesOutput(WritableAssertionInfo info, Changes changes) { return displayer.getChangesOutput(info, changes); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public String getChangeOutput(WritableAssertionInfo info, Change change) { return displayer.getChangeOutput(info, change); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public String getRowOutput(WritableAssertionInfo info, Row row) { return displayer.getRowOutput(info, row); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public String getColumnOutput(WritableAssertionInfo info, Column column) { return displayer.getColumnOutput(info, column); @@ -229,7 +256,9 @@ public String getChangeColumnOutput(WritableAssertionInfo info, String columnNam return displayer.getChangeColumnOutput(info, columnName, valueAtStartPoint, valueAtEndPoint); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public String getValueOutput(WritableAssertionInfo info, Value value) { return displayer.getValueOutput(info, value); diff --git a/src/main/java/org/assertj/db/output/impl/PlainOutput.java b/src/main/java/org/assertj/db/output/impl/PlainOutput.java index c9d277ac..a7b0f234 100644 --- a/src/main/java/org/assertj/db/output/impl/PlainOutput.java +++ b/src/main/java/org/assertj/db/output/impl/PlainOutput.java @@ -8,17 +8,25 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.output.impl; -import org.assertj.core.api.WritableAssertionInfo; -import org.assertj.db.type.*; - import java.util.ArrayList; import java.util.Arrays; import java.util.List; +import org.assertj.core.api.WritableAssertionInfo; +import org.assertj.db.type.Change; +import org.assertj.db.type.ChangeType; +import org.assertj.db.type.Changes; +import org.assertj.db.type.Column; +import org.assertj.db.type.DataType; +import org.assertj.db.type.Request; +import org.assertj.db.type.Row; +import org.assertj.db.type.Table; +import org.assertj.db.type.Value; + /** * Implementation of plain output of assertj-db. * @@ -83,7 +91,7 @@ private static int getColumnSize(String columnName, String type, Integer index, * the length of the text of the index and the length of the texts representing the objects. * * @param columnName The column name. - * @param objects The objects. + * @param objects The objects. * @return The size. */ private static int getColumnSize(String columnName, Object... objects) { @@ -132,7 +140,7 @@ private static StringBuilder getCellLine(int size) { * Returns a {@code StringBuilder} representing a complete line corresponding to the {@code row} in parameter. * * @param sizesList The list of sizes. - * @param row The row + * @param row The row * @param otherColumnsContent Other content in the column (var-args) : the columns before the values. * @return The line. */ @@ -144,13 +152,11 @@ private static StringBuilder getCompleteRow(List sizesList, Row row, Ob if (index < otherColumnsContent.length) { stringBuilder.append(getFilledText("" + otherColumnsContent[index], size)); stringBuilder.append("|"); - } - else { + } else { if (row != null) { Value value = row.getValuesList().get(index - otherColumnsContent.length); stringBuilder.append(getFilledText(OutputType.getText(value), size)).append("|"); - } - else { + } else { stringBuilder.append(getFilledText("", size)).append("|"); } } @@ -184,27 +190,12 @@ private static StringBuilder getCompleteLine(List sizesList, Object... return stringBuilder; } - /** - * Returns the columns sizes in array. - * - * @param columnSizesList List of column sizes (the columns with the values). - * @param sizes Sizes (var-args) : the columns before the values. - * @return An array with the sizes. - */ - private List getSizesList(List columnSizesList, Integer... sizes) { - List sizesList = new ArrayList<>(Arrays.asList(sizes)); - if (columnSizesList != null) { - sizesList.addAll(columnSizesList); - } - return sizesList; - } - /** * Returns a {@code StringBuilder} representing a complete line corresponding to the indication about the primary key. * - * @param sizesList The list of sizes of the column. - * @param pksNameList The list of the primary key name. - * @param columnsNameList The list of the column name. + * @param sizesList The list of sizes of the column. + * @param pksNameList The list of the primary key name. + * @param columnsNameList The list of the column name. * @return The output. */ private static StringBuilder getCompletePrimaryKey(List sizesList, List pksNameList, @@ -291,7 +282,7 @@ private static StringBuilder getCompleteType(List sizesList, List sizesList, int numbe /** * Returns the size of the column of index. + * * @param size The size of the rows/changes. * @return The size. */ @@ -323,6 +315,7 @@ private static Integer getIndexColumnSize(int size) { /** * Returns the size of the column of change type. + * * @param changes The changes. * @return The size. */ @@ -340,6 +333,7 @@ private static Integer getChangeTypeColumnSize(Change... changes) { /** * Returns the size of the column of change type. + * * @param changes The changes. * @return The size. */ @@ -413,6 +407,21 @@ private static List getColumnSizesList(Row... rows) { return columnSizesList; } + /** + * Returns the columns sizes in array. + * + * @param columnSizesList List of column sizes (the columns with the values). + * @param sizes Sizes (var-args) : the columns before the values. + * @return An array with the sizes. + */ + private List getSizesList(List columnSizesList, Integer... sizes) { + List sizesList = new ArrayList<>(Arrays.asList(sizes)); + if (columnSizesList != null) { + sizesList.addAll(columnSizesList); + } + return sizesList; + } + /** * {@inheritDoc} */ @@ -426,10 +435,10 @@ public String getTableOutput(WritableAssertionInfo info, Table table) { List typesList = OutputType.getTypesList(rows); int indexColumnSize = getIndexColumnSize(rows.length); StringBuilder[] pksValueStringBuilders = OutputType.getPksValueStringBuilder(rows); - int primaryKeyColumnSize = getColumnSize("PRIMARY", pksValueStringBuilders); + int primaryKeyColumnSize = getColumnSize("PRIMARY", (Object[]) pksValueStringBuilders); List sizesList = getSizesList(rows.length == 0 ? getColumnSizesList(columnsNameList) : getColumnSizesList(rows), - indexColumnSize, - primaryKeyColumnSize); + indexColumnSize, + primaryKeyColumnSize); StringBuilder stringBuilder = new StringBuilder(); // Description @@ -450,7 +459,7 @@ public String getTableOutput(WritableAssertionInfo info, Table table) { int index = 0; for (Row row : rows) { stringBuilder.append(getCompleteRow(sizesList, row, - "Index : " + index, pksValueStringBuilders[index])); + "Index : " + index, pksValueStringBuilders[index])); index++; } // Line @@ -472,10 +481,10 @@ public String getRequestOutput(WritableAssertionInfo info, Request request) { List typesList = OutputType.getTypesList(rows); int indexColumnSize = getIndexColumnSize(rows.length); StringBuilder[] pksValueStringBuilders = OutputType.getPksValueStringBuilder(rows); - int primaryKeyColumnSize = getColumnSize("PRIMARY", pksValueStringBuilders); + int primaryKeyColumnSize = getColumnSize("PRIMARY", (Object[]) pksValueStringBuilders); List sizesList = getSizesList(rows.length == 0 ? getColumnSizesList(columnsNameList) : getColumnSizesList(rows), - indexColumnSize, - primaryKeyColumnSize); + indexColumnSize, + primaryKeyColumnSize); StringBuilder stringBuilder = new StringBuilder(); // Description @@ -487,10 +496,10 @@ public String getRequestOutput(WritableAssertionInfo info, Request request) { )); // Column name stringBuilder.append(getCompleteColumnName(sizesList, columnsNameList, - "", "PRIMARY")); + "", "PRIMARY")); // Type stringBuilder.append(getCompleteType(sizesList, typesList, - "", "KEY")); + "", "KEY")); // Index stringBuilder.append(getCompleteIndex(sizesList, 2)); // Line @@ -499,7 +508,7 @@ public String getRequestOutput(WritableAssertionInfo info, Request request) { int index = 0; for (Row row : rows) { stringBuilder.append(getCompleteRow(sizesList, row, - "Index : " + index, pksValueStringBuilders[index])); + "Index : " + index, pksValueStringBuilders[index])); index++; } // Line @@ -519,7 +528,7 @@ public String getChangesOutput(WritableAssertionInfo info, Changes changes) { int changeTypeColumnSize = getChangeTypeColumnSize(changesArray); int dataTypeColumnSize = getDataTypeColumnSize(changesArray); StringBuilder[] pksValueStringBuilders = OutputType.getPksValueStringBuilder(changesArray); - int primaryKeyColumnSize = getColumnSize("PRIMARY", pksValueStringBuilders); + int primaryKeyColumnSize = getColumnSize("PRIMARY", (Object[]) pksValueStringBuilders); StringBuilder stringBuilder = new StringBuilder(); // Description @@ -535,10 +544,10 @@ public String getChangesOutput(WritableAssertionInfo info, Changes changes) { List typesList = OutputType.getTypesList(rowAtStartPoint, rowAtEndPoint); List sizesList = getSizesList(getColumnSizesList(rowAtStartPoint, rowAtEndPoint), - indexColumnSize, - changeTypeColumnSize, - dataTypeColumnSize, - primaryKeyColumnSize, 16); + indexColumnSize, + changeTypeColumnSize, + dataTypeColumnSize, + primaryKeyColumnSize, 16); // Line stringBuilder.append(getCompleteLine(sizesList)); // Primary key @@ -546,23 +555,23 @@ public String getChangesOutput(WritableAssertionInfo info, Changes changes) { )); // Column name stringBuilder.append(getCompleteColumnName(sizesList, columnsNameList, - "", "TYPE", "" + dataType, "PRIMARY", "")); + "", "TYPE", "" + dataType, "PRIMARY", "")); // Type stringBuilder.append(getCompleteType(sizesList, typesList, - "", "", "", "KEY", "")); + "", "", "", "KEY", "")); // Index stringBuilder.append(getCompleteIndex(sizesList, 5)); // Line stringBuilder.append(getCompleteLine(sizesList)); // Value at start point stringBuilder.append(getCompleteRow(sizesList, rowAtStartPoint, - "", "", "", "", "At start point")); + "", "", "", "", "At start point")); // Line stringBuilder.append(getCompleteLine(sizesList, - "Index : " + index, changeType, dataName, pksValueStringBuilders[index])); + "Index : " + index, changeType, dataName, pksValueStringBuilders[index])); // Value at end point stringBuilder.append(getCompleteRow(sizesList, rowAtEndPoint, - "", "", "", "", "At end point")); + "", "", "", "", "At end point")); // Line stringBuilder.append(getCompleteLine(sizesList)); @@ -589,40 +598,40 @@ public String getChangeOutput(WritableAssertionInfo info, Change change) { int changeTypeColumnSize = getColumnSize("TYPE", changeType); int dataTypeColumnSize = getColumnSize("" + dataType, dataName); - int primaryKeyColumnSize = getColumnSize("PRIMARY", pksValueStringBuilders); + int primaryKeyColumnSize = getColumnSize("PRIMARY", (Object[]) pksValueStringBuilders); List sizesList = getSizesList(getColumnSizesList(rowAtStartPoint, rowAtEndPoint), - changeTypeColumnSize, - dataTypeColumnSize, - primaryKeyColumnSize, 16); + changeTypeColumnSize, + dataTypeColumnSize, + primaryKeyColumnSize, 16); // Description return "[" + info.descriptionText() + "]" + EOL - // Line - + getCompleteLine(sizesList) - // Primary key - + getCompletePrimaryKey(sizesList, change.getPksNameList(), columnsNameList + // Line + + getCompleteLine(sizesList) + // Primary key + + getCompletePrimaryKey(sizesList, change.getPksNameList(), columnsNameList ) - // Column name - + getCompleteColumnName(sizesList, columnsNameList, - "TYPE", "" + dataType, "PRIMARY", "") - // Type - + getCompleteType(sizesList, typesList, - "", "", "KEY", "") - // Index - + getCompleteIndex(sizesList, 4) - // Line - + getCompleteLine(sizesList) - // Value at start point - + getCompleteRow(sizesList, rowAtStartPoint, - "", "", "", "At start point") - // Line - + getCompleteLine(sizesList, changeType, dataName, pksValueStringBuilders[0]) - // Value at end point - + getCompleteRow(sizesList, rowAtEndPoint, - "", "", "", "At end point") - // Line - + getCompleteLine(sizesList); + // Column name + + getCompleteColumnName(sizesList, columnsNameList, + "TYPE", "" + dataType, "PRIMARY", "") + // Type + + getCompleteType(sizesList, typesList, + "", "", "KEY", "") + // Index + + getCompleteIndex(sizesList, 4) + // Line + + getCompleteLine(sizesList) + // Value at start point + + getCompleteRow(sizesList, rowAtStartPoint, + "", "", "", "At start point") + // Line + + getCompleteLine(sizesList, changeType, dataName, pksValueStringBuilders[0]) + // Value at end point + + getCompleteRow(sizesList, rowAtEndPoint, + "", "", "", "At end point") + // Line + + getCompleteLine(sizesList); } /** @@ -632,34 +641,34 @@ public String getChangeOutput(WritableAssertionInfo info, Change change) { public String getRowOutput(WritableAssertionInfo info, Row row) { if (row == null) { return "[" + info.descriptionText() + "]" + EOL - + "Row does not exist" + EOL; + + "Row does not exist" + EOL; } List columnsNameList = row.getColumnsNameList(); List typesList = OutputType.getTypesList(row); StringBuilder[] pksValueStringBuilders = OutputType.getPksValueStringBuilder(row); - int primaryKeyColumnSize = getColumnSize("PRIMARY", pksValueStringBuilders); + int primaryKeyColumnSize = getColumnSize("PRIMARY", (Object[]) pksValueStringBuilders); List sizesList = getSizesList(getColumnSizesList(row), - primaryKeyColumnSize); + primaryKeyColumnSize); // Description return "[" + info.descriptionText() + "]" + EOL - // Line - + getCompleteLine(sizesList) - // Primary key - + getCompletePrimaryKey(sizesList, row.getPksNameList(), columnsNameList) - // Column name - + getCompleteColumnName(sizesList, columnsNameList, "PRIMARY") - // Type - + getCompleteType(sizesList, typesList, "KEY") - // Index - + getCompleteIndex(sizesList, 1) - // Line - + getCompleteLine(sizesList) - // Value - + getCompleteRow(sizesList, row, pksValueStringBuilders[0]) - // Line - + getCompleteLine(sizesList); + // Line + + getCompleteLine(sizesList) + // Primary key + + getCompletePrimaryKey(sizesList, row.getPksNameList(), columnsNameList) + // Column name + + getCompleteColumnName(sizesList, columnsNameList, "PRIMARY") + // Type + + getCompleteType(sizesList, typesList, "KEY") + // Index + + getCompleteIndex(sizesList, 1) + // Line + + getCompleteLine(sizesList) + // Value + + getCompleteRow(sizesList, row, pksValueStringBuilders[0]) + // Line + + getCompleteLine(sizesList); } /** @@ -674,8 +683,8 @@ public String getColumnOutput(WritableAssertionInfo info, Column column) { String type = OutputType.getType(values); int columnSize = getColumnSize(columnName, type, null, values); List sizesList = getSizesList(null, - indexColumnSize, - columnSize); + indexColumnSize, + columnSize); StringBuilder stringBuilder = new StringBuilder(); // Description @@ -684,18 +693,18 @@ public String getColumnOutput(WritableAssertionInfo info, Column column) { stringBuilder.append(getCompleteLine(sizesList)); // Column name stringBuilder.append("|").append(getFilledText("", indexColumnSize)).append("|").append(getFilledText(columnName, columnSize)) - .append("|").append(EOL); + .append("|").append(EOL); // Type stringBuilder.append("|").append(getFilledText("", indexColumnSize)).append("|").append(getFilledText(type, columnSize)) - .append("|").append(EOL); + .append("|").append(EOL); // Line stringBuilder.append(getCompleteLine(sizesList)); // Value int index = 0; for (Value value : values) { stringBuilder.append("|").append(getFilledText(getText("Index : " + index), indexColumnSize)) - .append("|").append(getFilledText(OutputType.getText(value), columnSize)) - .append("|").append(EOL); + .append("|").append(getFilledText(OutputType.getText(value), columnSize)) + .append("|").append(EOL); index++; } // Line @@ -720,30 +729,30 @@ public String getChangeColumnOutput(WritableAssertionInfo info, String columnNam // Description return "[" + info.descriptionText() + "]" + EOL - // Line - + "|----------------|" + getCellLine(columnSize) - + "|" + EOL - // Column name - + "| |" + getFilledText(columnName, columnSize) - + "|" + EOL - // Type - + "| |" + getFilledText(type, columnSize) - + "|" + EOL - // Line - + "|----------------|" + getCellLine(columnSize) - + "|" + EOL - // Value at start point - + "| At start point |" + getFilledText(OutputType.getText(valueAtStartPoint), columnSize) - + "|" + EOL - // Line - + "|----------------|" + getCellLine(columnSize) - + "|" + EOL - // Value at end point - + "| At end point |" + getFilledText(OutputType.getText(valueAtEndPoint), columnSize) - + "|" + EOL - // Line - + "|----------------|" + getCellLine(columnSize) - + "|" + EOL; + // Line + + "|----------------|" + getCellLine(columnSize) + + "|" + EOL + // Column name + + "| |" + getFilledText(columnName, columnSize) + + "|" + EOL + // Type + + "| |" + getFilledText(type, columnSize) + + "|" + EOL + // Line + + "|----------------|" + getCellLine(columnSize) + + "|" + EOL + // Value at start point + + "| At start point |" + getFilledText(OutputType.getText(valueAtStartPoint), columnSize) + + "|" + EOL + // Line + + "|----------------|" + getCellLine(columnSize) + + "|" + EOL + // Value at end point + + "| At end point |" + getFilledText(OutputType.getText(valueAtEndPoint), columnSize) + + "|" + EOL + // Line + + "|----------------|" + getCellLine(columnSize) + + "|" + EOL; } /** @@ -758,23 +767,23 @@ public String getValueOutput(WritableAssertionInfo info, Value value) { // Description return "[" + info.descriptionText() + "]" + EOL - // Line - + "|" + getCellLine(columnSize) - + "|" + EOL - // Column name - + "|" + getFilledText(columnName, columnSize) - + "|" + EOL - // Type - + "|" + getFilledText(type, columnSize) - + "|" + EOL - // Line - + "|" + getCellLine(columnSize) - + "|" + EOL - // Value - + "|" + getFilledText(OutputType.getText(value), columnSize) - + "|" + EOL - // Line - + "|" + getCellLine(columnSize) - + "|" + EOL; + // Line + + "|" + getCellLine(columnSize) + + "|" + EOL + // Column name + + "|" + getFilledText(columnName, columnSize) + + "|" + EOL + // Type + + "|" + getFilledText(type, columnSize) + + "|" + EOL + // Line + + "|" + getCellLine(columnSize) + + "|" + EOL + // Value + + "|" + getFilledText(OutputType.getText(value), columnSize) + + "|" + EOL + // Line + + "|" + getCellLine(columnSize) + + "|" + EOL; } } diff --git a/src/main/java/org/assertj/db/output/impl/package-info.java b/src/main/java/org/assertj/db/output/impl/package-info.java index 7904b124..dd2c5eba 100644 --- a/src/main/java/org/assertj/db/output/impl/package-info.java +++ b/src/main/java/org/assertj/db/output/impl/package-info.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ /** * This package contains utility classes about the output. diff --git a/src/main/java/org/assertj/db/output/package-info.java b/src/main/java/org/assertj/db/output/package-info.java index 6de0c73a..35b90579 100644 --- a/src/main/java/org/assertj/db/output/package-info.java +++ b/src/main/java/org/assertj/db/output/package-info.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ /** * This package contains classes that allows to output the information about table, request or changes. diff --git a/src/main/java/org/assertj/db/type/AbstractDbData.java b/src/main/java/org/assertj/db/type/AbstractDbData.java index c621982e..b52a8657 100644 --- a/src/main/java/org/assertj/db/type/AbstractDbData.java +++ b/src/main/java/org/assertj/db/type/AbstractDbData.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.type; @@ -32,10 +32,9 @@ * The first call to one of these methods triggers a loading from the database. *

* - * @author Régis Pouiller - * * @param Class of the subclass (an implementation of {@link AbstractDbData}) : useful for the fluent methods - * (setters). + * (setters). + * @author Régis Pouiller */ public abstract class AbstractDbData> extends AbstractDbElement { @@ -76,7 +75,7 @@ public abstract class AbstractDbData> extends Abstra * * @param dataType The type of the data on which is the change. * @param selfType Class of this element : a sub-class of {@code AbstractDbData}. - * @param source The {@link Source} to connect to the database (must be not {@code null}). + * @param source The {@link Source} to connect to the database (must be not {@code null}). * @throws NullPointerException If {@code source} is {@code null}. */ AbstractDbData(Class selfType, DataType dataType, Source source) { @@ -87,8 +86,8 @@ public abstract class AbstractDbData> extends Abstra /** * Constructor with a {@link DataSource}. * - * @param dataType The type of the data on which is the change. - * @param selfType Class of this element : a sub-class of {@code AbstractDbData}. + * @param dataType The type of the data on which is the change. + * @param selfType Class of this element : a sub-class of {@code AbstractDbData}. * @param dataSource The {@link DataSource} (must be not {@code null}). * @throws NullPointerException If {@code dataSource} is {@code null}. */ @@ -109,9 +108,9 @@ public DataType getDataType() { /** * Returns the SQL request. * + * @return The SQL request. * @see Table#getRequest() * @see Request#getRequest() - * @return The SQL request. */ public abstract String getRequest(); @@ -123,7 +122,7 @@ public DataType getDataType() { *

* * @throws NullPointerException If the {@link #dataSource} and {@link #source} fields are {@code null}. - * @throws AssertJDBException If triggered, this exception wrap a possible {@link SQLException} during the loading. + * @throws AssertJDBException If triggered, this exception wrap a possible {@link SQLException} during the loading. */ private void load() { try (Connection connection = getConnection()) { @@ -152,10 +151,10 @@ protected void sortRows() { * the sub-class. *

* - * @see Table#loadImpl(Connection) - * @see Request#loadImpl(Connection) * @param connection {@link Connection} to the database provided by {@link #load()} method. * @throws SQLException SQL Exception. + * @see Table#loadImpl(Connection) + * @see Request#loadImpl(Connection) */ protected abstract void loadImpl(Connection connection) throws SQLException; @@ -186,25 +185,25 @@ protected void collectRowsFromResultSet(ResultSet resultSet) throws SQLException Object object; int type = metaData.getColumnType(index); switch (type) { - case Types.DATE: - object = resultSet.getDate(columnName); - break; - case Types.TIME: - object = resultSet.getTime(columnName); - break; - case Types.TIMESTAMP: - object = resultSet.getTimestamp(columnName); - break; - case Types.BLOB: - object = resultSet.getBytes(columnName); - break; - case Types.CLOB: - object = resultSet.getString(columnName); - break; + case Types.DATE: + object = resultSet.getDate(columnName); + break; + case Types.TIME: + object = resultSet.getTime(columnName); + break; + case Types.TIMESTAMP: + object = resultSet.getTimestamp(columnName); + break; + case Types.BLOB: + object = resultSet.getBytes(columnName); + break; + case Types.CLOB: + object = resultSet.getString(columnName); + break; - default: - object = resultSet.getObject(columnName); - break; + default: + object = resultSet.getObject(columnName); + break; } valuesList.add(new Value(columnName, object, getColumnLetterCase())); } @@ -221,7 +220,7 @@ protected void collectRowsFromResultSet(ResultSet resultSet) throws SQLException * * @return The list of the columns name. * @throws NullPointerException If the {@link #dataSource} and {@link #source} fields are {@code null}. - * @throws AssertJDBException If triggered, this exception wrap a possible {@link SQLException} during the loading. + * @throws AssertJDBException If triggered, this exception wrap a possible {@link SQLException} during the loading. */ public List getColumnsNameList() { if (columnsNameList == null) { @@ -248,7 +247,7 @@ protected void setColumnsNameList(List columnsNameList) { * * @return The list of the primary key name. * @throws NullPointerException If the {@link #dataSource} and {@link #source} fields are {@code null}. - * @throws AssertJDBException If triggered, this exception wrap a possible {@link SQLException} during the loading. + * @throws AssertJDBException If triggered, this exception wrap a possible {@link SQLException} during the loading. */ public List getPksNameList() { if (pksNameList == null) { @@ -257,21 +256,6 @@ public List getPksNameList() { return pksNameList; } - /** - * Controls that all the primary keys name exist in the columns. - */ - protected void controlIfAllThePksNameExistInTheColumns() { - LetterCase letterCase = getPrimaryKeyLetterCase(); - if (pksNameList != null) { - for (String pkName : pksNameList) { - // If the list of columns name is not set, the presence of the column is not tested - if (columnsNameList != null && !NameComparator.INSTANCE.contains(columnsNameList, pkName, letterCase)) { - throw new AssertJDBException("Primary key %s do not exist in the columns %s", pkName, columnsNameList); - } - } - } - } - /** * Sets the list of the primary key name. * @@ -289,6 +273,21 @@ protected void setPksNameList(List pksNameList) { controlIfAllThePksNameExistInTheColumns(); } + /** + * Controls that all the primary keys name exist in the columns. + */ + protected void controlIfAllThePksNameExistInTheColumns() { + LetterCase letterCase = getPrimaryKeyLetterCase(); + if (pksNameList != null) { + for (String pkName : pksNameList) { + // If the list of columns name is not set, the presence of the column is not tested + if (columnsNameList != null && !NameComparator.INSTANCE.contains(columnsNameList, pkName, letterCase)) { + throw new AssertJDBException("Primary key %s do not exist in the columns %s", pkName, columnsNameList); + } + } + } + } + /** * Returns the list of the values in rows for the data from database. *

@@ -298,7 +297,7 @@ protected void setPksNameList(List pksNameList) { * * @return The list of the values. * @throws NullPointerException If the {@link #dataSource} and {@link #source} fields are {@code null}. - * @throws AssertJDBException If triggered, this exception wrap a possible {@link SQLException} during the loading. + * @throws AssertJDBException If triggered, this exception wrap a possible {@link SQLException} during the loading. */ public List getRowsList() { if (rowsList == null) { @@ -318,7 +317,7 @@ public List getRowsList() { * * @return The list of the values in columns. * @throws NullPointerException If the {@link #dataSource} and {@link #source} fields are {@code null}. - * @throws AssertJDBException If triggered, this exception wrap a possible {@link SQLException} during the loading. + * @throws AssertJDBException If triggered, this exception wrap a possible {@link SQLException} during the loading. */ public List getColumnsList() { if (columnsList == null) { @@ -347,7 +346,7 @@ public List getColumnsList() { * @param index The column index. * @return The column and the values * @throws NullPointerException If the {@link #dataSource} and {@link #source} fields are {@code null}. - * @throws AssertJDBException If triggered, this exception wrap a possible {@link SQLException} during the loading. + * @throws AssertJDBException If triggered, this exception wrap a possible {@link SQLException} during the loading. */ public Column getColumn(int index) { return getColumnsList().get(index); @@ -364,7 +363,7 @@ public Column getColumn(int index) { * @param index The index * @return The {@link Row} * @throws NullPointerException If the {@link #dataSource} and {@link #source} fields are {@code null}. - * @throws AssertJDBException If triggered, this exception wrap a possible {@link SQLException} during the loading. + * @throws AssertJDBException If triggered, this exception wrap a possible {@link SQLException} during the loading. */ public Row getRow(int index) { return getRowsList().get(index); @@ -381,7 +380,7 @@ public Row getRow(int index) { * @param index The column index * @return The values * @throws NullPointerException If the {@link #dataSource} and {@link #source} fields are {@code null}. - * @throws AssertJDBException If triggered, this exception wrap a possible {@link SQLException} during the loading. + * @throws AssertJDBException If triggered, this exception wrap a possible {@link SQLException} during the loading. */ private List getValuesList(int index) { List valuesList = new ArrayList<>(); diff --git a/src/main/java/org/assertj/db/type/AbstractDbElement.java b/src/main/java/org/assertj/db/type/AbstractDbElement.java index 231b33a9..dc4e46ad 100644 --- a/src/main/java/org/assertj/db/type/AbstractDbElement.java +++ b/src/main/java/org/assertj/db/type/AbstractDbElement.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.type; @@ -25,10 +25,9 @@ * So this class contains : the way to access the database with {@link #getSource()} and {@link #getDataSource()} (one * of them need to be set before loading the data).
* - * @author Régis Pouiller - * * @param Class of the subclass (an implementation of {@link AbstractDbElement}) : useful for the fluent methods - * (setters). + * (setters). + * @author Régis Pouiller */ public abstract class AbstractDbElement> implements DbElement, WithLetterCase { @@ -46,22 +45,26 @@ public abstract class AbstractDbElement> implemen private DataSource dataSource; /** * Letter case of the tables. + * * @since 1.1.0 */ private LetterCase tableLetterCase; /** * Letter case of the columns. + * * @since 1.1.0 */ private LetterCase columnLetterCase; /** * Letter case of the primary keys. + * * @since 1.1.0 */ private LetterCase primaryKeyLetterCase; /** * Default constructor. + * * @param selfType Class of this element : a sub-class of {@code AbstractDbElement}. */ AbstractDbElement(Class selfType) { @@ -71,8 +74,9 @@ public abstract class AbstractDbElement> implemen /** * Constructor. + * * @param selfType Class of this element : a sub-class of {@code AbstractDbElement}. - * @param source The {@link Source} to connect to the database (must be not {@code null}). + * @param source The {@link Source} to connect to the database (must be not {@code null}). * @throws NullPointerException If {@code source} is {@code null}. */ AbstractDbElement(Class selfType, Source source) { @@ -83,7 +87,8 @@ public abstract class AbstractDbElement> implemen /** * Constructor. - * @param selfType Class of this element : a sub-class of {@code AbstractDbElement}. + * + * @param selfType Class of this element : a sub-class of {@code AbstractDbElement}. * @param dataSource The {@link DataSource} (must be not {@code null}). * @throws NullPointerException If {@code dataSource} is {@code null}. */ @@ -93,10 +98,45 @@ public abstract class AbstractDbElement> implemen setLetterCases(); } + /** + * Returns the catalog from a connection. + * + * @param connection The connection with the catalog + * @return The catalog from a connection. + * @throws SQLException SQL Exception + */ + protected static String getCatalog(Connection connection) throws SQLException { + try { + return connection.getCatalog(); + } catch (SQLException exception) { + throw exception; + } catch (Exception throwable) { + return null; + } + } + + /** + * Returns the schema from a connection. + * + * @param connection The connection with the catalog + * @return The schema from a connection. + * @throws SQLException SQL Exception + */ + protected static String getSchema(Connection connection) throws SQLException { + try { + return connection.getSchema(); + } catch (SQLException exception) { + throw exception; + } catch (Exception throwable) { + return null; + } + } + /** * Sets the letter cases from information in parameters. - * @param tableLetterCase Letter case of the tables. - * @param columnLetterCase Letter case of the columns. + * + * @param tableLetterCase Letter case of the tables. + * @param columnLetterCase Letter case of the columns. * @param primaryKeyLetterCase Letter case of the primary keys. * @return The actual instance. */ @@ -116,14 +156,12 @@ private void setLetterCases() { tableLetterCase = withLetterCase.getTableLetterCase(); columnLetterCase = withLetterCase.getColumnLetterCase(); primaryKeyLetterCase = withLetterCase.getPrimaryKeyLetterCase(); - } - else if (source instanceof WithLetterCase) { + } else if (source instanceof WithLetterCase) { WithLetterCase withLetterCase = (WithLetterCase) source; tableLetterCase = withLetterCase.getTableLetterCase(); columnLetterCase = withLetterCase.getColumnLetterCase(); primaryKeyLetterCase = withLetterCase.getPrimaryKeyLetterCase(); - } - else { + } else { tableLetterCase = LetterCase.TABLE_DEFAULT; columnLetterCase = LetterCase.COLUMN_DEFAULT; primaryKeyLetterCase = LetterCase.PRIMARY_KEY_DEFAULT; @@ -156,9 +194,9 @@ public LetterCase getTableLetterCase() { /** * Return the source. - * - * @see #setSource(Source) + * * @return The {@link Source} to connect. + * @see #setSource(Source) */ public Source getSource() { return source; @@ -166,11 +204,11 @@ public Source getSource() { /** * Sets the source. - * - * @see #getSource() + * * @param source {@link Source} to connect to the database (must be not {@code null}). * @return The actual instance. * @throws NullPointerException If {@code source} is {@code null}. + * @see #getSource() */ public D setSource(Source source) { if (source == null) { @@ -184,9 +222,9 @@ public D setSource(Source source) { /** * Return the data source. - * - * @see #setDataSource(DataSource) + * * @return The data source. + * @see #setDataSource(DataSource) */ public DataSource getDataSource() { return dataSource; @@ -194,11 +232,11 @@ public DataSource getDataSource() { /** * Sets the data source. - * - * @see #getDataSource() + * * @param dataSource The {@link DataSource} (must be not {@code null}). * @return The actual instance. * @throws NullPointerException If {@code dataSource} is {@code null}. + * @see #getDataSource() */ public D setDataSource(DataSource dataSource) { if (dataSource == null) { @@ -212,7 +250,7 @@ public D setDataSource(DataSource dataSource) { /** * Returns a {@link Connection} from a {@link DataSource} or from a {@link Source}. - * + * * @return A {@link Connection} differently, depending if it is a {@link DataSource} or a {@link Source}. * @throws SQLException SQL Exception */ @@ -228,40 +266,4 @@ protected Connection getConnection() throws SQLException { return DriverManager.getConnection(source.getUrl(), source.getUser(), source.getPassword()); } } - - /** - * Returns the catalog from a connection. - * @param connection The connection with the catalog - * @return The catalog from a connection. - * @throws SQLException SQL Exception - */ - protected static String getCatalog(Connection connection) throws SQLException { - try { - return connection.getCatalog(); - } - catch (SQLException exception) { - throw exception; - } - catch (Exception throwable) { - return null; - } - } - - /** - * Returns the schema from a connection. - * @param connection The connection with the catalog - * @return The schema from a connection. - * @throws SQLException SQL Exception - */ - protected static String getSchema(Connection connection) throws SQLException { - try { - return connection.getSchema(); - } - catch (SQLException exception) { - throw exception; - } - catch (Exception throwable) { - return null; - } - } } diff --git a/src/main/java/org/assertj/db/type/Change.java b/src/main/java/org/assertj/db/type/Change.java index d5db8010..da860c21 100644 --- a/src/main/java/org/assertj/db/type/Change.java +++ b/src/main/java/org/assertj/db/type/Change.java @@ -8,17 +8,17 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.type; +import java.util.List; + import org.assertj.db.type.lettercase.LetterCase; import org.assertj.db.type.lettercase.WithColumnLetterCase; import org.assertj.db.type.lettercase.WithPrimaryKeyLetterCase; import org.assertj.db.type.lettercase.WithTableLetterCase; -import java.util.List; - /** * Change in the database. *

@@ -29,7 +29,6 @@ *

* * @author Régis Pouiller. - * */ public class Change implements DbElement, WithTableLetterCase, WithColumnLetterCase, WithPrimaryKeyLetterCase { @@ -64,30 +63,72 @@ public class Change implements DbElement, WithTableLetterCase, WithColumnLetterC /** * Letter case of the tables. + * * @since 1.1.0 */ private final LetterCase tableLetterCase; /** * Letter case of the columns. + * * @since 1.1.0 */ private final LetterCase columnLetterCase; /** * Letter case of the primary keys. + * * @since 1.1.0 */ private final LetterCase primaryKeyLetterCase; + /** + * Constructor. + * + * @param dataType The type of the data on which is the change. + * @param dataName The name of the data on which is the change. + * @param changeType The type of the change. + * @param rowAtStartPoint The row at start point. + * @param rowAtEndPoint The row at end point. + * @param tableLetterCase Letter case of the tables. + * @param columnLetterCase Letter case of the columns. + * @param primaryKeyLetterCase Letter case of the primary keys. + * @throws NullPointerException If the type of the data is {@code null} or if the name of the data is {@code null}. + */ + private Change(DataType dataType, String dataName, ChangeType changeType, Row rowAtStartPoint, Row rowAtEndPoint, + LetterCase tableLetterCase, LetterCase columnLetterCase, LetterCase primaryKeyLetterCase) { + + if (dataType == null) { + throw new NullPointerException("The type of the data must be not null"); + } + if (dataName == null) { + throw new NullPointerException("The name of the data must be not null"); + } + this.dataType = dataType; + this.dataName = dataName; + if (rowAtStartPoint != null) { + this.pksNameList = rowAtStartPoint.getPksNameList(); + this.columnsNameList = rowAtStartPoint.getColumnsNameList(); + } else { + this.pksNameList = rowAtEndPoint.getPksNameList(); + this.columnsNameList = rowAtEndPoint.getColumnsNameList(); + } + this.changeType = changeType; + this.rowAtStartPoint = rowAtStartPoint; + this.rowAtEndPoint = rowAtEndPoint; + this.tableLetterCase = tableLetterCase; + this.columnLetterCase = columnLetterCase; + this.primaryKeyLetterCase = primaryKeyLetterCase; + } + /** * Returns a new instance of a creation change. - * - * @param dataType The type of the data on which is the change. - * @param dataName The name of the data. - * @param rowAtEndPoint The row at end point. - * @param tableLetterCase Letter case of the tables. - * @param columnLetterCase Letter case of the columns. + * + * @param dataType The type of the data on which is the change. + * @param dataName The name of the data. + * @param rowAtEndPoint The row at end point. + * @param tableLetterCase Letter case of the tables. + * @param columnLetterCase Letter case of the columns. * @param primaryKeyLetterCase Letter case of the primary keys. * @return The new instance of a creation change. * @throws NullPointerException If the name of the date is {@code null}. @@ -95,18 +136,18 @@ public class Change implements DbElement, WithTableLetterCase, WithColumnLetterC static Change createCreationChange(DataType dataType, String dataName, Row rowAtEndPoint, LetterCase tableLetterCase, LetterCase columnLetterCase, LetterCase primaryKeyLetterCase) { return new Change(dataType, dataName, ChangeType.CREATION, null, rowAtEndPoint, - tableLetterCase, columnLetterCase, primaryKeyLetterCase); + tableLetterCase, columnLetterCase, primaryKeyLetterCase); } /** * Returns a new instance of a modification change. - * - * @param dataType The type of the data on which is the change. - * @param dataName The name of the data. - * @param rowAtStartPoint The row at start point. - * @param rowAtEndPoint The row at end point. - * @param tableLetterCase Letter case of the tables. - * @param columnLetterCase Letter case of the columns. + * + * @param dataType The type of the data on which is the change. + * @param dataName The name of the data. + * @param rowAtStartPoint The row at start point. + * @param rowAtEndPoint The row at end point. + * @param tableLetterCase Letter case of the tables. + * @param columnLetterCase Letter case of the columns. * @param primaryKeyLetterCase Letter case of the primary keys. * @return The new instance of a modification change. * @throws NullPointerException If the name of the date is {@code null}. @@ -114,17 +155,17 @@ static Change createCreationChange(DataType dataType, String dataName, Row rowAt static Change createModificationChange(DataType dataType, String dataName, Row rowAtStartPoint, Row rowAtEndPoint, LetterCase tableLetterCase, LetterCase columnLetterCase, LetterCase primaryKeyLetterCase) { return new Change(dataType, dataName, ChangeType.MODIFICATION, rowAtStartPoint, rowAtEndPoint, - tableLetterCase, columnLetterCase, primaryKeyLetterCase); + tableLetterCase, columnLetterCase, primaryKeyLetterCase); } /** * Returns a new instance of a deletion change. - * - * @param dataType The type of the data on which is the change. - * @param dataName The name of the data. - * @param rowAtStartPoint The row at start point. - * @param tableLetterCase Letter case of the tables. - * @param columnLetterCase Letter case of the columns. + * + * @param dataType The type of the data on which is the change. + * @param dataName The name of the data. + * @param rowAtStartPoint The row at start point. + * @param tableLetterCase Letter case of the tables. + * @param columnLetterCase Letter case of the columns. * @param primaryKeyLetterCase Letter case of the primary keys. * @return The new instance of a deletion change. * @throws NullPointerException If the name of the date is {@code null}. @@ -132,46 +173,7 @@ static Change createModificationChange(DataType dataType, String dataName, Row r static Change createDeletionChange(DataType dataType, String dataName, Row rowAtStartPoint, LetterCase tableLetterCase, LetterCase columnLetterCase, LetterCase primaryKeyLetterCase) { return new Change(dataType, dataName, ChangeType.DELETION, rowAtStartPoint, null, - tableLetterCase, columnLetterCase, primaryKeyLetterCase); - } - - /** - * Constructor. - * - * @param dataType The type of the data on which is the change. - * @param dataName The name of the data on which is the change. - * @param changeType The type of the change. - * @param rowAtStartPoint The row at start point. - * @param rowAtEndPoint The row at end point. - * @param tableLetterCase Letter case of the tables. - * @param columnLetterCase Letter case of the columns. - * @param primaryKeyLetterCase Letter case of the primary keys. - * @throws NullPointerException If the type of the data is {@code null} or if the name of the data is {@code null}. - */ - private Change(DataType dataType, String dataName, ChangeType changeType, Row rowAtStartPoint, Row rowAtEndPoint, - LetterCase tableLetterCase, LetterCase columnLetterCase, LetterCase primaryKeyLetterCase) { - - if (dataType == null) { - throw new NullPointerException("The type of the data must be not null"); - } - if (dataName == null) { - throw new NullPointerException("The name of the data must be not null"); - } - this.dataType = dataType; - this.dataName = dataName; - if (rowAtStartPoint != null) { - this.pksNameList = rowAtStartPoint.getPksNameList(); - this.columnsNameList = rowAtStartPoint.getColumnsNameList(); - } else { - this.pksNameList = rowAtEndPoint.getPksNameList(); - this.columnsNameList = rowAtEndPoint.getColumnsNameList(); - } - this.changeType = changeType; - this.rowAtStartPoint = rowAtStartPoint; - this.rowAtEndPoint = rowAtEndPoint; - this.tableLetterCase = tableLetterCase; - this.columnLetterCase = columnLetterCase; - this.primaryKeyLetterCase = primaryKeyLetterCase; + tableLetterCase, columnLetterCase, primaryKeyLetterCase); } /** @@ -200,7 +202,7 @@ public LetterCase getTableLetterCase() { /** * Returns the type of the data on which is the change. - * + * * @return The type of the data on which is the change. */ public DataType getDataType() { @@ -209,7 +211,7 @@ public DataType getDataType() { /** * Returns the name of the data on which is the change. - * + * * @return The name of the data on which is the change. */ public String getDataName() { @@ -239,7 +241,7 @@ public List getPksValueList() { /** * Returns the list of the column names. - * + * * @return The list of the column names. */ public List getColumnsNameList() { @@ -248,7 +250,7 @@ public List getColumnsNameList() { /** * Returns the type of the change. - * + * * @return The type of the change. */ public ChangeType getChangeType() { @@ -257,7 +259,7 @@ public ChangeType getChangeType() { /** * Returns the row at start point. - * + * * @return The row at start point. */ public Row getRowAtStartPoint() { @@ -266,7 +268,7 @@ public Row getRowAtStartPoint() { /** * Returns the row at end point. - * + * * @return The row at end point. */ public Row getRowAtEndPoint() { diff --git a/src/main/java/org/assertj/db/type/ChangeType.java b/src/main/java/org/assertj/db/type/ChangeType.java index fc50ccb6..bfd68413 100644 --- a/src/main/java/org/assertj/db/type/ChangeType.java +++ b/src/main/java/org/assertj/db/type/ChangeType.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.type; diff --git a/src/main/java/org/assertj/db/type/Changes.java b/src/main/java/org/assertj/db/type/Changes.java index 2b61f8cc..3af50b2c 100644 --- a/src/main/java/org/assertj/db/type/Changes.java +++ b/src/main/java/org/assertj/db/type/Changes.java @@ -8,27 +8,31 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.type; -import org.assertj.db.exception.AssertJDBException; -import org.assertj.db.util.ChangeComparator; +import static org.assertj.db.type.Change.createCreationChange; +import static org.assertj.db.type.Change.createDeletionChange; +import static org.assertj.db.type.Change.createModificationChange; -import javax.sql.DataSource; import java.sql.Connection; import java.sql.DatabaseMetaData; import java.sql.ResultSet; import java.sql.SQLException; -import java.util.*; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.LinkedList; +import java.util.List; +import javax.sql.DataSource; -import static org.assertj.db.type.Change.*; +import org.assertj.db.exception.AssertJDBException; +import org.assertj.db.util.ChangeComparator; /** * Changes in the database. - * + * * @author Régis Pouiller - * */ public class Changes extends AbstractDbElement { @@ -70,7 +74,7 @@ public Changes() { /** * Constructor. - * + * * @param source The {@link Source} to connect to the database (must be not {@code null}). * @throws NullPointerException If {@code source} is {@code null}. */ @@ -80,7 +84,7 @@ public Changes(Source source) { /** * Constructor. - * + * * @param dataSource The {@link DataSource} (must be not {@code null}). * @throws NullPointerException If {@code dataSource} is {@code null}. */ @@ -90,7 +94,7 @@ public Changes(DataSource dataSource) { /** * Constructor. - * + * * @param tables Table on which are the comparison. */ public Changes(Table... tables) { @@ -100,7 +104,7 @@ public Changes(Table... tables) { /** * Constructor. - * + * * @param request Request on which are the comparison. */ public Changes(Request request) { @@ -108,9 +112,61 @@ public Changes(Request request) { setRequest(request); } + /** + * Copy a {@link AbstractDbElement} in parameter on another. + * + * @param elementToCopy The {@link AbstractDbElement} to copy + * @param element The {@link AbstractDbElement} on which is the copy + */ + private static void copyElement(AbstractDbElement elementToCopy, AbstractDbElement element) { + if (elementToCopy.getSource() != null) { + element.setSource(elementToCopy.getSource()); + } + if (elementToCopy.getDataSource() != null) { + element.setDataSource(elementToCopy.getDataSource()); + } + } + + /** + * Duplicate the {@link Request} in parameter and returns it. + * + * @param request The {@link Request} to duplicate + * @return The Duplication + */ + private static Request getDuplicatedRequest(Request request) { + Request r = new Request(); + copyElement(request, r); + return r.setLetterCases(request.getTableLetterCase(), + request.getColumnLetterCase(), + request.getPrimaryKeyLetterCase()) + .setRequest(request.getRequest()) + .setParameters(request.getParameters()) + .setPksName(request.getPksNameList().toArray(new String[0])); + } + + /** + * Duplicate the {@link Table} in parameter and returns it. + * + * @param table The {@link Table} to duplicate + * @return The Duplication + */ + private static Table getDuplicatedTable(Table table) { + Table t = new Table(); + copyElement(table, t); + return t.setLetterCases(table.getTableLetterCase(), + table.getColumnLetterCase(), + table.getPrimaryKeyLetterCase()) + .setName(table.getName()) + .setStartDelimiter(table.getStartDelimiter()) + .setEndDelimiter(table.getEndDelimiter()) + .setColumnsToCheck(table.getColumnsToCheck()) + .setColumnsToExclude(table.getColumnsToExclude()) + .setColumnsToOrder(table.getColumnsToOrder()); + } + /** * Sets the table on which are the comparison. - * + * * @param tables Table on which are the comparison. * @return {@code this} actual instance. */ @@ -137,15 +193,25 @@ public Changes setTables(Table... tables) { /** * Returns the list of {@link Table}. + * * @return The list of {@link Table}. */ public List getTablesList() { return tablesList; } + /** + * Returns the {@link Request}. + * + * @return The {@link Request}. + */ + public Request getRequest() { + return request; + } + /** * Sets the {@link Request}. - * + * * @param request The {@link Request}. * @return {@code this} actual instance. */ @@ -164,17 +230,9 @@ public Changes setRequest(Request request) { return myself; } - /** - * Returns the {@link Request}. - * @return The {@link Request}. - */ - public Request getRequest() { - return request; - } - /** * Returns the list of the {@link Table}s at start point. - * + * * @return The list of the {@link Table}s at start point. * @see Changes#setStartPointNow() */ @@ -184,7 +242,7 @@ public List
getTablesAtStartPointList() { /** * Returns the list of the {@link Table}s at end point. - * + * * @return The list of the {@link Table}s at end point. * @see Changes#setEndPointNow() */ @@ -194,7 +252,7 @@ public List
getTablesAtEndPointList() { /** * Returns the {@link Request} at start point. - * + * * @return The {@link Request} at start point. * @see Changes#setStartPointNow() */ @@ -204,7 +262,7 @@ public Request getRequestAtStartPoint() { /** * Returns the {@link Request} at end point. - * + * * @return The {@link Request} at end point. * @see Changes#setEndPointNow() */ @@ -212,61 +270,9 @@ public Request getRequestAtEndPoint() { return requestAtEndPoint; } - /** - * Copy a {@link AbstractDbElement} in parameter on another. - * - * @param elementToCopy The {@link AbstractDbElement} to copy - * @param element The {@link AbstractDbElement} on which is the copy - */ - private static void copyElement(AbstractDbElement elementToCopy, AbstractDbElement element) { - if (elementToCopy.getSource() != null) { - element.setSource(elementToCopy.getSource()); - } - if (elementToCopy.getDataSource() != null) { - element.setDataSource(elementToCopy.getDataSource()); - } - } - - /** - * Duplicate the {@link Request} in parameter and returns it. - * - * @param request The {@link Request} to duplicate - * @return The Duplication - */ - private static Request getDuplicatedRequest(Request request) { - Request r = new Request(); - copyElement(request, r); - return r.setLetterCases(request.getTableLetterCase(), - request.getColumnLetterCase(), - request.getPrimaryKeyLetterCase()) - .setRequest(request.getRequest()) - .setParameters(request.getParameters()) - .setPksName(request.getPksNameList().toArray(new String[0])); - } - - /** - * Duplicate the {@link Table} in parameter and returns it. - * - * @param table The {@link Table} to duplicate - * @return The Duplication - */ - private static Table getDuplicatedTable(Table table) { - Table t = new Table(); - copyElement(table, t); - return t.setLetterCases(table.getTableLetterCase(), - table.getColumnLetterCase(), - table.getPrimaryKeyLetterCase()) - .setName(table.getName()) - .setStartDelimiter(table.getStartDelimiter()) - .setEndDelimiter(table.getEndDelimiter()) - .setColumnsToCheck(table.getColumnsToCheck()) - .setColumnsToExclude(table.getColumnsToExclude()) - .setColumnsToOrder(table.getColumnsToOrder()); - } - /** * Sets the start point for comparison. - * + * * @return {@code this} actual instance. */ public Changes setStartPointNow() { @@ -275,11 +281,11 @@ public Changes setStartPointNow() { tablesList = new LinkedList<>(); DatabaseMetaData metaData = connection.getMetaData(); ResultSet resultSet = metaData.getTables(getCatalog(connection), getSchema(connection), null, - new String[] { "TABLE" }); + new String[]{"TABLE"}); while (resultSet.next()) { String tableName = resultSet.getString("TABLE_NAME"); Table t = new Table().setLetterCases(getTableLetterCase(), getColumnLetterCase(), getPrimaryKeyLetterCase()) - .setName(getTableLetterCase().convert(tableName)); + .setName(getTableLetterCase().convert(tableName)); copyElement(this, t); tablesList.add(t); } @@ -310,7 +316,7 @@ public Changes setStartPointNow() { /** * Sets the end point for comparison. - * + * * @return {@code this} actual instance. * @throws AssertJDBException If the start point is not set */ @@ -337,14 +343,14 @@ public Changes setEndPointNow() { /** * Returns the list of changes for the data when there have primary keys. - * - * @param dataName The name of the data. + * + * @param dataName The name of the data. * @param dataAtStartPoint The data at start point. - * @param dataAtEndPoint The data at end point. + * @param dataAtEndPoint The data at end point. * @return The list of changes for the data. */ private List getChangesListWithPks(String dataName, AbstractDbData dataAtStartPoint, - AbstractDbData dataAtEndPoint) { + AbstractDbData dataAtEndPoint) { List changesListWithPks = new ArrayList<>(); @@ -353,7 +359,7 @@ private List getChangesListWithPks(String dataName, AbstractDbData da Row rowAtStartPoint = dataAtStartPoint.getRowFromPksValues(row.getPksValues()); if (rowAtStartPoint == null) { Change change = createCreationChange(dataAtEndPoint.getDataType(), dataName, row, - getTableLetterCase(), getColumnLetterCase(), getPrimaryKeyLetterCase()); + getTableLetterCase(), getColumnLetterCase(), getPrimaryKeyLetterCase()); changesListWithPks.add(change); } } @@ -362,14 +368,14 @@ private List getChangesListWithPks(String dataName, AbstractDbData da if (rowAtEndPoint == null) { // List the deleted rows : the row is not present at the end point Change change = createDeletionChange(dataAtStartPoint.getDataType(), dataName, row, - getTableLetterCase(), getColumnLetterCase(), getPrimaryKeyLetterCase()); + getTableLetterCase(), getColumnLetterCase(), getPrimaryKeyLetterCase()); changesListWithPks.add(change); } else { // List the modified rows if (!row.hasValues(rowAtEndPoint)) { // If at least one value in the rows is different, add the change Change change = createModificationChange(dataAtStartPoint.getDataType(), dataName, row, rowAtEndPoint, - getTableLetterCase(), getColumnLetterCase(), getPrimaryKeyLetterCase()); + getTableLetterCase(), getColumnLetterCase(), getPrimaryKeyLetterCase()); changesListWithPks.add(change); } } @@ -380,14 +386,14 @@ private List getChangesListWithPks(String dataName, AbstractDbData da /** * Returns the list of changes for the data when there is no primary key. - * - * @param dataName The name of the data. + * + * @param dataName The name of the data. * @param dataAtStartPoint The data at start point. - * @param dataAtEndPoint The data at end point. + * @param dataAtEndPoint The data at end point. * @return The list of changes for the data. */ private List getChangesListWithoutPks(String dataName, AbstractDbData dataAtStartPoint, - AbstractDbData dataAtEndPoint) { + AbstractDbData dataAtEndPoint) { List changesListWithoutPks = new ArrayList<>(); @@ -405,7 +411,7 @@ private List getChangesListWithoutPks(String dataName, AbstractDbData } if (index == -1) { Change change = createCreationChange(dataAtStartPoint.getDataType(), dataName, rowAtEndPoint, - getTableLetterCase(), getColumnLetterCase(), getPrimaryKeyLetterCase()); + getTableLetterCase(), getColumnLetterCase(), getPrimaryKeyLetterCase()); changesListWithoutPks.add(change); } else { rowsAtStartPointList.remove(index); @@ -425,7 +431,7 @@ private List getChangesListWithoutPks(String dataName, AbstractDbData } if (index == -1) { Change change = createDeletionChange(dataAtStartPoint.getDataType(), dataName, rowAtStartPoint, - getTableLetterCase(), getColumnLetterCase(), getPrimaryKeyLetterCase()); + getTableLetterCase(), getColumnLetterCase(), getPrimaryKeyLetterCase()); changesListWithoutPks.add(change); } else { rowsAtEndPointList.remove(index); @@ -437,14 +443,14 @@ private List getChangesListWithoutPks(String dataName, AbstractDbData /** * Returns the list of changes for the data. - * - * @param dataName The name of the data. + * + * @param dataName The name of the data. * @param dataAtStartPoint The data at start point. - * @param dataAtEndPoint The data at end point. + * @param dataAtEndPoint The data at end point. * @return The list of changes for the data. */ private List getChangesList(String dataName, AbstractDbData dataAtStartPoint, - AbstractDbData dataAtEndPoint) { + AbstractDbData dataAtEndPoint) { if (dataAtStartPoint.getPksNameList().isEmpty()) { return getChangesListWithoutPks(dataName, dataAtStartPoint, dataAtEndPoint); @@ -455,10 +461,10 @@ private List getChangesList(String dataName, AbstractDbData dataAtSta /** * Returns the list of the changes. - * + * * @return The list of the changes. * @throws AssertJDBException If the changes are on all the tables and if the number of tables change between the - * start point and the end point. It is normally impossible. + * start point and the end point. It is normally impossible. */ public List getChangesList() { if (changesList == null) { @@ -486,6 +492,7 @@ public List getChangesList() { /** * Returns {@code Changes} only on the table name in parameter. + * * @param tableName The table name * @return {@code Changes} instance. */ @@ -507,6 +514,7 @@ public Changes getChangesOfTable(String tableName) { /** * Returns {@code Changes} only on the change type in parameter. + * * @param changeType The change type * @return {@code Changes} instance. */ @@ -526,6 +534,7 @@ public Changes getChangesOfType(ChangeType changeType) { /** * Creates a new instance of {@code Changes} from {@code this} one. + * * @return The new instance. */ private Changes createChangesFromThis() { diff --git a/src/main/java/org/assertj/db/type/Column.java b/src/main/java/org/assertj/db/type/Column.java index d3f414d2..f9b7304f 100644 --- a/src/main/java/org/assertj/db/type/Column.java +++ b/src/main/java/org/assertj/db/type/Column.java @@ -8,15 +8,15 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.type; +import java.util.List; + import org.assertj.db.type.lettercase.LetterCase; import org.assertj.db.type.lettercase.WithColumnLetterCase; -import java.util.List; - /** * Column in a {@link AbstractDbData}. *

@@ -26,9 +26,8 @@ * Note : you never instantiate directly this class. You will get an object of this class from a {@link Table} or a * {@link Request} by using {@link AbstractDbData#getColumn(int)}. *

- * + * * @author Régis Pouiller. - * */ public class Column implements DbElement, WithColumnLetterCase { @@ -42,15 +41,16 @@ public class Column implements DbElement, WithColumnLetterCase { private final List valuesList; /** * Letter case of the columns. + * * @since 1.1.0 */ private final LetterCase columnLetterCase; /** * Constructor of the column with visibility in the package. - * - * @param name The name of the column. - * @param valuesList The values in the column. + * + * @param name The name of the column. + * @param valuesList The values in the column. * @param columnLetterCase The letter case of the columns. */ Column(String name, List valuesList, LetterCase columnLetterCase) { @@ -69,7 +69,7 @@ public LetterCase getColumnLetterCase() { /** * Returns the name of the column. - * + * * @return The name of the column. */ public String getName() { @@ -78,7 +78,7 @@ public String getName() { /** * Returns the values of the column. - * + * * @return The values of the column. */ public List getValuesList() { @@ -87,7 +87,7 @@ public List getValuesList() { /** * Returns the value corresponding to the row index. - * + * * @param index The index * @return The value */ diff --git a/src/main/java/org/assertj/db/type/DataSourceWithLetterCase.java b/src/main/java/org/assertj/db/type/DataSourceWithLetterCase.java index 2ccffd9c..d39f43fb 100644 --- a/src/main/java/org/assertj/db/type/DataSourceWithLetterCase.java +++ b/src/main/java/org/assertj/db/type/DataSourceWithLetterCase.java @@ -8,19 +8,19 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.type; -import org.assertj.db.type.lettercase.LetterCase; -import org.assertj.db.type.lettercase.WithLetterCase; - -import javax.sql.DataSource; import java.io.PrintWriter; import java.sql.Connection; import java.sql.SQLException; import java.sql.SQLFeatureNotSupportedException; import java.util.logging.Logger; +import javax.sql.DataSource; + +import org.assertj.db.type.lettercase.LetterCase; +import org.assertj.db.type.lettercase.WithLetterCase; /** * A data source to connect to the database with letter case. @@ -49,9 +49,10 @@ public class DataSourceWithLetterCase implements DataSource, WithLetterCase { /** * Constructor. - * @param dataSource The data source. - * @param tableLetterCase Letter case of the tables. - * @param columnLetterCase Letter case of the columns. + * + * @param dataSource The data source. + * @param tableLetterCase Letter case of the tables. + * @param columnLetterCase Letter case of the columns. * @param primaryKeyLetterCase Letter case of the primary keys. */ public DataSourceWithLetterCase(DataSource dataSource, LetterCase tableLetterCase, @@ -123,16 +124,16 @@ public void setLogWriter(PrintWriter out) throws SQLException { * {@inheritDoc} */ @Override - public void setLoginTimeout(int seconds) throws SQLException { - dataSource.setLoginTimeout(seconds); + public int getLoginTimeout() throws SQLException { + return dataSource.getLoginTimeout(); } /** * {@inheritDoc} */ @Override - public int getLoginTimeout() throws SQLException { - return dataSource.getLoginTimeout(); + public void setLoginTimeout(int seconds) throws SQLException { + dataSource.setLoginTimeout(seconds); } /** diff --git a/src/main/java/org/assertj/db/type/DataType.java b/src/main/java/org/assertj/db/type/DataType.java index 73b8e505..60f1f77b 100644 --- a/src/main/java/org/assertj/db/type/DataType.java +++ b/src/main/java/org/assertj/db/type/DataType.java @@ -8,15 +8,14 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.type; /** * Enumeration of the different type of data. - * + * * @author Régis Pouiller - * */ public enum DataType { diff --git a/src/main/java/org/assertj/db/type/DateTimeValue.java b/src/main/java/org/assertj/db/type/DateTimeValue.java index e1e54f39..1174483f 100644 --- a/src/main/java/org/assertj/db/type/DateTimeValue.java +++ b/src/main/java/org/assertj/db/type/DateTimeValue.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.type; @@ -19,21 +19,12 @@ /** * This class represents a date/time value in the database. - * + * * @author Régis Pouiller - * */ public class DateTimeValue implements Comparable, DateValueContainer { - public static final String DATE_TIME_SHOULD_BE_NOT_NULL = "date/time should be not null"; - /** - * The date part. - */ - private final DateValue date; - /** - * The time part. - */ - private final TimeValue time; + private static final String DATE_TIME_SHOULD_BE_NOT_NULL = "date/time should be not null"; /** * Indicates where there are the digits in the {@code String} for {@link DateValue#DateValue(String)}. */ @@ -52,90 +43,18 @@ public class DateTimeValue implements Comparable, DateValueContai * {@link TimeValue#TimeValue(String)}. */ private static final String TIME_FORMAT_WITH_NANO = "\\d\\d\\d\\d-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\d.\\d\\d\\d\\d\\d\\d\\d\\d\\d"; - - /** - * Makes an instance of date/time value from a date with time at 00:00AM. - * - * @param date The date. - * @return An instance of date/time. - */ - public static DateTimeValue of(DateValue date) { - return new DateTimeValue(date, TimeValue.of(0, 0)); - } - - /** - * Makes an instance of date/time value from a date and a time. - * - * @param date The date. - * @param time The time. - * @return An instance of date/time. - */ - public static DateTimeValue of(DateValue date, TimeValue time) { - return new DateTimeValue(date, time); - } - - /** - * Makes an instance of date/time value from a {@code String} in {@code yyyy-mm-dd}, {@code yyyy-mm-ddThh:mm}, - * {@code yyyy-mm-ddThh:mm:ss} or {@code yyyy-mm-ddThh:mm:ss.nnnnnnnnn} format. - * - * @param dateTime Date/time in {@code String} format ({@code yyyy-mm-dd}). - * @throws NullPointerException If {@code dateTime} is {@code null}. - * @throws ParseException If {@code date} don't respect the {@code yyyy-mm-dd}, {@code yyyy-mm-ddThh:mm}, - * {@code yyyy-mm-ddThh:mm:ss} or {@code yyyy-mm-ddThh:mm:ss.nnnnnnnnn} format. - * @return An instance of date/time value. - */ - public static DateTimeValue parse(String dateTime) throws ParseException { - return new DateTimeValue(dateTime); - } - - /** - * Makes an instance of date/time value from a {@link Timestamp}. - * - * @param timestamp Timestamp. - * @throws NullPointerException If {@code timestamp} is {@code null}. - * @return An instance of date/time value. - */ - public static DateTimeValue from(Timestamp timestamp) { - return new DateTimeValue(timestamp); - } - - /** - * Makes an instance of date/time value from a {@link Calendar}. - * - * @param calendar Calendar. - * @throws NullPointerException If {@code calendar} is {@code null}. - * @return An instance of date/time value. - * @since 1.1.0 - */ - public static DateTimeValue from(Calendar calendar) { - return new DateTimeValue(calendar); - } - /** - * Makes an instance of date/time value from a {@link LocalDateTime}. - * - * @param localDateTime LocalDateTime. - * @throws NullPointerException If {@code localDateTime} is {@code null}. - * @return An instance of date/time value. - * @since 2.0.0 + * The date part. */ - public static DateTimeValue from(LocalDateTime localDateTime) { - return new DateTimeValue(localDateTime); - } - + private final DateValue date; /** - * Makes an instance of the date/time value corresponding to now. - * - * @return An instance of date/time value. - * @since 1.1.0 + * The time part. */ - public static DateTimeValue now() { - return from(Calendar.getInstance()); - } + private final TimeValue time; /** * Constructor. - * + * * @param date The date. * @param time The time. * @throws NullPointerException If {@code date} or {@code time} is {@code null}. @@ -153,12 +72,12 @@ public DateTimeValue(DateValue date, TimeValue time) { /** * Constructor. - * + * * @param dateTime Time in {@code String} format ({@code yyyy-mm-dd}, {@code yyyy-mm-ddThh:mm}, - * {@code yyyy-mm-ddThh:mm:ss} or {@code yyyy-mm-ddThh:mm:ss.nnnnnnnnn}). + * {@code yyyy-mm-ddThh:mm:ss} or {@code yyyy-mm-ddThh:mm:ss.nnnnnnnnn}). * @throws NullPointerException If {@code dateTime} is {@code null}. - * @throws ParseException If {@code date} don't respect the {@code yyyy-mm-dd}, {@code yyyy-mm-ddThh:mm}, - * {@code yyyy-mm-ddThh:mm:ss} or {@code yyyy-mm-ddThh:mm:ss.nnnnnnnnn} format. + * @throws ParseException If {@code date} don't respect the {@code yyyy-mm-dd}, {@code yyyy-mm-ddThh:mm}, + * {@code yyyy-mm-ddThh:mm:ss} or {@code yyyy-mm-ddThh:mm:ss.nnnnnnnnn} format. */ public DateTimeValue(String dateTime) throws ParseException { if (dateTime == null) { @@ -169,19 +88,19 @@ public DateTimeValue(String dateTime) throws ParseException { date = DateValue.parse(dateTime); time = new TimeValue(0, 0); } else if (dateTime.matches(TIME_FORMAT) || dateTime.matches(TIME_FORMAT_WITH_SECONDS) - || dateTime.matches(TIME_FORMAT_WITH_NANO)) { + || dateTime.matches(TIME_FORMAT_WITH_NANO)) { date = DateValue.parse(dateTime.substring(0, 10)); time = TimeValue.parse(dateTime.substring(11)); } else { throw new ParseException("date/time must respect yyyy-mm-dd, yyyy-mm-ddThh:mm, " - + "yyyy-mm-ddThh:mm:ss or yyyy-mm-ddThh:mm:ss.nnnnnnnnn format", dateTime.length()); + + "yyyy-mm-ddThh:mm:ss or yyyy-mm-ddThh:mm:ss.nnnnnnnnn format", dateTime.length()); } } /** * Constructor. - * + * * @param timestamp Timestamp. * @throws NullPointerException If {@code dateTime} is {@code null}. */ @@ -194,9 +113,9 @@ public DateTimeValue(Timestamp timestamp) { calendar.setTimeInMillis(timestamp.getTime()); date = DateValue.of(calendar.get(Calendar.YEAR), calendar.get(Calendar.MONTH) + 1, - calendar.get(Calendar.DAY_OF_MONTH)); + calendar.get(Calendar.DAY_OF_MONTH)); time = TimeValue.of(calendar.get(Calendar.HOUR_OF_DAY), calendar.get(Calendar.MINUTE), - calendar.get(Calendar.SECOND), timestamp.getNanos()); + calendar.get(Calendar.SECOND), timestamp.getNanos()); } /** @@ -230,7 +149,89 @@ public DateTimeValue(LocalDateTime localDateTime) { time = TimeValue.from(localDateTime.toLocalTime()); } - /** {@inheritDoc} */ + /** + * Makes an instance of date/time value from a date with time at 00:00AM. + * + * @param date The date. + * @return An instance of date/time. + */ + public static DateTimeValue of(DateValue date) { + return new DateTimeValue(date, TimeValue.of(0, 0)); + } + + /** + * Makes an instance of date/time value from a date and a time. + * + * @param date The date. + * @param time The time. + * @return An instance of date/time. + */ + public static DateTimeValue of(DateValue date, TimeValue time) { + return new DateTimeValue(date, time); + } + + /** + * Makes an instance of date/time value from a {@code String} in {@code yyyy-mm-dd}, {@code yyyy-mm-ddThh:mm}, + * {@code yyyy-mm-ddThh:mm:ss} or {@code yyyy-mm-ddThh:mm:ss.nnnnnnnnn} format. + * + * @param dateTime Date/time in {@code String} format ({@code yyyy-mm-dd}). + * @return An instance of date/time value. + * @throws NullPointerException If {@code dateTime} is {@code null}. + * @throws ParseException If {@code date} don't respect the {@code yyyy-mm-dd}, {@code yyyy-mm-ddThh:mm}, + * {@code yyyy-mm-ddThh:mm:ss} or {@code yyyy-mm-ddThh:mm:ss.nnnnnnnnn} format. + */ + public static DateTimeValue parse(String dateTime) throws ParseException { + return new DateTimeValue(dateTime); + } + + /** + * Makes an instance of date/time value from a {@link Timestamp}. + * + * @param timestamp Timestamp. + * @return An instance of date/time value. + * @throws NullPointerException If {@code timestamp} is {@code null}. + */ + public static DateTimeValue from(Timestamp timestamp) { + return new DateTimeValue(timestamp); + } + + /** + * Makes an instance of date/time value from a {@link Calendar}. + * + * @param calendar Calendar. + * @return An instance of date/time value. + * @throws NullPointerException If {@code calendar} is {@code null}. + * @since 1.1.0 + */ + public static DateTimeValue from(Calendar calendar) { + return new DateTimeValue(calendar); + } + + /** + * Makes an instance of date/time value from a {@link LocalDateTime}. + * + * @param localDateTime LocalDateTime. + * @return An instance of date/time value. + * @throws NullPointerException If {@code localDateTime} is {@code null}. + * @since 2.0.0 + */ + public static DateTimeValue from(LocalDateTime localDateTime) { + return new DateTimeValue(localDateTime); + } + + /** + * Makes an instance of the date/time value corresponding to now. + * + * @return An instance of date/time value. + * @since 1.1.0 + */ + public static DateTimeValue now() { + return from(Calendar.getInstance()); + } + + /** + * {@inheritDoc} + */ @Override public DateValue getDate() { return date; @@ -242,7 +243,7 @@ public boolean isMidnight() { /** * Returns the time. - * + * * @return The time. */ public TimeValue getTime() { @@ -252,7 +253,7 @@ public TimeValue getTime() { @Override public String toString() { return String.format("%4d-%02d-%02dT%02d:%02d:%02d.%09d", date.getYear(), date.getMonth(), date.getDayOfTheMonth(), - time.getHours(), time.getMinutes(), time.getSeconds(), time.getNanoSeconds()); + time.getHours(), time.getMinutes(), time.getSeconds(), time.getNanoSeconds()); } @Override @@ -287,7 +288,7 @@ public int compareTo(DateTimeValue other) { /** * Returns if this date/time value is before the date/time value in parameter. - * + * * @param dateTime The date/time value to compare to. * @return If this date/time value is before the date/time value in parameter. */ @@ -297,7 +298,7 @@ public boolean isBefore(DateTimeValue dateTime) { /** * Returns if this date/time value is after the date/time value in parameter. - * + * * @param dateTime The date/time value to compare to. * @return If this date/time value is after the date/time value in parameter. */ @@ -307,6 +308,7 @@ public boolean isAfter(DateTimeValue dateTime) { /** * Moves the date/time with the value in parameter. + * * @param date Value to move the date. * @return The date/time moved. */ @@ -321,6 +323,7 @@ public DateTimeValue move(DateValue date) { /** * Moves the date/time with the value in parameter. + * * @param time Value to move the date. * @return The date/time moved. */ @@ -332,8 +335,7 @@ public DateTimeValue move(TimeValue time) { int days = hours / 24; if (hours > 0) { hours -= days * 24; - } - else { + } else { hours += days * 24; } if (hours < 0) { @@ -345,11 +347,12 @@ public DateTimeValue move(TimeValue time) { DateValue movedDateValue = dateValue.move(DateValue.of(0, 0, days)); return of(movedDateValue, TimeValue.of(hours, movedTimeValue.getMinutes(), - movedTimeValue.getSeconds(), movedTimeValue.getNanoSeconds())); + movedTimeValue.getSeconds(), movedTimeValue.getNanoSeconds())); } /** * Moves the date/time with the value in parameter. + * * @param dateTime Value to move the date. * @return The date/time moved. */ @@ -360,6 +363,7 @@ public DateTimeValue move(DateTimeValue dateTime) { /** * Returns the reverse of the date/time. + * * @return The reverse. */ public DateTimeValue reverse() { diff --git a/src/main/java/org/assertj/db/type/DateValue.java b/src/main/java/org/assertj/db/type/DateValue.java index 3e654aed..f1827156 100644 --- a/src/main/java/org/assertj/db/type/DateValue.java +++ b/src/main/java/org/assertj/db/type/DateValue.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.type; @@ -19,13 +19,16 @@ /** * This class represents a date value in the database. - * + * * @author Régis Pouiller - * */ public class DateValue implements Comparable, DateValueContainer { - public static final String DATE_SHOULD_BE_NOT_NULL = "date should be not null"; + private static final String DATE_SHOULD_BE_NOT_NULL = "date should be not null"; + /** + * Indicates where there are the digits in the {@code String} for {@link DateValue#DateValue(String)}. + */ + private static final String DATE_FORMAT = "\\d\\d\\d\\d-\\d\\d-\\d\\d"; /** * Day of the month. */ @@ -38,85 +41,12 @@ public class DateValue implements Comparable, DateValueContainer { * Year. */ private final int year; - /** - * Indicates where there are the digits in the {@code String} for {@link DateValue#DateValue(String)}. - */ - private static final String DATE_FORMAT = "\\d\\d\\d\\d-\\d\\d-\\d\\d"; - - /** - * Makes an instance of date value from a day of month, a month and an year. - * - * @param year Year. - * @param month Month. - * @param dayOfTheMonth Day of the month. - * @return An instance of date value. - */ - public static DateValue of(int year, int month, int dayOfTheMonth) { - return new DateValue(year, month, dayOfTheMonth); - } - - /** - * Makes an instance of date value from a {@code String} in format {@code yyyy-mm-dd}. - * - * @param date Date in {@code String} format ({@code yyyy-mm-dd}). - * @throws NullPointerException If {@code date} is {@code null}. - * @throws ParseException If {@code date} don't respect the {@code yyyy-mm-dd} format. - * @return An instance of date value. - */ - public static DateValue parse(String date) throws ParseException { - return new DateValue(date); - } - - /** - * Makes an instance of date value from a {@link Date}. - * - * @param date Date. - * @throws NullPointerException If {@code date} is {@code null}. - * @return An instance of date value. - */ - public static DateValue from(Date date) { - return new DateValue(date); - } - - /** - * Makes an instance of date value from a {@link Calendar}. - * - * @param calendar Calendar. - * @throws NullPointerException If {@code calendar} is {@code null}. - * @return An instance of date value. - * @since 1.1.0 - */ - public static DateValue from(Calendar calendar) { - return new DateValue(calendar); - } - - /** - * Makes an instance of date value from a {@link LocalDate}. - * - * @param localDate LocalDate. - * @throws NullPointerException If {@code localDate} is {@code null}. - * @return An instance of date value. - * @since 2.0.0 - */ - public static DateValue from(LocalDate localDate) { - return new DateValue(localDate); - } - - /** - * Makes an instance of the date value corresponding to now. - * - * @return An instance of date value. - * @since 1.1.0 - */ - public static DateValue now() { - return from(Calendar.getInstance()); - } /** * Constructor. - * - * @param year Year. - * @param month Month. + * + * @param year Year. + * @param month Month. * @param dayOfTheMonth Day of the month. */ public DateValue(int year, int month, int dayOfTheMonth) { @@ -127,10 +57,10 @@ public DateValue(int year, int month, int dayOfTheMonth) { /** * Constructor. - * + * * @param date Date in {@code String} format ({@code yyyy-mm-dd}). * @throws NullPointerException If {@code date} is {@code null}. - * @throws ParseException If {@code date} don't respect the {@code yyyy-mm-dd} format. + * @throws ParseException If {@code date} don't respect the {@code yyyy-mm-dd} format. */ public DateValue(String date) throws ParseException { if (date == null) { @@ -148,7 +78,7 @@ public DateValue(String date) throws ParseException { /** * Constructor. - * + * * @param date Date. * @throws NullPointerException If {@code date} is {@code null}. */ @@ -198,7 +128,78 @@ public DateValue(LocalDate localDate) { year = localDate.getYear(); } - /** {@inheritDoc} */ + /** + * Makes an instance of date value from a day of month, a month and an year. + * + * @param year Year. + * @param month Month. + * @param dayOfTheMonth Day of the month. + * @return An instance of date value. + */ + public static DateValue of(int year, int month, int dayOfTheMonth) { + return new DateValue(year, month, dayOfTheMonth); + } + + /** + * Makes an instance of date value from a {@code String} in format {@code yyyy-mm-dd}. + * + * @param date Date in {@code String} format ({@code yyyy-mm-dd}). + * @return An instance of date value. + * @throws NullPointerException If {@code date} is {@code null}. + * @throws ParseException If {@code date} don't respect the {@code yyyy-mm-dd} format. + */ + public static DateValue parse(String date) throws ParseException { + return new DateValue(date); + } + + /** + * Makes an instance of date value from a {@link Date}. + * + * @param date Date. + * @return An instance of date value. + * @throws NullPointerException If {@code date} is {@code null}. + */ + public static DateValue from(Date date) { + return new DateValue(date); + } + + /** + * Makes an instance of date value from a {@link Calendar}. + * + * @param calendar Calendar. + * @return An instance of date value. + * @throws NullPointerException If {@code calendar} is {@code null}. + * @since 1.1.0 + */ + public static DateValue from(Calendar calendar) { + return new DateValue(calendar); + } + + /** + * Makes an instance of date value from a {@link LocalDate}. + * + * @param localDate LocalDate. + * @return An instance of date value. + * @throws NullPointerException If {@code localDate} is {@code null}. + * @since 2.0.0 + */ + public static DateValue from(LocalDate localDate) { + return new DateValue(localDate); + } + + /** + * Makes an instance of the date value corresponding to now. + * + * @return An instance of date value. + * @since 1.1.0 + */ + public static DateValue now() { + return from(Calendar.getInstance()); + } + + /** + * {@inheritDoc} + */ @Override public DateValue getDate() { return this; @@ -210,7 +211,7 @@ public boolean isMidnight() { /** * Returns the day of the month. - * + * * @return The day of the month. */ public int getDayOfTheMonth() { @@ -219,7 +220,7 @@ public int getDayOfTheMonth() { /** * Returns the month. - * + * * @return The month. */ public int getMonth() { @@ -228,7 +229,7 @@ public int getMonth() { /** * Returns the year. - * + * * @return The year. */ public int getYear() { @@ -266,20 +267,15 @@ public int hashCode() { public int compareTo(DateValue other) { if (year < other.year) { return -1; - } - else if (year > other.year) { + } else if (year > other.year) { return 1; - } - else if (month < other.month) { + } else if (month < other.month) { return -1; - } - else if (month > other.month) { + } else if (month > other.month) { return 1; - } - else if (dayOfTheMonth < other.dayOfTheMonth) { + } else if (dayOfTheMonth < other.dayOfTheMonth) { return -1; - } - else if (dayOfTheMonth > other.dayOfTheMonth) { + } else if (dayOfTheMonth > other.dayOfTheMonth) { return 1; } return 0; @@ -287,6 +283,7 @@ else if (dayOfTheMonth > other.dayOfTheMonth) { /** * Returns if this date value is before the date value in parameter. + * * @param date The date value to compare to. * @return If this date value is before the date value in parameter. */ @@ -296,6 +293,7 @@ public boolean isBefore(DateValue date) { /** * Returns if this date value is after the date value in parameter. + * * @param date The date value to compare to. * @return If this date value is after the date value in parameter. */ @@ -305,6 +303,7 @@ public boolean isAfter(DateValue date) { /** * Moves the date with the value in parameter. + * * @param date Value to move the date. * @return The date moved. */ @@ -333,6 +332,7 @@ public DateValue move(DateValue date) { /** * Moves the date with the value in parameter. + * * @param time Value to move the date. * @return The date/time moved. */ @@ -344,8 +344,7 @@ public DateTimeValue move(TimeValue time) { int days = hours / 24; if (hours > 0) { hours -= days * 24; - } - else { + } else { hours += days * 24; } if (hours < 0) { @@ -357,11 +356,12 @@ public DateTimeValue move(TimeValue time) { DateValue movedDateValue = dateValue.move(DateValue.of(0, 0, days)); return DateTimeValue.of(movedDateValue, TimeValue.of(hours, movedTimeValue.getMinutes(), - movedTimeValue.getSeconds(), movedTimeValue.getNanoSeconds())); + movedTimeValue.getSeconds(), movedTimeValue.getNanoSeconds())); } /** * Moves the date with the value in parameter. + * * @param dateTime Value to move the date. * @return The date/time moved. */ @@ -372,6 +372,7 @@ public DateTimeValue move(DateTimeValue dateTime) { /** * Returns the reverse of the date. + * * @return The reverse. */ public DateValue reverse() { diff --git a/src/main/java/org/assertj/db/type/DateValueContainer.java b/src/main/java/org/assertj/db/type/DateValueContainer.java index 5c9a2aef..6c658606 100644 --- a/src/main/java/org/assertj/db/type/DateValueContainer.java +++ b/src/main/java/org/assertj/db/type/DateValueContainer.java @@ -8,27 +8,27 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.type; /** * This interface indicates container of {@link DateValue}. - * + * * @author Régis Pouiller - * */ public interface DateValueContainer { /** * Returns the date. - * + * * @return The date. */ DateValue getDate(); /** * Returns if it is midnight. + * * @return {@code true} if it is midnight. */ boolean isMidnight(); diff --git a/src/main/java/org/assertj/db/type/DbElement.java b/src/main/java/org/assertj/db/type/DbElement.java index 483ac321..1fbe3a86 100644 --- a/src/main/java/org/assertj/db/type/DbElement.java +++ b/src/main/java/org/assertj/db/type/DbElement.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.type; @@ -16,7 +16,6 @@ * Element in a database. * * @author Régis Pouiller - * */ public interface DbElement { } diff --git a/src/main/java/org/assertj/db/type/Request.java b/src/main/java/org/assertj/db/type/Request.java index 7772194f..e4793557 100644 --- a/src/main/java/org/assertj/db/type/Request.java +++ b/src/main/java/org/assertj/db/type/Request.java @@ -8,17 +8,21 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.type; -import org.assertj.db.type.lettercase.LetterCase; - -import javax.sql.DataSource; -import java.sql.*; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.ResultSetMetaData; +import java.sql.SQLException; import java.util.ArrayList; import java.util.Arrays; import java.util.List; +import javax.sql.DataSource; + +import org.assertj.db.type.lettercase.LetterCase; /** * A request in the database to get values. @@ -35,29 +39,28 @@ * This {@link Request} point to a request without parameter in a H2 database in memory like indicated in the * {@link Source}. *

- * + * *

  * Source source = new Source("jdbc:h2:mem:test", "sa", "");
  * Request request = new Request(source, "select title from movie;");
  * 
- * + * * *
  • *

    * Below the {@link Request} point to a request with {@code 2000} in parameter.
    * The {@link Request} use a {@code DataSource} instead of a {@link Source} like above. *

    - * + * *
    
      * DataSource dataSource = ...;
      * Request request = new Request(dataSource, "select title from movie where year > ?;", 2000);
      * 
    - * + * *
  • * - * + * * @author Régis Pouiller - * */ public class Request extends AbstractDbData { @@ -79,9 +82,9 @@ public Request() { /** * Constructor with a connection. - * - * @param source Source to connect to the database. - * @param request SQL Request to get the values. + * + * @param source Source to connect to the database. + * @param request SQL Request to get the values. * @param parameters Parameters of the SQL request. */ public Request(Source source, String request, Object... parameters) { @@ -92,9 +95,9 @@ public Request(Source source, String request, Object... parameters) { /** * Constructor with a data source. - * + * * @param dataSource Data source. - * @param request SQL Request to get the values. + * @param request SQL Request to get the values. * @param parameters Parameters of the SQL request. */ public Request(DataSource dataSource, String request, Object... parameters) { @@ -105,7 +108,7 @@ public Request(DataSource dataSource, String request, Object... parameters) { /** * Returns the SQL request. - * + * * @return The SQL request. */ public String getRequest() { @@ -114,7 +117,7 @@ public String getRequest() { /** * Sets the SQL request. - * + * * @param request The SQL request. * @return The SQL request. * @throws NullPointerException If the {@link #request} field is {@code null}. @@ -130,7 +133,7 @@ public Request setRequest(String request) { /** * The parameters of the SQL request. - * + * * @return The SQL request. */ public Object[] getParameters() { @@ -142,7 +145,7 @@ public Object[] getParameters() { /** * Sets the parameters of the SQL request. - * + * * @param parameters The parameters of the SQL request. * @return The parameters of the SQL request. */ @@ -153,7 +156,7 @@ public Request setParameters(Object... parameters) { /** * Sets the primary keys name. - * + * * @param pksName The primary keys name. * @return {@code this} instance. */ @@ -169,7 +172,7 @@ public Request setPksName(String... pksName) { * This method use the {@link ResultSetMetaData} from the resultSet parameter to list the name of the * columns. *

    - * + * * @param resultSet The {@code ResultSet}. * @throws SQLException A SQL Exception */ @@ -187,11 +190,11 @@ private void collectColumnsNameFromResultSet(ResultSet resultSet) throws SQLExce /** * Specific implementation of the loading for a {@code Request}. - * - * @see AbstractDbData#loadImpl(Connection) + * * @param connection {@link Connection} to the database provided by {@link AbstractDbData#load()} private method. * @throws NullPointerException If the {@link #request} field is {@code null}. - * @throws SQLException SQL Exception. + * @throws SQLException SQL Exception. + * @see AbstractDbData#loadImpl(Connection) */ @Override protected void loadImpl(Connection connection) throws SQLException { diff --git a/src/main/java/org/assertj/db/type/Row.java b/src/main/java/org/assertj/db/type/Row.java index 4cc64e4a..384becfb 100644 --- a/src/main/java/org/assertj/db/type/Row.java +++ b/src/main/java/org/assertj/db/type/Row.java @@ -8,19 +8,19 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.type; +import java.util.ArrayList; +import java.util.List; + import org.assertj.db.type.lettercase.LetterCase; import org.assertj.db.type.lettercase.WithColumnLetterCase; import org.assertj.db.type.lettercase.WithPrimaryKeyLetterCase; import org.assertj.db.util.NameComparator; import org.assertj.db.util.Values; -import java.util.ArrayList; -import java.util.List; - /** * Row in a {@link AbstractDbData}. *

    @@ -31,16 +31,11 @@ * {@link Request} by using {@link AbstractDbData#getRow(int)} or with the list by using * {@link AbstractDbData#getRowsList()}. *

    - * + * * @author Régis Pouiller - * */ public class Row implements DbElement, WithColumnLetterCase, WithPrimaryKeyLetterCase { - /** - * List of the primary key names. - */ - private List pksNameList; /** * The list of columns name. */ @@ -51,22 +46,28 @@ public class Row implements DbElement, WithColumnLetterCase, WithPrimaryKeyLette private final List valuesList; /** * Letter case of the columns. + * * @since 1.1.0 */ private final LetterCase columnLetterCase; /** * Letter case of the primary keys. + * * @since 1.1.0 */ private final LetterCase primaryKeyLetterCase; + /** + * List of the primary key names. + */ + private List pksNameList; /** * Constructor of the row with visibility in the package. - * - * @param pksNameList The list of the primary keys name. - * @param columnsNameList The list of the columns name. - * @param valuesList The values in the row. - * @param columnLetterCase The letter case of the columns. + * + * @param pksNameList The list of the primary keys name. + * @param columnsNameList The list of the columns name. + * @param valuesList The values in the row. + * @param columnLetterCase The letter case of the columns. * @param primaryKeyLetterCase The letter case of the primary keys. */ Row(List pksNameList, List columnsNameList, List valuesList, @@ -97,13 +98,22 @@ public LetterCase getPrimaryKeyLetterCase() { /** * Return the list of the primary keys name. - * + * * @return The list of the primary keys name. */ public List getPksNameList() { return pksNameList; } + /** + * Sets the list of the primary keys name. + * + * @param pksNameList The list of the primary keys name. + */ + void setPksNameList(List pksNameList) { + this.pksNameList = pksNameList; + } + /** * Return the list of the primary keys value. * @@ -121,18 +131,9 @@ public List getPksValueList() { return pksValueList; } - /** - * Sets the list of the primary keys name. - * - * @param pksNameList The list of the primary keys name. - */ - void setPksNameList(List pksNameList) { - this.pksNameList = pksNameList; - } - /** * Returns the list of the columns name. - * + * * @return The list of the columns name. */ public List getColumnsNameList() { @@ -141,7 +142,7 @@ public List getColumnsNameList() { /** * Returns the list of the values for the data from database. - * + * * @return The list of the values. */ public List getValuesList() { @@ -150,7 +151,7 @@ public List getValuesList() { /** * Returns the primary keys value. - * + * * @return The primary keys value. */ public Value[] getPksValues() { @@ -167,7 +168,7 @@ public Value[] getPksValues() { /** * Returns if the values of the primary keys are equal to the values in parameter. - * + * * @param pksValues The values of the primary keys to compare. * @return If the values of the primary keys are equal. */ @@ -187,6 +188,7 @@ public boolean hasPksValuesEqualTo(Value[] pksValues) { /** * Returns if the values are equal to the value of the {@code Row} in parameter. + * * @param row The {@code Row} to compare with. * @return If the values are equal. */ @@ -206,7 +208,7 @@ public boolean hasValues(Row row) { /** * Returns the value corresponding to the column index. - * + * * @param index The index * @return The value */ @@ -216,7 +218,7 @@ public Value getColumnValue(int index) { /** * Returns the value corresponding to the column name in the {@code Row}. - * + * * @param columnName The column name (must be not {@code null}). * @return The value * @throws NullPointerException If the {@code columnName} parameter is {@code null}. diff --git a/src/main/java/org/assertj/db/type/Source.java b/src/main/java/org/assertj/db/type/Source.java index b649caf7..afee685e 100644 --- a/src/main/java/org/assertj/db/type/Source.java +++ b/src/main/java/org/assertj/db/type/Source.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.type; @@ -20,9 +20,8 @@ * Source source = new Source("jdbc:h2:mem:test", "sa", ""); * *

    That creates a source to a H2 database in memory.

    - * + * * @author Régis Pouiller - * */ public class Source { @@ -41,9 +40,9 @@ public class Source { /** * Constructor with the information. - * - * @param url URL to the database. - * @param user User to connect. + * + * @param url URL to the database. + * @param user User to connect. * @param password Password to connect. */ public Source(String url, String user, String password) { @@ -54,7 +53,7 @@ public Source(String url, String user, String password) { /** * Returns the URL to the database. - * + * * @return The URL to the database. */ public String getUrl() { @@ -63,7 +62,7 @@ public String getUrl() { /** * Returns the user to connect. - * + * * @return The user to connect. */ public String getUser() { @@ -72,7 +71,7 @@ public String getUser() { /** * Returns the password to connect. - * + * * @return The password to connect. */ public String getPassword() { diff --git a/src/main/java/org/assertj/db/type/SourceWithLetterCase.java b/src/main/java/org/assertj/db/type/SourceWithLetterCase.java index 1986a379..573a089a 100644 --- a/src/main/java/org/assertj/db/type/SourceWithLetterCase.java +++ b/src/main/java/org/assertj/db/type/SourceWithLetterCase.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.type; @@ -39,15 +39,15 @@ public class SourceWithLetterCase extends Source implements WithLetterCase { /** * Constructor with the information. * - * @param url URL to the database. - * @param user User to connect. - * @param password Password to connect. - * @param tableLetterCase Letter case of the tables. - * @param columnLetterCase Letter case of the columns. + * @param url URL to the database. + * @param user User to connect. + * @param password Password to connect. + * @param tableLetterCase Letter case of the tables. + * @param columnLetterCase Letter case of the columns. * @param primaryKeyLetterCase Letter case of the primary keys. */ public SourceWithLetterCase(String url, String user, String password, - LetterCase tableLetterCase, LetterCase columnLetterCase, LetterCase primaryKeyLetterCase) { + LetterCase tableLetterCase, LetterCase columnLetterCase, LetterCase primaryKeyLetterCase) { super(url, user, password); this.tableLetterCase = tableLetterCase; diff --git a/src/main/java/org/assertj/db/type/Table.java b/src/main/java/org/assertj/db/type/Table.java index c2852724..8228ea68 100644 --- a/src/main/java/org/assertj/db/type/Table.java +++ b/src/main/java/org/assertj/db/type/Table.java @@ -8,19 +8,24 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.type; -import org.assertj.db.exception.AssertJDBException; -import org.assertj.db.type.lettercase.LetterCase; -import org.assertj.db.util.NameComparator; - -import javax.sql.DataSource; -import java.sql.*; +import java.sql.Connection; +import java.sql.DatabaseMetaData; +import java.sql.ResultSet; +import java.sql.ResultSetMetaData; +import java.sql.SQLException; +import java.sql.Statement; import java.util.ArrayList; import java.util.Arrays; import java.util.List; +import javax.sql.DataSource; + +import org.assertj.db.exception.AssertJDBException; +import org.assertj.db.type.lettercase.LetterCase; +import org.assertj.db.util.NameComparator; /** * A table in the database to read to get the values. @@ -88,123 +93,23 @@ public class Table extends AbstractDbData
    { private String[] columnsToExclude; /** * The columns to order. + * * @since 1.2.0 */ private Order[] columnsToOrder; /** * Start delimiter for column name and table name. + * * @since 1.2.0 */ private Character startDelimiter = null; /** * End delimiter for column name and table name. + * * @since 1.2.0 */ private Character endDelimiter = null; - /** - * Indicates an order with the name on which is the order and the type. - * @see org.assertj.db.type.Table.Order.OrderType - */ - public static class Order { - /** - * The name of the order. - */ - private final String name; - /** - * The type of the order. - */ - private final OrderType type; - - /** - * Enumeration of the type of order. - */ - public enum OrderType { - /** - * Ascending order. - */ - ASC, - /** - * Descending order. - */ - DESC - } - - /** - * Builds an ascending order. - * @param name The name of the order. - * @return An ascending order. - */ - public static Order asc(String name) { - return getOrder(name, OrderType.ASC); - } - - /** - * Builds the descending order. - * @param name The name of the order. - * @return The descending order. - */ - public static Order desc(String name) { - return getOrder(name, OrderType.DESC); - } - - /** - * Builds an order. - * @param name The name of the order. - * @param type The type of the order. - * @return The instantiated order. - */ - private static Order getOrder(String name, OrderType type) { - return new Order(name, type); - } - - /** - * Constructor. - * @param name The name of the order. - * @param type The type of the order. - */ - private Order(String name, OrderType type) { - this.name = name; - this.type = type; - } - - /** - * Returns the name of the order. - * @return The name of the order. - */ - public String getName() { - return name; - } - - /** - * Returns the type of the order. - * @return The type of the order. - */ - public OrderType getType() { - return type; - } - - @Override - public int hashCode() { - int hash = 7; - hash = 31 * hash + (type == null ? 0 : type.hashCode()); - hash = 31 * hash + (name == null ? 0 : name.hashCode()); - return hash; - } - - @Override - public boolean equals(Object obj) { - if (obj instanceof Order) { - Order order = (Order) obj; - if (order.type == type) { - return (name == null && order.name == null) || - (name != null && name.equals(order.name)); - } - } - return false; - } - } - /** * Default constructor. */ @@ -219,7 +124,7 @@ public Table() { * @param name Name of the table. */ public Table(Source source, String name) { - this(source, name, (String[]) null, (String[]) null); + this(source, name, null, (String[]) null); } /** @@ -243,7 +148,7 @@ public Table(Source source, String name, String[] columnsToCheck, String[] colum * @param name Name of the table. */ public Table(DataSource dataSource, String name) { - this(dataSource, name, (String[]) null, (String[]) null); + this(dataSource, name, null, (String[]) null); } /** @@ -263,8 +168,9 @@ public Table(DataSource dataSource, String name, String[] columnsToCheck, String /** * Constructor with a {@link Source} and the name of the table. * - * @param source {@link Source} to connect to the database. - * @param name Name of the table. + * @param source {@link Source} to connect to the database. + * @param name Name of the table. + * @param columnsToOrder List of column to use as ORDER BY * @since 1.2.0 */ public Table(Source source, String name, Order[] columnsToOrder) { @@ -276,6 +182,7 @@ public Table(Source source, String name, Order[] columnsToOrder) { * * @param source {@link Source} to connect to the database. * @param name Name of the table. + * @param columnsToOrder List of column to use as ORDER BY * @param columnsToCheck Array of the name of the columns to check. If {@code null} that means to check all the * columns. * @param columnsToExclude Array of the name of the columns to exclude. If {@code null} that means to exclude no @@ -289,8 +196,9 @@ public Table(Source source, String name, Order[] columnsToOrder, String[] column /** * Constructor with a dataSource and the name of the table. * - * @param dataSource DataSource of the database. - * @param name Name of the table. + * @param dataSource DataSource of the database. + * @param name Name of the table. + * @param columnsToOrder List of column to use as ORDER BY * @since 1.2.0 */ public Table(DataSource dataSource, String name, Order[] columnsToOrder) { @@ -302,6 +210,7 @@ public Table(DataSource dataSource, String name, Order[] columnsToOrder) { * * @param dataSource DataSource of the database. * @param name Name of the table. + * @param columnsToOrder List of column to use as ORDER BY * @param columnsToCheck Array of the name of the columns to check. If {@code null} that means to check all the * columns. * @param columnsToExclude Array of the name of the columns to exclude. If {@code null} that means to exclude no @@ -315,10 +224,10 @@ public Table(DataSource dataSource, String name, Order[] columnsToOrder, String[ /** * Constructor with a {@link Source} and the name of the table. * - * @param source {@link Source} to connect to the database. - * @param name Name of the table. - * @param startDelimiter Start delimiter for column name and table name. - * @param endDelimiter End delimiter for column name and table name. + * @param source {@link Source} to connect to the database. + * @param name Name of the table. + * @param startDelimiter Start delimiter for column name and table name. + * @param endDelimiter End delimiter for column name and table name. * @since 1.2.0 */ public Table(Source source, String name, Character startDelimiter, Character endDelimiter) { @@ -346,10 +255,10 @@ public Table(Source source, String name, Character startDelimiter, Character end /** * Constructor with a dataSource and the name of the table. * - * @param dataSource DataSource of the database. - * @param name Name of the table. - * @param startDelimiter Start delimiter for column name and table name. - * @param endDelimiter End delimiter for column name and table name. + * @param dataSource DataSource of the database. + * @param name Name of the table. + * @param startDelimiter Start delimiter for column name and table name. + * @param endDelimiter End delimiter for column name and table name. * @since 1.2.0 */ public Table(DataSource dataSource, String name, Character startDelimiter, Character endDelimiter) { @@ -377,10 +286,11 @@ public Table(DataSource dataSource, String name, Character startDelimiter, Chara /** * Constructor with a {@link Source} and the name of the table. * - * @param source {@link Source} to connect to the database. - * @param name Name of the table. - * @param startDelimiter Start delimiter for column name and table name. - * @param endDelimiter End delimiter for column name and table name. + * @param source {@link Source} to connect to the database. + * @param name Name of the table. + * @param startDelimiter Start delimiter for column name and table name. + * @param endDelimiter End delimiter for column name and table name. + * @param columnsToOrder List of column to use as ORDER BY * @since 1.2.0 */ public Table(Source source, String name, Character startDelimiter, Character endDelimiter, Order[] columnsToOrder) { @@ -394,6 +304,7 @@ public Table(Source source, String name, Character startDelimiter, Character end * @param name Name of the table. * @param startDelimiter Start delimiter for column name and table name. * @param endDelimiter End delimiter for column name and table name. + * @param columnsToOrder List of column to use as ORDER BY * @param columnsToCheck Array of the name of the columns to check. If {@code null} that means to check all the * columns. * @param columnsToExclude Array of the name of the columns to exclude. If {@code null} that means to exclude no @@ -414,10 +325,11 @@ public Table(Source source, String name, Character startDelimiter, Character end /** * Constructor with a dataSource and the name of the table. * - * @param dataSource DataSource of the database. - * @param name Name of the table. - * @param startDelimiter Start delimiter for column name and table name. - * @param endDelimiter End delimiter for column name and table name. + * @param dataSource DataSource of the database. + * @param name Name of the table. + * @param startDelimiter Start delimiter for column name and table name. + * @param endDelimiter End delimiter for column name and table name. + * @param columnsToOrder List of column to use as ORDER BY * @since 1.2.0 */ public Table(DataSource dataSource, String name, Character startDelimiter, Character endDelimiter, Order[] columnsToOrder) { @@ -431,6 +343,7 @@ public Table(DataSource dataSource, String name, Character startDelimiter, Chara * @param name Name of the table. * @param startDelimiter Start delimiter for column name and table name. * @param endDelimiter End delimiter for column name and table name. + * @param columnsToOrder List of column to use as ORDER BY * @param columnsToCheck Array of the name of the columns to check. If {@code null} that means to check all the * columns. * @param columnsToExclude Array of the name of the columns to exclude. If {@code null} that means to exclude no @@ -474,7 +387,9 @@ public Table setName(String name) { return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public Table setDataSource(DataSource dataSource) { Table table = super.setDataSource(dataSource); @@ -482,7 +397,9 @@ public Table setDataSource(DataSource dataSource) { return table; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public Table setSource(Source source) { Table table = super.setSource(source); @@ -501,7 +418,7 @@ private void setNameFromDb() { DatabaseMetaData metaData = connection.getMetaData(); try (ResultSet tableResultSet = metaData.getTables(getCatalog(connection), getSchema(connection), null, - new String[] { "TABLE" })) { + new String[]{"TABLE"})) { while (tableResultSet.next()) { String tableName = tableResultSet.getString("TABLE_NAME"); if (tableLetterCase.isEqual(tableName, name)) { @@ -679,6 +596,7 @@ public Character getStartDelimiter() { * Sets the start delimiter for column name and table name. * * @param startDelimiter The start delimiter for column name and table name. + * @return The actual instance. * @see #getStartDelimiter() * @since 1.2.0 */ @@ -702,6 +620,7 @@ public Character getEndDelimiter() { * Sets the end delimiter for column name and table name. * * @param endDelimiter The end delimiter for column name and table name. + * @return The actual instance. * @see #getEndDelimiter() * @since 1.2.0 */ @@ -712,8 +631,9 @@ public Table setEndDelimiter(Character endDelimiter) { /** * Encode the column name and table name. + * * @param name The column name or table name. - * The encoded column name or table name. + * The encoded column name or table name. */ private String encode(String name) { StringBuilder stringBuilder = new StringBuilder(); @@ -791,7 +711,7 @@ private void collectColumnsNameFromResultSet(ResultSet resultSet) throws SQLExce for (int i = 1; i <= resultSetMetaData.getColumnCount(); i++) { String columnName = letterCase.convert(resultSetMetaData.getColumnLabel(i)); if (columnsToExcludeList == null - || !NameComparator.INSTANCE.contains(columnsToExcludeList, columnName, letterCase)) { + || !NameComparator.INSTANCE.contains(columnsToExcludeList, columnName, letterCase)) { columnsNameList.add(columnName); } @@ -816,7 +736,7 @@ private void collectPrimaryKeyName(Connection connection) throws SQLException { DatabaseMetaData metaData = connection.getMetaData(); String tableName = name; - try (ResultSet resultSet = metaData.getTables(catalog, schema, null, new String[] { "TABLE" })) { + try (ResultSet resultSet = metaData.getTables(catalog, schema, null, new String[]{"TABLE"})) { LetterCase letterCase = getTableLetterCase(); while (resultSet.next()) { String tableResult = resultSet.getString("TABLE_NAME"); @@ -865,4 +785,114 @@ protected void loadImpl(Connection connection) throws SQLException { sortRows(); } } + + /** + * Indicates an order with the name on which is the order and the type. + * + * @see org.assertj.db.type.Table.Order.OrderType + */ + public static class Order { + /** + * The name of the order. + */ + private final String name; + /** + * The type of the order. + */ + private final OrderType type; + + /** + * Constructor. + * + * @param name The name of the order. + * @param type The type of the order. + */ + private Order(String name, OrderType type) { + this.name = name; + this.type = type; + } + + /** + * Builds an ascending order. + * + * @param name The name of the order. + * @return An ascending order. + */ + public static Order asc(String name) { + return getOrder(name, OrderType.ASC); + } + + /** + * Builds the descending order. + * + * @param name The name of the order. + * @return The descending order. + */ + public static Order desc(String name) { + return getOrder(name, OrderType.DESC); + } + + /** + * Builds an order. + * + * @param name The name of the order. + * @param type The type of the order. + * @return The instantiated order. + */ + private static Order getOrder(String name, OrderType type) { + return new Order(name, type); + } + + /** + * Returns the name of the order. + * + * @return The name of the order. + */ + public String getName() { + return name; + } + + /** + * Returns the type of the order. + * + * @return The type of the order. + */ + public OrderType getType() { + return type; + } + + @Override + public int hashCode() { + int hash = 7; + hash = 31 * hash + (type == null ? 0 : type.hashCode()); + hash = 31 * hash + (name == null ? 0 : name.hashCode()); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (obj instanceof Order) { + Order order = (Order) obj; + if (order.type == type) { + return (name == null && order.name == null) || + (name != null && name.equals(order.name)); + } + } + return false; + } + + /** + * Enumeration of the type of order. + */ + public enum OrderType { + /** + * Ascending order. + */ + ASC, + /** + * Descending order. + */ + DESC + } + } } diff --git a/src/main/java/org/assertj/db/type/TimeValue.java b/src/main/java/org/assertj/db/type/TimeValue.java index 0fdc8dd7..0c2cedcd 100644 --- a/src/main/java/org/assertj/db/type/TimeValue.java +++ b/src/main/java/org/assertj/db/type/TimeValue.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.type; @@ -19,29 +19,12 @@ /** * This class represents a time value in the database. - * + * * @author Régis Pouiller * @author Julien Roy - * */ public class TimeValue implements Comparable { - /** - * Hours. - */ - private final int hours; - /** - * Minutes. - */ - private final int minutes; - /** - * Seconds. - */ - private final int seconds; - /** - * Nanoseconds. - */ - private final int nanoSeconds; /** * Indicates where there are the digits for {@code String} for {@link TimeValue#TimeValue(String)}. */ @@ -56,108 +39,29 @@ public class TimeValue implements Comparable { * {@link TimeValue#TimeValue(String)}. */ private static final String TIME_FORMAT_WITH_NANO = "\\d\\d:\\d\\d:\\d\\d.\\d\\d\\d\\d\\d\\d\\d\\d\\d"; - - /** - * Makes an instance of time value from a hours, minutes, seconds and nanoseconds. - * - * @param hours Hours. - * @param minutes Minutes. - * @param seconds Seconds. - * @param nanoSeconds Nanoseconds. - * @return An instance of time value. - */ - public static TimeValue of(int hours, int minutes, int seconds, int nanoSeconds) { - return new TimeValue(hours, minutes, seconds, nanoSeconds); - } - - /** - * Makes an instance of time value from a hours, minutes and seconds. - * - * @param hours Hours. - * @param minutes Minutes. - * @param seconds Seconds. - * @return An instance of time value. - */ - public static TimeValue of(int hours, int minutes, int seconds) { - return new TimeValue(hours, minutes, seconds); - } - - /** - * Makes an instance of time value from a hours and minutes. - * - * @param hours Hours. - * @param minutes Minutes. - * @return An instance of time value. - */ - public static TimeValue of(int hours, int minutes) { - return new TimeValue(hours, minutes); - } - /** - * Makes an instance of time value from a {@code String} in {@code hh:mm}, {@code hh:mm:ss} or - * {@code hh:mm:ss.nnnnnnnnn} format. - * - * @param time Time in {@code String} format ({@code hh:mm}, {@code hh:mm:ss} or {@code hh:mm:ss.nnnnnnnnn}). - * @return An instance of time value. - * @throws NullPointerException If {@code time} is {@code null}. - * @throws ParseException If {@code time} don't respect the {@code hh:mm}, {@code hh:mm:ss} or - * {@code hh:mm:ss.nnnnnnnnn} format. - */ - public static TimeValue parse(String time) throws ParseException { - return new TimeValue(time); - } - - /** - * Makes an instance of time value from a {@link Time}. - * - * @param time Time. - * @throws NullPointerException If {@code time} is {@code null}. - * @return An instance of time value. + * Hours. */ - public static TimeValue from(Time time) { - return new TimeValue(time); - } - + private final int hours; /** - * Makes an instance of time value from a {@link Calendar}. - * - * @param calendar Calendar. - * @throws NullPointerException If {@code calendar} is {@code null}. - * @return An instance of time value. - * @since 1.1.0 + * Minutes. */ - public static TimeValue from(Calendar calendar) { - return new TimeValue(calendar); - } - + private final int minutes; /** - * Makes an instance of time value from a {@link LocalTime}. - * - * @param localTime LocalTime. - * @throws NullPointerException If {@code localTime} is {@code null}. - * @return An instance of time value. - * @since 2.0.0 + * Seconds. */ - public static TimeValue from(LocalTime localTime) { - return new TimeValue(localTime); - } - + private final int seconds; /** - * Makes an instance of the time value corresponding to now. - * - * @return An instance of time value. - * @since 1.1.0 + * Nanoseconds. */ - public static TimeValue now() { - return from(Calendar.getInstance()); - } + private final int nanoSeconds; /** * Constructor. - * - * @param hours Hours. - * @param minutes Minutes. - * @param seconds Seconds. + * + * @param hours Hours. + * @param minutes Minutes. + * @param seconds Seconds. * @param nanoSeconds Nanoseconds. */ public TimeValue(int hours, int minutes, int seconds, int nanoSeconds) { @@ -169,8 +73,8 @@ public TimeValue(int hours, int minutes, int seconds, int nanoSeconds) { /** * Constructor. - * - * @param hours Hours. + * + * @param hours Hours. * @param minutes Minutes. * @param seconds Seconds. */ @@ -180,8 +84,8 @@ public TimeValue(int hours, int minutes, int seconds) { /** * Constructor. - * - * @param hours Hours. + * + * @param hours Hours. * @param minutes Minutes. */ public TimeValue(int hours, int minutes) { @@ -190,11 +94,11 @@ public TimeValue(int hours, int minutes) { /** * Constructor. - * + * * @param time Time in {@code String} format ({@code hh:mm}, {@code hh:mm:ss} or {@code hh:mm:ss.nnnnnnnnn}). * @throws NullPointerException If {@code time} is {@code null}. - * @throws ParseException If {@code time} don't respect the {@code hh:mm}, {@code hh:mm:ss} or - * {@code hh:mm:ss.nnnnnnnnn} format. + * @throws ParseException If {@code time} don't respect the {@code hh:mm}, {@code hh:mm:ss} or + * {@code hh:mm:ss.nnnnnnnnn} format. */ public TimeValue(String time) throws ParseException { if (time == null) { @@ -223,7 +127,7 @@ public TimeValue(String time) throws ParseException { /** * Constructor. - * + * * @param time Time. * @throws NullPointerException If {@code time} is {@code null}. */ @@ -276,9 +180,104 @@ public TimeValue(LocalTime localTime) { nanoSeconds = localTime.getNano(); } + /** + * Makes an instance of time value from a hours, minutes, seconds and nanoseconds. + * + * @param hours Hours. + * @param minutes Minutes. + * @param seconds Seconds. + * @param nanoSeconds Nanoseconds. + * @return An instance of time value. + */ + public static TimeValue of(int hours, int minutes, int seconds, int nanoSeconds) { + return new TimeValue(hours, minutes, seconds, nanoSeconds); + } + + /** + * Makes an instance of time value from a hours, minutes and seconds. + * + * @param hours Hours. + * @param minutes Minutes. + * @param seconds Seconds. + * @return An instance of time value. + */ + public static TimeValue of(int hours, int minutes, int seconds) { + return new TimeValue(hours, minutes, seconds); + } + + /** + * Makes an instance of time value from a hours and minutes. + * + * @param hours Hours. + * @param minutes Minutes. + * @return An instance of time value. + */ + public static TimeValue of(int hours, int minutes) { + return new TimeValue(hours, minutes); + } + + /** + * Makes an instance of time value from a {@code String} in {@code hh:mm}, {@code hh:mm:ss} or + * {@code hh:mm:ss.nnnnnnnnn} format. + * + * @param time Time in {@code String} format ({@code hh:mm}, {@code hh:mm:ss} or {@code hh:mm:ss.nnnnnnnnn}). + * @return An instance of time value. + * @throws NullPointerException If {@code time} is {@code null}. + * @throws ParseException If {@code time} don't respect the {@code hh:mm}, {@code hh:mm:ss} or + * {@code hh:mm:ss.nnnnnnnnn} format. + */ + public static TimeValue parse(String time) throws ParseException { + return new TimeValue(time); + } + + /** + * Makes an instance of time value from a {@link Time}. + * + * @param time Time. + * @return An instance of time value. + * @throws NullPointerException If {@code time} is {@code null}. + */ + public static TimeValue from(Time time) { + return new TimeValue(time); + } + + /** + * Makes an instance of time value from a {@link Calendar}. + * + * @param calendar Calendar. + * @return An instance of time value. + * @throws NullPointerException If {@code calendar} is {@code null}. + * @since 1.1.0 + */ + public static TimeValue from(Calendar calendar) { + return new TimeValue(calendar); + } + + /** + * Makes an instance of time value from a {@link LocalTime}. + * + * @param localTime LocalTime. + * @return An instance of time value. + * @throws NullPointerException If {@code localTime} is {@code null}. + * @since 2.0.0 + */ + public static TimeValue from(LocalTime localTime) { + return new TimeValue(localTime); + } + + /** + * Makes an instance of the time value corresponding to now. + * + * @return An instance of time value. + * @since 1.1.0 + */ + public static TimeValue now() { + return from(Calendar.getInstance()); + } + /** * Returns the hours. - * + * * @return The hours. */ public int getHours() { @@ -287,7 +286,7 @@ public int getHours() { /** * Returns the minutes. - * + * * @return The minutes. */ public int getMinutes() { @@ -296,7 +295,7 @@ public int getMinutes() { /** * Returns the seconds. - * + * * @return The seconds. */ public int getSeconds() { @@ -305,7 +304,7 @@ public int getSeconds() { /** * Returns the nanoseconds. - * + * * @return The nanoseconds. */ public int getNanoSeconds() { @@ -322,7 +321,7 @@ public boolean equals(Object obj) { if (obj instanceof TimeValue) { TimeValue timeValue = (TimeValue) obj; return hours == timeValue.hours && minutes == timeValue.minutes && seconds == timeValue.seconds - && nanoSeconds == timeValue.nanoSeconds; + && nanoSeconds == timeValue.nanoSeconds; } return false; } @@ -342,26 +341,19 @@ public int hashCode() { public int compareTo(TimeValue other) { if (hours < other.hours) { return -1; - } - else if (hours > other.hours) { + } else if (hours > other.hours) { return 1; - } - else if (minutes < other.minutes) { + } else if (minutes < other.minutes) { return -1; - } - else if (minutes > other.minutes) { + } else if (minutes > other.minutes) { return 1; - } - else if (seconds < other.seconds) { + } else if (seconds < other.seconds) { return -1; - } - else if (seconds > other.seconds) { + } else if (seconds > other.seconds) { return 1; - } - else if (nanoSeconds < other.nanoSeconds) { + } else if (nanoSeconds < other.nanoSeconds) { return -1; - } - else if (nanoSeconds > other.nanoSeconds) { + } else if (nanoSeconds > other.nanoSeconds) { return 1; } return 0; @@ -369,6 +361,7 @@ else if (nanoSeconds > other.nanoSeconds) { /** * Returns if this time value is before the time value in parameter. + * * @param time The time value to compare to. * @return If this time value is before the time value in parameter. */ @@ -378,6 +371,7 @@ public boolean isBefore(TimeValue time) { /** * Returns if this time value is after the time value in parameter. + * * @param time The time value to compare to. * @return If this time value is after the time value in parameter. */ @@ -387,6 +381,7 @@ public boolean isAfter(TimeValue time) { /** * Moves the time with the value in parameter. + * * @param time Value to move the date. * @return The date/time moved. */ @@ -403,8 +398,7 @@ public TimeValue move(TimeValue time) { if (nanoSeconds >= 0 || thisNanoSeconds >= -nanoSeconds) { thisNanoSeconds += nanoSeconds; - } - else { + } else { thisNanoSeconds += 1000000000 + nanoSeconds; seconds--; } @@ -412,23 +406,19 @@ public TimeValue move(TimeValue time) { if (seconds > 0 && (thisSeconds + seconds >= 60)) { thisSeconds += seconds - 60; minutes++; - } - else if (seconds >= 0 || thisSeconds >= -seconds) { + } else if (seconds >= 0 || thisSeconds >= -seconds) { thisSeconds += seconds; - } - else { + } else { thisSeconds += 60 + seconds; minutes--; } - if ( minutes > 0 && (thisMinutes + minutes >= 60 )) { + if (minutes > 0 && (thisMinutes + minutes >= 60)) { thisMinutes += minutes - 60; hours++; - } - else if (minutes >= 0 || thisMinutes >= -minutes) { + } else if (minutes >= 0 || thisMinutes >= -minutes) { thisMinutes += minutes; - } - else { + } else { thisMinutes += 60 + minutes; hours--; } @@ -440,6 +430,7 @@ else if (minutes >= 0 || thisMinutes >= -minutes) { /** * Returns the reverse of the time. + * * @return The reverse. */ public TimeValue reverse() { diff --git a/src/main/java/org/assertj/db/type/Value.java b/src/main/java/org/assertj/db/type/Value.java index eadcc8bc..e9794091 100644 --- a/src/main/java/org/assertj/db/type/Value.java +++ b/src/main/java/org/assertj/db/type/Value.java @@ -8,13 +8,10 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.type; -import org.assertj.db.type.lettercase.LetterCase; -import org.assertj.db.type.lettercase.WithColumnLetterCase; - import java.math.BigDecimal; import java.math.BigInteger; import java.sql.Date; @@ -22,6 +19,9 @@ import java.sql.Timestamp; import java.util.UUID; +import org.assertj.db.type.lettercase.LetterCase; +import org.assertj.db.type.lettercase.WithColumnLetterCase; + /** * Value in a {@link Row} or a {@link Column}. *

    @@ -48,13 +48,29 @@ public class Value implements DbElement, WithColumnLetterCase { private final ValueType valueType; /** * Letter case of the columns. + * * @since 1.1.0 */ private final LetterCase columnLetterCase; + /** + * Constructor. + * + * @param columnName The name of the column. + * @param value The value. + * @param columnLetterCase The letter case of the columns. + */ + Value(String columnName, Object value, LetterCase columnLetterCase) { + this.columnName = columnName; + this.value = value; + this.columnLetterCase = columnLetterCase; + valueType = getType(value); + } + /** * Returns a NULL value. - * @param columnName The name of the column. + * + * @param columnName The name of the column. * @param columnLetterCase The letter case of the columns. * @return A NULL value. */ @@ -76,7 +92,7 @@ static ValueType getType(Object object) { return ValueType.BOOLEAN; } if (object instanceof String - || object instanceof Character) { + || object instanceof Character) { return ValueType.TEXT; } @@ -93,33 +109,19 @@ static ValueType getType(Object object) { return ValueType.UUID; } if (object instanceof Byte - || object instanceof Short - || object instanceof Integer - || object instanceof Long - || object instanceof Float - || object instanceof Double - || object instanceof BigDecimal - || object instanceof BigInteger) { + || object instanceof Short + || object instanceof Integer + || object instanceof Long + || object instanceof Float + || object instanceof Double + || object instanceof BigDecimal + || object instanceof BigInteger) { return ValueType.NUMBER; } return ValueType.NOT_IDENTIFIED; } - /** - * Constructor. - * - * @param columnName The name of the column. - * @param value The value. - * @param columnLetterCase The letter case of the columns. - */ - Value(String columnName, Object value, LetterCase columnLetterCase) { - this.columnName = columnName; - this.value = value; - this.columnLetterCase = columnLetterCase; - valueType = getType(value); - } - /** * {@inheritDoc} */ @@ -176,30 +178,22 @@ public String getValueTypeRepresentation() { public boolean isComparisonPossible(Object object) { if (valueType == ValueType.BYTES) { return (object instanceof byte[]); - } - else if (valueType == ValueType.BOOLEAN) { + } else if (valueType == ValueType.BOOLEAN) { return (object instanceof Boolean); - } - else if (valueType == ValueType.TEXT) { + } else if (valueType == ValueType.TEXT) { return (object instanceof String); - } - else if (valueType == ValueType.DATE || valueType == ValueType.DATE_TIME) { - return (object instanceof DateValue ||object instanceof DateTimeValue || object instanceof String); - } - else if (valueType == ValueType.TIME) { + } else if (valueType == ValueType.DATE || valueType == ValueType.DATE_TIME) { + return (object instanceof DateValue || object instanceof DateTimeValue || object instanceof String); + } else if (valueType == ValueType.TIME) { return (object instanceof TimeValue || object instanceof String); - } - else if (valueType == ValueType.NUMBER) { + } else if (valueType == ValueType.NUMBER) { return (object instanceof Number || object instanceof String); - } - else if (valueType == ValueType.UUID) { + } else if (valueType == ValueType.UUID) { return (object instanceof UUID || object instanceof String); - } - else if (valueType == ValueType.NOT_IDENTIFIED) { + } else if (valueType == ValueType.NOT_IDENTIFIED) { if (value == null) { return object == null; - } - else if (object != null) { + } else if (object != null) { return value.getClass().equals(object.getClass()); } } diff --git a/src/main/java/org/assertj/db/type/ValueType.java b/src/main/java/org/assertj/db/type/ValueType.java index 8c98a9c3..1da83def 100644 --- a/src/main/java/org/assertj/db/type/ValueType.java +++ b/src/main/java/org/assertj/db/type/ValueType.java @@ -8,16 +8,15 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.type; /** * Enumeration of the different type of value that are in the database. - * + * * @author Régis Pouiller * @author Otoniel Isidoro - * */ public enum ValueType { @@ -66,30 +65,30 @@ public enum ValueType { */ public static ValueType[] getPossibleTypesForComparison(Object expected) { if (expected instanceof byte[]) { - return new ValueType[] { BYTES }; + return new ValueType[]{BYTES}; } if (expected instanceof Boolean) { - return new ValueType[] { BOOLEAN }; + return new ValueType[]{BOOLEAN}; } if (expected instanceof String) { - return new ValueType[] { ValueType.TEXT, ValueType.NUMBER, ValueType.DATE, ValueType.TIME, ValueType.DATE_TIME, - ValueType.UUID }; + return new ValueType[]{ValueType.TEXT, ValueType.NUMBER, ValueType.DATE, ValueType.TIME, ValueType.DATE_TIME, + ValueType.UUID}; } if (expected instanceof DateValue) { - return new ValueType[] { ValueType.DATE, ValueType.DATE_TIME }; + return new ValueType[]{ValueType.DATE, ValueType.DATE_TIME}; } if (expected instanceof TimeValue) { - return new ValueType[] { ValueType.TIME }; + return new ValueType[]{ValueType.TIME}; } if (expected instanceof DateTimeValue) { - return new ValueType[] { DATE_TIME }; + return new ValueType[]{DATE_TIME}; } if (expected instanceof Number) { - return new ValueType[] { NUMBER }; + return new ValueType[]{NUMBER}; } if (expected instanceof java.util.UUID) { - return new ValueType[] { UUID }; + return new ValueType[]{UUID}; } - return new ValueType[] { NOT_IDENTIFIED }; + return new ValueType[]{NOT_IDENTIFIED}; } } diff --git a/src/main/java/org/assertj/db/type/lettercase/CaseComparison.java b/src/main/java/org/assertj/db/type/lettercase/CaseComparison.java index b2fdd9cb..cefcd763 100644 --- a/src/main/java/org/assertj/db/type/lettercase/CaseComparison.java +++ b/src/main/java/org/assertj/db/type/lettercase/CaseComparison.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.type.lettercase; @@ -16,6 +16,7 @@ /** * Comparison on {@link java.lang.String} which consider the case. + * * @author Régis Pouiller * @since 1.1.0 */ @@ -23,12 +24,14 @@ public interface CaseComparison extends Comparator { /** * Returns the name of the comparison. + * * @return The name of the comparison. */ String getComparisonName(); /** * Returns if {@code value1} is equal to {@code value2}. + * * @param value1 The first value to compare. * @param value2 The second value to compare. * @return If the two values are equal. diff --git a/src/main/java/org/assertj/db/type/lettercase/CaseComparisons.java b/src/main/java/org/assertj/db/type/lettercase/CaseComparisons.java index f794bb7d..81c7d994 100644 --- a/src/main/java/org/assertj/db/type/lettercase/CaseComparisons.java +++ b/src/main/java/org/assertj/db/type/lettercase/CaseComparisons.java @@ -8,12 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.type.lettercase; /** * Comparisons on {@link java.lang.String} which consider the case. + * * @author Régis Pouiller * @since 1.1.0 */ @@ -23,7 +24,6 @@ public enum CaseComparisons implements CaseComparison { * Comparison on {@link java.lang.String} which ignore the case. */ IGNORE { - /** * {@inheritDoc} */ @@ -40,12 +40,10 @@ public int compare(String value1, String value2) { if (value1 == null) { if (value2 == null) { return 0; - } - else { + } else { return -1; } - } - else if (value2 == null) { + } else if (value2 == null) { return 1; } return value1.compareToIgnoreCase(value2); @@ -66,7 +64,6 @@ public boolean isEqual(String value1, String value2) { * Comparison on {@link java.lang.String} which strictly consider the case. */ STRICT { - /** * {@inheritDoc} */ @@ -83,12 +80,10 @@ public int compare(String value1, String value2) { if (value1 == null) { if (value2 == null) { return 0; - } - else { + } else { return -1; } - } - else if (value2 == null) { + } else if (value2 == null) { return 1; } return value1.compareTo(value2); diff --git a/src/main/java/org/assertj/db/type/lettercase/CaseConversion.java b/src/main/java/org/assertj/db/type/lettercase/CaseConversion.java index b41963e4..49fc3697 100644 --- a/src/main/java/org/assertj/db/type/lettercase/CaseConversion.java +++ b/src/main/java/org/assertj/db/type/lettercase/CaseConversion.java @@ -8,12 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.type.lettercase; /** * Conversion of the case of a {@link java.lang.String}. + * * @author Régis Pouiller * @since 1.1.0 */ @@ -21,12 +22,14 @@ public interface CaseConversion { /** * Returns the name of the conversion. + * * @return The name of the conversion. */ String getConversionName(); /** * Converts the {@link java.lang.String} in parameter to another. + * * @param value The {@link java.lang.String} to convert. * @return The result. */ diff --git a/src/main/java/org/assertj/db/type/lettercase/CaseConversions.java b/src/main/java/org/assertj/db/type/lettercase/CaseConversions.java index a1827411..1bd91006 100644 --- a/src/main/java/org/assertj/db/type/lettercase/CaseConversions.java +++ b/src/main/java/org/assertj/db/type/lettercase/CaseConversions.java @@ -8,12 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.type.lettercase; /** * Conversions of the case of a {@link java.lang.String}. + * * @author Régis Pouiller * @since 1.1.0 */ @@ -23,7 +24,6 @@ public enum CaseConversions implements CaseConversion { * Lower conversion of the case of a {@link java.lang.String}. */ LOWER { - /** * {@inheritDoc} */ @@ -47,7 +47,6 @@ public String convert(String value) { * Upper conversion of the case of a {@link java.lang.String}. */ UPPER { - /** * {@inheritDoc} */ @@ -71,7 +70,6 @@ public String convert(String value) { * No conversion of the case of a {@link java.lang.String}. */ NO { - /** * {@inheritDoc} */ diff --git a/src/main/java/org/assertj/db/type/lettercase/LetterCase.java b/src/main/java/org/assertj/db/type/lettercase/LetterCase.java index 9df55d8c..9d84f6cd 100644 --- a/src/main/java/org/assertj/db/type/lettercase/LetterCase.java +++ b/src/main/java/org/assertj/db/type/lettercase/LetterCase.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.type.lettercase; @@ -17,11 +17,16 @@ /** * The letter case which indicates a case conversion and a case comparison. + * * @author Régis Pouiller * @since 1.1.0 */ public class LetterCase implements CaseConversion, CaseComparison { + /** + * The cache containing the different possible letter case after the first instantiation. + */ + private static Map> cache; /** * The default letter case for table. */ @@ -34,24 +39,29 @@ public class LetterCase implements CaseConversion, CaseComparison { * The default letter case for table. */ public static final LetterCase PRIMARY_KEY_DEFAULT = getLetterCase(CaseConversions.UPPER, CaseComparisons.IGNORE); - /** * The conversion of the case of a {@link java.lang.String}. */ private final CaseConversion conversion; - /** * The comparison on {@link java.lang.String} which consider the case. */ private final CaseComparison comparison; /** - * The cache containing the different possible letter case after the first instantiation. + * Constructor. + * + * @param conversion The conversion of the case of a {@link java.lang.String}. + * @param comparison The comparison on {@link java.lang.String} which consider the case. */ - private static Map> cache; + private LetterCase(CaseConversion conversion, CaseComparison comparison) { + this.conversion = conversion; + this.comparison = comparison; + } /** * Returns a instance of a letter case. + * * @param conversion The conversion of the case of a {@link java.lang.String}. * @param comparison The comparison on {@link java.lang.String} which consider the case. * @return An instance of a letter case. @@ -83,16 +93,6 @@ public static synchronized LetterCase getLetterCase(CaseConversion conversion, C return letterCase; } - /** - * Constructor. - * @param conversion The conversion of the case of a {@link java.lang.String}. - * @param comparison The comparison on {@link java.lang.String} which consider the case. - */ - private LetterCase(CaseConversion conversion, CaseComparison comparison) { - this.conversion = conversion; - this.comparison = comparison; - } - /** * {@inheritDoc} */ diff --git a/src/main/java/org/assertj/db/type/lettercase/WithColumnLetterCase.java b/src/main/java/org/assertj/db/type/lettercase/WithColumnLetterCase.java index cab54400..39f4e196 100644 --- a/src/main/java/org/assertj/db/type/lettercase/WithColumnLetterCase.java +++ b/src/main/java/org/assertj/db/type/lettercase/WithColumnLetterCase.java @@ -8,12 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.type.lettercase; /** * Defines the method to get the letter case of the columns. + * * @author Régis Pouiller * @since 1.1.0 */ @@ -21,6 +22,7 @@ public interface WithColumnLetterCase { /** * Returns the letter case of the columns. + * * @return The letter case of the columns. */ LetterCase getColumnLetterCase(); diff --git a/src/main/java/org/assertj/db/type/lettercase/WithLetterCase.java b/src/main/java/org/assertj/db/type/lettercase/WithLetterCase.java index cf69c97c..d689fcfc 100644 --- a/src/main/java/org/assertj/db/type/lettercase/WithLetterCase.java +++ b/src/main/java/org/assertj/db/type/lettercase/WithLetterCase.java @@ -8,12 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.type.lettercase; /** * Defines the method to get the letter cases. + * * @author Régis Pouiller * @since 1.1.0 */ diff --git a/src/main/java/org/assertj/db/type/lettercase/WithPrimaryKeyLetterCase.java b/src/main/java/org/assertj/db/type/lettercase/WithPrimaryKeyLetterCase.java index 737bdda1..120736e1 100644 --- a/src/main/java/org/assertj/db/type/lettercase/WithPrimaryKeyLetterCase.java +++ b/src/main/java/org/assertj/db/type/lettercase/WithPrimaryKeyLetterCase.java @@ -8,12 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.type.lettercase; /** * Defines the method to get the letter case of the primary keys. + * * @author Régis Pouiller * @since 1.1.0 */ @@ -21,6 +22,7 @@ public interface WithPrimaryKeyLetterCase { /** * Returns the letter case of the primary keys. + * * @return The letter case of the primary keys. */ LetterCase getPrimaryKeyLetterCase(); diff --git a/src/main/java/org/assertj/db/type/lettercase/WithTableLetterCase.java b/src/main/java/org/assertj/db/type/lettercase/WithTableLetterCase.java index 2fa8f7da..58385b0c 100644 --- a/src/main/java/org/assertj/db/type/lettercase/WithTableLetterCase.java +++ b/src/main/java/org/assertj/db/type/lettercase/WithTableLetterCase.java @@ -8,12 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.type.lettercase; /** * Defines the method to get the letter case of the tables. + * * @author Régis Pouiller * @since 1.1.0 */ @@ -21,6 +22,7 @@ public interface WithTableLetterCase { /** * Returns the letter case of the tables. + * * @return The letter case of the tables. */ LetterCase getTableLetterCase(); diff --git a/src/main/java/org/assertj/db/type/lettercase/package-info.java b/src/main/java/org/assertj/db/type/lettercase/package-info.java index b46d5022..7abb69e9 100644 --- a/src/main/java/org/assertj/db/type/lettercase/package-info.java +++ b/src/main/java/org/assertj/db/type/lettercase/package-info.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ /** * This package contains the interfaces and utility classes about the letter case. diff --git a/src/main/java/org/assertj/db/type/package-info.java b/src/main/java/org/assertj/db/type/package-info.java index a5c32ebb..069d868b 100644 --- a/src/main/java/org/assertj/db/type/package-info.java +++ b/src/main/java/org/assertj/db/type/package-info.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ /** * This package contains the classes that defines the different types used in assertj-db. diff --git a/src/main/java/org/assertj/db/util/ChangeComparator.java b/src/main/java/org/assertj/db/util/ChangeComparator.java index 0833f10d..763cd319 100644 --- a/src/main/java/org/assertj/db/util/ChangeComparator.java +++ b/src/main/java/org/assertj/db/util/ChangeComparator.java @@ -8,21 +8,20 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.util; +import java.util.Comparator; + import org.assertj.db.type.Change; import org.assertj.db.type.ChangeType; import org.assertj.db.type.Row; -import java.util.Comparator; - /** * Comparator for the {@code Change}. - * + * * @author Régis Pouiller - * */ public enum ChangeComparator implements Comparator { @@ -31,7 +30,9 @@ public enum ChangeComparator implements Comparator { */ INSTANCE; - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public int compare(Change change1, Change change2) { ChangeType changeType1 = change1.getChangeType(); diff --git a/src/main/java/org/assertj/db/util/Changes.java b/src/main/java/org/assertj/db/util/Changes.java index 0678261a..d265078d 100644 --- a/src/main/java/org/assertj/db/util/Changes.java +++ b/src/main/java/org/assertj/db/util/Changes.java @@ -8,18 +8,18 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.util; -import org.assertj.db.type.Change; -import org.assertj.db.type.Row; -import org.assertj.db.type.Value; - import java.util.ArrayList; import java.util.Iterator; import java.util.List; +import org.assertj.db.type.Change; +import org.assertj.db.type.Row; +import org.assertj.db.type.Value; + /** * Utility methods related to changes. * @@ -36,7 +36,8 @@ private Changes() { /** * Returns the indexes of the modified columns. - * @param change The change. + * + * @param change The change. * @return The indexes. */ public static Integer[] getIndexesOfModifiedColumns(Change change) { @@ -49,19 +50,18 @@ public static Integer[] getIndexesOfModifiedColumns(Change change) { Iterator iteratorAtEndPoint = valuesListAtEndPoint.iterator(); int index = 0; for (Value valueAtStartPoint : valuesListAtStartPoint) { - Value valueAtEndPoint = iteratorAtEndPoint.next(); + Value valueAtEndPoint = iteratorAtEndPoint.next(); Object objectAtStartPoint = valueAtStartPoint.getValue(); Object objectAtEndPoint = valueAtEndPoint.getValue(); if ((objectAtStartPoint == null && objectAtEndPoint != null) || - (objectAtStartPoint != null && !objectAtStartPoint.equals(objectAtEndPoint))) { + (objectAtStartPoint != null && !objectAtStartPoint.equals(objectAtEndPoint))) { indexesList.add(index); } index++; } - } - else if (rowAtStartPoint != null) { + } else if (rowAtStartPoint != null) { List valuesListAtStartPoint = rowAtStartPoint.getValuesList(); int index = 0; for (Value valueAtStartPoint : valuesListAtStartPoint) { @@ -70,8 +70,7 @@ else if (rowAtStartPoint != null) { } index++; } - } - else { + } else { List valuesListAtEndPoint = rowAtEndPoint.getValuesList(); int index = 0; for (Value valueAtEndPoint : valuesListAtEndPoint) { diff --git a/src/main/java/org/assertj/db/util/Descriptions.java b/src/main/java/org/assertj/db/util/Descriptions.java index f330170c..07a0ae04 100644 --- a/src/main/java/org/assertj/db/util/Descriptions.java +++ b/src/main/java/org/assertj/db/util/Descriptions.java @@ -8,17 +8,22 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.util; -import org.assertj.core.api.WritableAssertionInfo; -import org.assertj.db.type.*; -import org.assertj.db.type.Changes; - import java.util.ArrayList; import java.util.List; +import org.assertj.core.api.WritableAssertionInfo; +import org.assertj.db.type.Change; +import org.assertj.db.type.ChangeType; +import org.assertj.db.type.Changes; +import org.assertj.db.type.Request; +import org.assertj.db.type.Source; +import org.assertj.db.type.Table; +import org.assertj.db.type.Value; + /** * Utility methods related to descriptions. * @@ -82,8 +87,7 @@ public static String getDescription(Changes changes) { sql = sql.substring(0, 30) + "..."; } stringBuilder.append("Changes on '").append(sql).append("' request"); - } - else { + } else { stringBuilder.append("Changes"); } } @@ -110,7 +114,7 @@ public static String getRowDescription(WritableAssertionInfo info, int index) { /** * Returns the description of the {@code row}. * - * @param info Writable information about an assertion. + * @param info Writable information about an assertion. * @return The description */ public static String getRowAtStartPointDescription(WritableAssertionInfo info) { @@ -120,7 +124,7 @@ public static String getRowAtStartPointDescription(WritableAssertionInfo info) { /** * Returns the description of the {@code row}. * - * @param info Writable information about an assertion. + * @param info Writable information about an assertion. * @return The description */ public static String getRowAtEndPointDescription(WritableAssertionInfo info) { diff --git a/src/main/java/org/assertj/db/util/NameComparator.java b/src/main/java/org/assertj/db/util/NameComparator.java index bcc8706c..c83bff32 100644 --- a/src/main/java/org/assertj/db/util/NameComparator.java +++ b/src/main/java/org/assertj/db/util/NameComparator.java @@ -8,14 +8,14 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.util; -import org.assertj.db.type.lettercase.CaseComparison; - import java.util.List; +import org.assertj.db.type.lettercase.CaseComparison; + /** * Comparator for the names. * @@ -31,8 +31,9 @@ public enum NameComparator { /** * Returns if {@code namesList} contains {@code name} by comparing using {@code comparison}. - * @param namesList List of names which can contain the {@code name}. - * @param name The name to search. + * + * @param namesList List of names which can contain the {@code name}. + * @param name The name to search. * @param comparison Case comparison to compare the name. * @return The result. */ @@ -47,8 +48,9 @@ public boolean contains(List namesList, String name, CaseComparison comp /** * Returns the index of {@code name}in {@code namesList} by comparing using {@code comparison}. - * @param namesList List of names which can contain the {@code name}. - * @param name The name to search. + * + * @param namesList List of names which can contain the {@code name}. + * @param name The name to search. * @param comparison Case comparison to compare the name. * @return The result. */ diff --git a/src/main/java/org/assertj/db/util/Proxies.java b/src/main/java/org/assertj/db/util/Proxies.java index 71ba249a..b07fe7a2 100644 --- a/src/main/java/org/assertj/db/util/Proxies.java +++ b/src/main/java/org/assertj/db/util/Proxies.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.util; @@ -19,15 +19,19 @@ */ public class Proxies { - public static final String BYTE_BUDDY_PATTERN = "$ByteBuddy$"; + private static final String BYTE_BUDDY_PATTERN = "$ByteBuddy$"; + + private Proxies() { + throw new IllegalStateException("Utility class"); + } /** - * Check if class is proxified. + * Check if class is proxied. * * @param clazz Class to check - * @return True if class is proxified by CGLIB + * @return True if class is proxied by CGLIB */ - public static boolean isProxified(Class clazz) { + public static boolean isProxied(Class clazz) { return clazz.getName().contains(BYTE_BUDDY_PATTERN); } @@ -37,8 +41,8 @@ public static boolean isProxified(Class clazz) { * @param clazz Clazz to evaluate * @return Class based of proxified */ - public static Class unProxy(Class clazz) { - if (isProxified(clazz)) { + public static Class unProxy(Class clazz) { + if (isProxied(clazz)) { return clazz.getSuperclass(); } return clazz; diff --git a/src/main/java/org/assertj/db/util/RowComparator.java b/src/main/java/org/assertj/db/util/RowComparator.java index 2cfe0a48..8e4494b5 100644 --- a/src/main/java/org/assertj/db/util/RowComparator.java +++ b/src/main/java/org/assertj/db/util/RowComparator.java @@ -8,23 +8,22 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.util; -import org.assertj.db.type.Row; -import org.assertj.db.type.Value; - import java.util.Comparator; import java.util.List; +import org.assertj.db.type.Row; +import org.assertj.db.type.Value; + /** * Comparator for the {@code Row}. - * + * * @author Régis Pouiller - * */ -public enum RowComparator implements Comparator{ +public enum RowComparator implements Comparator { /** * The singleton @@ -33,6 +32,7 @@ public enum RowComparator implements Comparator{ /** * Compare one array of values to another. + * * @param values1 The first array of values. * @param values2 The second array of values. * @return The result. @@ -64,7 +64,9 @@ private static int compare(Value[] values1, Value[] values2) { return 0; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public int compare(Row row1, Row row2) { Value[] pksValues1 = row1.getPksValues(); diff --git a/src/main/java/org/assertj/db/util/Values.java b/src/main/java/org/assertj/db/util/Values.java index 3897c88f..ab1f86be 100644 --- a/src/main/java/org/assertj/db/util/Values.java +++ b/src/main/java/org/assertj/db/util/Values.java @@ -8,13 +8,10 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.util; -import org.assertj.db.exception.AssertJDBException; -import org.assertj.db.type.*; - import java.math.BigDecimal; import java.math.BigInteger; import java.sql.Date; @@ -26,6 +23,13 @@ import java.time.LocalTime; import java.util.UUID; +import org.assertj.db.exception.AssertJDBException; +import org.assertj.db.type.DateTimeValue; +import org.assertj.db.type.DateValue; +import org.assertj.db.type.TimeValue; +import org.assertj.db.type.Value; +import org.assertj.db.type.ValueType; + /** * Utility methods related to values. * @@ -54,35 +58,29 @@ public static boolean areEqual(Value value, Object expected) { if (expected instanceof Boolean) { return areEqual(value, (Boolean) expected); } - } - else if (valueType == ValueType.NUMBER) { + } else if (valueType == ValueType.NUMBER) { if (expected instanceof Number) { return areEqual(value, (Number) expected); } else if (expected instanceof String) { return areEqual(value, (String) expected); } - } - else if (valueType == ValueType.BYTES) { + } else if (valueType == ValueType.BYTES) { if (expected instanceof byte[]) { return areEqual(value, (byte[]) expected); } - } - else if (valueType == ValueType.TEXT) { + } else if (valueType == ValueType.TEXT) { if (expected instanceof String) { return areEqual(value, (String) expected); - } - else if (expected instanceof Character) { + } else if (expected instanceof Character) { return areEqual(value, (Character) expected); } - } - else if (valueType == ValueType.UUID) { + } else if (valueType == ValueType.UUID) { if (expected instanceof UUID) { return areEqual(value, (UUID) expected); } else if (expected instanceof String) { return areEqual(value, (String) expected); } - } - else if (valueType == ValueType.DATE) { + } else if (valueType == ValueType.DATE) { if (expected instanceof DateValue) { return areEqual(value, (DateValue) expected); } else if (expected instanceof String) { @@ -92,8 +90,7 @@ else if (valueType == ValueType.DATE) { } else if (expected instanceof LocalDate) { return areEqual(value, DateValue.from((LocalDate) expected)); } - } - else if (valueType == ValueType.TIME) { + } else if (valueType == ValueType.TIME) { if (expected instanceof TimeValue) { return areEqual(value, (TimeValue) expected); } else if (expected instanceof String) { @@ -103,8 +100,7 @@ else if (valueType == ValueType.TIME) { } else if (expected instanceof LocalTime) { return areEqual(value, TimeValue.from((LocalTime) expected)); } - } - else if (valueType == ValueType.DATE_TIME) { + } else if (valueType == ValueType.DATE_TIME) { if (expected instanceof DateTimeValue) { return areEqual(value, (DateTimeValue) expected); } else if (expected instanceof DateValue) { @@ -118,8 +114,7 @@ else if (valueType == ValueType.DATE_TIME) { } else if (expected instanceof LocalDate) { return areEqual(value, DateValue.from((LocalDate) expected)); } - } - else { + } else { Object object = value.getValue(); if (expected == null && object == null) { return true; @@ -704,8 +699,8 @@ public static Object getRepresentationFromValueInFrontOfExpected(Value value, Ob /** * Returns a representation of the value (this representation is used for error message). * - * @param value Value in the database. - * @param clazz Class for comparison. + * @param value Value in the database. + * @param clazz Class for comparison. * @return A representation of the value. */ public static Object getRepresentationFromValueInFrontOfClass(Value value, Class clazz) { @@ -720,22 +715,19 @@ public static Object getRepresentationFromValueInFrontOfClass(Value value, Class return DateTimeValue.of(DateValue.from((Date) object)).toString(); } return object; - } - else if (valueType == ValueType.TIME) { + } else if (valueType == ValueType.TIME) { if (clazz == String.class) { return TimeValue.from((Time) object).toString(); } else { return TimeValue.from((Time) object); } - } - else if (valueType == ValueType.DATE_TIME) { + } else if (valueType == ValueType.DATE_TIME) { if (clazz == String.class) { return DateTimeValue.from((Timestamp) object).toString(); } else { return DateTimeValue.from((Timestamp) object); } - } - else if (valueType == ValueType.NUMBER || valueType == ValueType.UUID) { + } else if (valueType == ValueType.NUMBER || valueType == ValueType.UUID) { if (clazz == String.class) { return object.toString(); } else { @@ -748,8 +740,8 @@ else if (valueType == ValueType.NUMBER || valueType == ValueType.UUID) { /** * Returns if object is close to the {@code BigInteger} in parameter with the tolerance in parameter. * - * @param object The object. - * @param expected The {@code BigInteger} to compare. + * @param object The object. + * @param expected The {@code BigInteger} to compare. * @param tolerance The tolerance of the closeness. * @return {@code true} if the value is close to the {@code BigInteger} parameter, {@code false} otherwise. */ @@ -775,8 +767,8 @@ private static boolean isObjectCloseToBigInteger(Object object, BigInteger expec /** * Returns if object is close to the {@code BigDecimal} in parameter with the tolerance in parameter. * - * @param object The object. - * @param expected The {@code BigDecimal} to compare. + * @param object The object. + * @param expected The {@code BigDecimal} to compare. * @param tolerance The tolerance of the closeness. * @return {@code true} if the value is close to the {@code BigDecimal} parameter, {@code false} otherwise. */ @@ -802,8 +794,8 @@ private static boolean isObjectCloseToBigDecimal(Object object, BigDecimal expec /** * Returns if nb is close to the {@code Number} in parameter with the tolerance in parameter. * - * @param nb The {@code Float}. - * @param expected The {@code Number} to compare. + * @param nb The {@code Float}. + * @param expected The {@code Number} to compare. * @param tolerance The tolerance of the closeness. * @return {@code true} if the value is close to the {@code Number} parameter, {@code false} otherwise. */ @@ -816,8 +808,8 @@ private static boolean isFloatCloseToNumber(Float nb, Number expected, Number to /** * Returns if nb is close to the {@code Number} in parameter with the tolerance in parameter. * - * @param nb The {@code Double}. - * @param expected The {@code Number} to compare. + * @param nb The {@code Double}. + * @param expected The {@code Number} to compare. * @param tolerance The tolerance of the closeness. * @return {@code true} if the value is close to the {@code Number} parameter, {@code false} otherwise. */ @@ -830,8 +822,8 @@ private static boolean isDoubleCloseToNumber(Double nb, Number expected, Number /** * Returns if nb is close to the {@code Number} in parameter with the tolerance in parameter. * - * @param nb The {@code BigInteger}. - * @param expected The {@code Number} to compare. + * @param nb The {@code BigInteger}. + * @param expected The {@code Number} to compare. * @param tolerance The tolerance of the closeness. * @return {@code true} if the value is close to the {@code Number} parameter, {@code false} otherwise. */ @@ -846,8 +838,8 @@ private static boolean isBigIntegerCloseToNumber(BigInteger nb, Number expected, /** * Returns if nb is close to the {@code Number} in parameter with the tolerance in parameter. * - * @param nb The {@code BigDecimal}. - * @param expected The {@code Number} to compare. + * @param nb The {@code BigDecimal}. + * @param expected The {@code Number} to compare. * @param tolerance The tolerance of the closeness. * @return {@code true} if the value is close to the {@code Number} parameter, {@code false} otherwise. */ @@ -881,63 +873,63 @@ private static Long getLong(Object object) { /** * Returns if nb is close to the {@code Float} in parameter with the tolerance in parameter. * - * @param nb The {@code Long}. - * @param expected The {@code Float} to compare. + * @param nb The {@code Long}. + * @param expected The {@code Float} to compare. * @param tolerance The tolerance of the closeness. * @return {@code true} if the value is close to the {@code Float} parameter, {@code false} otherwise. */ private static boolean isLongCloseToFloat(Long nb, Float expected, Number tolerance) { if (tolerance instanceof Float) { return nb >= expected - tolerance.floatValue() && - nb <= expected + tolerance.floatValue(); + nb <= expected + tolerance.floatValue(); } else if (tolerance instanceof Double) { return nb >= expected - tolerance.doubleValue() && - nb <= expected + tolerance.doubleValue(); + nb <= expected + tolerance.doubleValue(); } else { return nb >= expected - tolerance.longValue() && - nb <= expected + tolerance.longValue(); + nb <= expected + tolerance.longValue(); } } /** * Returns if nb is close to the {@code Double} in parameter with the tolerance in parameter. * - * @param nb The {@code Long}. - * @param expected The {@code Double} to compare. + * @param nb The {@code Long}. + * @param expected The {@code Double} to compare. * @param tolerance The tolerance of the closeness. * @return {@code true} if the value is close to the {@code Double} parameter, {@code false} otherwise. */ private static boolean isLongCloseToDouble(Long nb, Double expected, Number tolerance) { if (tolerance instanceof Float) { return nb >= expected - tolerance.floatValue() && - nb <= expected + tolerance.floatValue(); + nb <= expected + tolerance.floatValue(); } else if (tolerance instanceof Double) { return nb >= expected - tolerance.doubleValue() && - nb <= expected + tolerance.doubleValue(); + nb <= expected + tolerance.doubleValue(); } else { return nb >= expected - tolerance.longValue() && - nb <= expected + tolerance.longValue(); + nb <= expected + tolerance.longValue(); } } /** * Returns if nb is close to the {@code Number} in parameter with the tolerance in parameter. * - * @param nb The {@code Long}. - * @param expected The {@code Number} to compare. + * @param nb The {@code Long}. + * @param expected The {@code Number} to compare. * @param tolerance The tolerance of the closeness. * @return {@code true} if the value is close to the {@code Number} parameter, {@code false} otherwise. */ private static boolean isLongCloseToNumber(Long nb, Number expected, Number tolerance) { if (tolerance instanceof Float) { return nb >= expected.longValue() - tolerance.floatValue() && - nb <= expected.longValue() + tolerance.floatValue(); + nb <= expected.longValue() + tolerance.floatValue(); } else if (tolerance instanceof Double) { return nb >= expected.longValue() - tolerance.doubleValue() && - nb <= expected.longValue() + tolerance.doubleValue(); + nb <= expected.longValue() + tolerance.doubleValue(); } else { return nb >= expected.longValue() - tolerance.longValue() && - nb <= expected.longValue() + tolerance.longValue(); + nb <= expected.longValue() + tolerance.longValue(); } } diff --git a/src/main/java/org/assertj/db/util/package-info.java b/src/main/java/org/assertj/db/util/package-info.java index 4bff4a60..0ac3d73d 100644 --- a/src/main/java/org/assertj/db/util/package-info.java +++ b/src/main/java/org/assertj/db/util/package-info.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ /** * This package contains the utility classes of assertj-db. diff --git a/src/main/javadoc/assertj-javadoc.css b/src/main/javadoc/assertj-javadoc.css deleted file mode 100644 index 90d47a39..00000000 --- a/src/main/javadoc/assertj-javadoc.css +++ /dev/null @@ -1,570 +0,0 @@ -/** - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - * - * Copyright 2012-2013 the original author or authors. - */ -/* Javadoc style sheet */ -/* -Overall document style -*/ -body { - background-color:#ffffff; - color:#353833; - font-family:Arial, Helvetica, sans-serif; - font-size:90%; - margin:0; -} -a:link, a:visited { - text-decoration:none; - color:#4c6b87; -} -a:hover, a:focus { - text-decoration:none; - color:#bb7a2a; -} -a:active { - text-decoration:none; - color:#4c6b87; -} -a[name] { - color:#353833; -} -a[name]:hover { - text-decoration:none; - color:#353833; -} -pre { - font-size:1.3em; -} -h1 { - font-size:1.8em; -} -h2 { - font-size:1.5em; -} -h3 { - font-size:1.4em; -} -h4 { - font-size:1.3em; -} -h5 { - font-size:1.2em; -} -h6 { - font-size:1.1em; -} -ul { - list-style-type:disc; -} -code, tt { - font-size:1.1em; -} -dt code { - font-size:1.1em; -} -table tr td dt code { - font-size:1.1em; - vertical-align:top; -} -sup { - font-size:.6em; -} -/* -Document title and Copyright styles -*/ -.clear { - clear:both; - height:0px; - overflow:hidden; -} -.aboutLanguage { - float:right; - padding:0px 21px; - font-size:.8em; - z-index:200; - margin-top:-7px; -} -.legalCopy { - margin-left:.5em; -} -.bar a, .bar a:link, .bar a:visited, .bar a:active { - color:#FFFFFF; - text-decoration:none; -} -.bar a:hover, .bar a:focus { - color:#bb7a2a; -} -.tab { - background-color:#0066FF; - background-image:url(resources/titlebar.gif); - background-position:left top; - background-repeat:no-repeat; - color:#ffffff; - padding:8px; - width:5em; - font-weight:bold; -} -/* -Navigation bar styles -*/ -.bar { - background-image:url(resources/background.gif); - background-repeat:repeat-x; - color:#FFFFFF; - padding:.8em .5em .4em .8em; - height:auto;/*height:1.8em;*/ - font-size:1em; - margin:0; -} -.topNav { - background-image:url(resources/background.gif); - background-repeat:repeat-x; - color:#FFFFFF; - float:left; - padding:0; - width:100%; - clear:right; - height:2.8em; - padding-top:10px; - overflow:hidden; -} -.bottomNav { - margin-top:10px; - background-image:url(resources/background.gif); - background-repeat:repeat-x; - color:#FFFFFF; - float:left; - padding:0; - width:100%; - clear:right; - height:2.8em; - padding-top:10px; - overflow:hidden; -} -.subNav { - background-color:#dee3e9; - border-bottom:1px solid #9eadc0; - float:left; - width:100%; - overflow:hidden; -} -.subNav div { - clear:left; - float:left; - padding:0 0 5px 6px; -} -ul.navList, ul.subNavList { - float:left; - margin:0 25px 0 0; - padding:0; -} -ul.navList li{ - list-style:none; - float:left; - padding:3px 6px; -} -ul.subNavList li{ - list-style:none; - float:left; - font-size:90%; -} -.topNav a:link, .topNav a:active, .topNav a:visited, .bottomNav a:link, .bottomNav a:active, .bottomNav a:visited { - color:#FFFFFF; - text-decoration:none; -} -.topNav a:hover, .bottomNav a:hover { - text-decoration:none; - color:#bb7a2a; -} -.navBarCell1Rev { - background-image:url(resources/tab.gif); - background-color:#a88834; - color:#FFFFFF; - margin: auto 5px; - border:1px solid #c9aa44; -} -/* -Page header and footer styles -*/ -.header, .footer { - clear:both; - margin:0 20px; - padding:5px 0 0 0; -} -.indexHeader { - margin:10px; - position:relative; -} -.indexHeader h1 { - font-size:1.3em; -} -.title { - color:#2c4557; - margin:10px 0; -} -.subTitle { - margin:5px 0 0 0; -} -.header ul { - margin:0 0 25px 0; - padding:0; -} -.footer ul { - margin:20px 0 5px 0; -} -.header ul li, .footer ul li { - list-style:none; - font-size:1.2em; -} -/* -Heading styles -*/ -div.details ul.blockList ul.blockList ul.blockList li.blockList h4, div.details ul.blockList ul.blockList ul.blockListLast li.blockList h4 { - background-color:#dee3e9; - border-top:1px solid #9eadc0; - border-bottom:1px solid #9eadc0; - margin:0 0 6px -8px; - padding:2px 5px; -} -ul.blockList ul.blockList ul.blockList li.blockList h3 { - background-color:#dee3e9; - border-top:1px solid #9eadc0; - border-bottom:1px solid #9eadc0; - margin:0 0 6px -8px; - padding:2px 5px; -} -ul.blockList ul.blockList li.blockList h3 { - padding:0; - margin:15px 0; -} -ul.blockList li.blockList h2 { - padding:0px 0 20px 0; -} -/* -Page layout container styles -*/ -.contentContainer, .sourceContainer, .classUseContainer, .serializedFormContainer, .constantValuesContainer { - clear:both; - padding:10px 20px; - position:relative; -} -.indexContainer { - margin:10px; - position:relative; - font-size:1.0em; -} -.indexContainer h2 { - font-size:1.1em; - padding:0 0 3px 0; -} -.indexContainer ul { - margin:0; - padding:0; -} -.indexContainer ul li { - list-style:none; -} -.contentContainer .description dl dt, .contentContainer .details dl dt, .serializedFormContainer dl dt { - font-size:1.1em; - font-weight:bold; - margin:10px 0 0 0; - color:#4E4E4E; -} -.contentContainer .description dl dd, .contentContainer .details dl dd, .serializedFormContainer dl dd { - margin:10px 0 10px 20px; -} -.serializedFormContainer dl.nameValue dt { - margin-left:1px; - font-size:1.1em; - display:inline; - font-weight:bold; -} -.serializedFormContainer dl.nameValue dd { - margin:0 0 0 1px; - font-size:1.1em; - display:inline; -} -/* -List styles -*/ -ul.horizontal li { - display:inline; - font-size:0.9em; -} -ul.inheritance { - margin:0; - padding:0; -} -ul.inheritance li { - display:inline; - list-style:none; -} -ul.inheritance li ul.inheritance { - margin-left:15px; - padding-left:15px; - padding-top:1px; -} -ul.blockList, ul.blockListLast { - margin:10px 0 10px 0; - padding:0; -} -ul.blockList li.blockList, ul.blockListLast li.blockList { - list-style:none; - margin-bottom:25px; -} -ul.blockList ul.blockList li.blockList, ul.blockList ul.blockListLast li.blockList { - padding:0px 20px 5px 10px; - border:1px solid #9eadc0; - background-color:#f9f9f9; -} -ul.blockList ul.blockList ul.blockList li.blockList, ul.blockList ul.blockList ul.blockListLast li.blockList { - padding:0 0 5px 8px; - background-color:#ffffff; - border:1px solid #9eadc0; - border-top:none; -} -ul.blockList ul.blockList ul.blockList ul.blockList li.blockList { - margin-left:0; - padding-left:0; - padding-bottom:15px; - border:none; - border-bottom:1px solid #9eadc0; -} -ul.blockList ul.blockList ul.blockList ul.blockList li.blockListLast { - list-style:none; - border-bottom:none; - padding-bottom:0; -} -table tr td dl, table tr td dl dt, table tr td dl dd { - margin-top:0; - margin-bottom:1px; -} -/* -Table styles -*/ -.contentContainer table, .classUseContainer table, .constantValuesContainer table { - border-bottom:1px solid #9eadc0; - width:100%; -} -.contentContainer ul li table, .classUseContainer ul li table, .constantValuesContainer ul li table { - width:100%; -} -.contentContainer .description table, .contentContainer .details table { - border-bottom:none; -} -.contentContainer ul li table th.colOne, .contentContainer ul li table th.colFirst, .contentContainer ul li table th.colLast, .classUseContainer ul li table th, .constantValuesContainer ul li table th, .contentContainer ul li table td.colOne, .contentContainer ul li table td.colFirst, .contentContainer ul li table td.colLast, .classUseContainer ul li table td, .constantValuesContainer ul li table td{ - vertical-align:top; - padding-right:20px; -} -.contentContainer ul li table th.colLast, .classUseContainer ul li table th.colLast,.constantValuesContainer ul li table th.colLast, -.contentContainer ul li table td.colLast, .classUseContainer ul li table td.colLast,.constantValuesContainer ul li table td.colLast, -.contentContainer ul li table th.colOne, .classUseContainer ul li table th.colOne, -.contentContainer ul li table td.colOne, .classUseContainer ul li table td.colOne { - padding-right:3px; -} -.overviewSummary caption, .packageSummary caption, .contentContainer ul.blockList li.blockList caption, .summary caption, .classUseContainer caption, .constantValuesContainer caption { - position:relative; - text-align:left; - background-repeat:no-repeat; - color:#FFFFFF; - font-weight:bold; - clear:none; - overflow:hidden; - padding:0px; - margin:0px; -} -caption a:link, caption a:hover, caption a:active, caption a:visited { - color:#FFFFFF; -} -.overviewSummary caption span, .packageSummary caption span, .contentContainer ul.blockList li.blockList caption span, .summary caption span, .classUseContainer caption span, .constantValuesContainer caption span { - white-space:nowrap; - padding-top:8px; - padding-left:8px; - display:block; - float:left; - background-image:url(resources/titlebar.gif); - height:18px; -} -.overviewSummary .tabEnd, .packageSummary .tabEnd, .contentContainer ul.blockList li.blockList .tabEnd, .summary .tabEnd, .classUseContainer .tabEnd, .constantValuesContainer .tabEnd { - width:10px; - background-image:url(resources/titlebar_end.gif); - background-repeat:no-repeat; - background-position:top right; - position:relative; - float:left; -} -ul.blockList ul.blockList li.blockList table { - margin:0 0 12px 0px; - width:100%; -} -.tableSubHeadingColor { - background-color: #EEEEFF; -} -.altColor { - background-color:#eeeeef; -} -.rowColor { - background-color:#ffffff; -} -.overviewSummary td, .packageSummary td, .contentContainer ul.blockList li.blockList td, .summary td, .classUseContainer td, .constantValuesContainer td { - text-align:left; - padding:3px 3px 3px 7px; -} -th.colFirst, th.colLast, th.colOne, .constantValuesContainer th { - background:#dee3e9; - border-top:1px solid #9eadc0; - border-bottom:1px solid #9eadc0; - text-align:left; - padding:3px 3px 3px 7px; -} -td.colOne a:link, td.colOne a:active, td.colOne a:visited, td.colOne a:hover, td.colFirst a:link, td.colFirst a:active, td.colFirst a:visited, td.colFirst a:hover, td.colLast a:link, td.colLast a:active, td.colLast a:visited, td.colLast a:hover, .constantValuesContainer td a:link, .constantValuesContainer td a:active, .constantValuesContainer td a:visited, .constantValuesContainer td a:hover { - font-weight:bold; -} -td.colFirst, th.colFirst { - border-left:1px solid #9eadc0; - white-space:nowrap; -} -td.colLast, th.colLast { - border-right:1px solid #9eadc0; -} -td.colOne, th.colOne { - border-right:1px solid #9eadc0; - border-left:1px solid #9eadc0; -} -table.overviewSummary { - padding:0px; - margin-left:0px; -} -table.overviewSummary td.colFirst, table.overviewSummary th.colFirst, -table.overviewSummary td.colOne, table.overviewSummary th.colOne { - width:25%; - vertical-align:middle; -} -table.packageSummary td.colFirst, table.overviewSummary th.colFirst { - width:25%; - vertical-align:middle; -} -/* -Content styles -*/ -.description pre { - margin-top:0; -} -.deprecatedContent { - margin:0; - padding:10px 0; -} -.docSummary { - padding:0; -} -/* -Formatting effect styles -*/ -.sourceLineNo { - color:green; - padding:0 30px 0 0; -} -h1.hidden { - visibility:hidden; - overflow:hidden; - font-size:.9em; -} -.block { - display:block; - margin:3px 0 0 0; -} -.strong { - font-weight:bold; -} - -/* - mono-blue theme. -*/ -.hljs { - display: block; - overflow-x: auto; - padding-left: 0.6em; - padding-right: 0.6em; - padding-top: 0em; - padding-bottom: 0em; - margin-right: 1.0em; - background: #eaeef3; - -webkit-text-size-adjust: none; -} - -.hljs, -.hljs-list .hljs-built_in { - color: #00193a; -} - -.hljs-keyword, -.hljs-title, -.hljs-important, -.hljs-request, -.hljs-header, -.hljs-javadoctag { - font-weight: bold; -} - -.hljs-comment, -.hljs-chunk, -.hljs-template_comment { - color: #738191; -} - -.hljs-number { - color: #711313; -} - -.hljs-string, -.hljs-title, -.hljs-parent, -.hljs-built_in, -.hljs-literal, -.hljs-filename, -.hljs-value, -.hljs-addition, -.hljs-tag, -.hljs-argument, -.hljs-link_label, -.hljs-blockquote, -.hljs-header { - color: #0048ab; -} - -.hljs-decorator, -.hljs-prompt, -.hljs-yardoctag, -.hljs-subst, -.hljs-symbol, -.hljs-doctype, -.hljs-regexp, -.hljs-preprocessor, -.hljs-pragma, -.hljs-pi, -.hljs-attribute, -.hljs-attr_selector, -.hljs-javadoc, -.hljs-xmlDocTag, -.hljs-deletion, -.hljs-shebang, -.hljs-string .hljs-variable, -.hljs-link_url, -.hljs-bullet, -.hljs-sqbracket, -.hljs-phony { - color: #4c81c9; -} - -/* Fixes huge font size in

    {@code} blocks. */
    -pre code {
    -    font-size:inherit;
    -}
    diff --git a/src/main/javadoc/assertj-theme.css b/src/main/javadoc/assertj-theme.css
    new file mode 100644
    index 00000000..f55fbd08
    --- /dev/null
    +++ b/src/main/javadoc/assertj-theme.css
    @@ -0,0 +1,33 @@
    +:root {
    +    /* body, block and code fonts */
    +    --body-font-family: Verdana, Geneva, sans-serif;
    +    --block-font-family: Verdana, Geneva, serif;
    +    /* Text colors for body and block elements */
    +    --body-text-color: #000000;
    +    --block-text-color: #000000;
    +    /* Background colors for various structural elements */
    +    --body-background-color: #edd9a6;
    +    --section-background-color: #e9d195;
    +    --detail-background-color: #edd9a6;
    +    /* Colors for navigation bar and table captions */
    +    --navbar-background-color: #232323;
    +    --navbar-text-color: #edd9a6;
    +    /* Background color for subnavigation and various headers */
    +    --subnav-background-color: #e5c880;
    +    /* Background and text colors for selected tabs and navigation items */
    +    --selected-background-color: #e5c880;
    +    --selected-text-color: #000000;
    +    --selected-link-color: #861203;
    +    /* Background colors for generated tables */
    +    --even-row-color: #edd9a6;
    +    --odd-row-color: #e7ce8e;
    +    /* Text color for page title */
    +    --title-color: #000000;
    +    /* Text colors for links */
    +    --link-color: #861203;
    +    --link-color-active: #641003;
    +    /* Border colors for structural elements and user defined tables */
    +    --border-color: #e5c880;
    +    /* Search input colors */
    +    --search-input-background-color: #edd9a6;
    +}
    \ No newline at end of file
    diff --git a/src/main/javadoc/highlight.pack.js.txt b/src/main/javadoc/highlight.pack.js.txt
    deleted file mode 100644
    index 7aa905dd..00000000
    --- a/src/main/javadoc/highlight.pack.js.txt
    +++ /dev/null
    @@ -1,13 +0,0 @@
    -/*
    - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
    - * the License. You may obtain a copy of the License at
    - *
    - * http://www.apache.org/licenses/LICENSE-2.0
    - *
    - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
    - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
    - * specific language governing permissions and limitations under the License.
    - *
    - * Copyright 2012-2013 the original author or authors.
    - */
    -var hljs=new function(){function e(e){return e.replace(/&/gm,"&").replace(//gm,">")}function t(e){return e.nodeName.toLowerCase()}function n(e,t){var n=e&&e.exec(t);return n&&0==n.index}function r(e){var t=(e.className+" "+(e.parentNode?e.parentNode.className:"")).split(/\s+/);return t=t.map(function(e){return e.replace(/^lang(uage)?-/,"")}),t.filter(function(e){return m(e)||/no(-?)highlight/.test(e)})[0]}function i(e,t){var n={};for(var r in e)n[r]=e[r];if(t)for(var r in t)n[r]=t[r];return n}function a(e){var n=[];return function r(e,i){for(var a=e.firstChild;a;a=a.nextSibling)3==a.nodeType?i+=a.nodeValue.length:1==a.nodeType&&(n.push({event:"start",offset:i,node:a}),i=r(a,i),t(a).match(/br|hr|img|input/)||n.push({event:"stop",offset:i,node:a}));return i}(e,0),n}function s(n,r,i){function a(){return n.length&&r.length?n[0].offset!=r[0].offset?n[0].offset"}function o(e){l+=""}function c(e){("start"==e.event?s:o)(e.node)}for(var u=0,l="",f=[];n.length||r.length;){var h=a();if(l+=e(i.substr(u,h[0].offset-u)),u=h[0].offset,h==n){f.reverse().forEach(o);do c(h.splice(0,1)[0]),h=a();while(h==n&&h.length&&h[0].offset==u);f.reverse().forEach(s)}else"start"==h[0].event?f.push(h[0].node):f.pop(),c(h.splice(0,1)[0])}return l+e(i.substr(u))}function o(e){function t(e){return e&&e.source||e}function n(n,r){return RegExp(t(n),"m"+(e.cI?"i":"")+(r?"g":""))}function r(a,s){if(!a.compiled){if(a.compiled=!0,a.k=a.k||a.bK,a.k){var o={},c=function(t,n){e.cI&&(n=n.toLowerCase()),n.split(" ").forEach(function(e){var n=e.split("|");o[n[0]]=[t,n[1]?Number(n[1]):1]})};"string"==typeof a.k?c("keyword",a.k):Object.keys(a.k).forEach(function(e){c(e,a.k[e])}),a.k=o}a.lR=n(a.l||/\b[A-Za-z0-9_]+\b/,!0),s&&(a.bK&&(a.b="\\b("+a.bK.split(" ").join("|")+")\\b"),a.b||(a.b=/\B|\b/),a.bR=n(a.b),a.e||a.eW||(a.e=/\B|\b/),a.e&&(a.eR=n(a.e)),a.tE=t(a.e)||"",a.eW&&s.tE&&(a.tE+=(a.e?"|":"")+s.tE)),a.i&&(a.iR=n(a.i)),void 0===a.r&&(a.r=1),a.c||(a.c=[]);var u=[];a.c.forEach(function(e){e.v?e.v.forEach(function(t){u.push(i(e,t))}):u.push("self"==e?a:e)}),a.c=u,a.c.forEach(function(e){r(e,a)}),a.starts&&r(a.starts,s);var l=a.c.map(function(e){return e.bK?"\\.?("+e.b+")\\.?":e.b}).concat([a.tE,a.i]).map(t).filter(Boolean);a.t=l.length?n(l.join("|"),!0):{exec:function(){return null}}}}r(e)}function c(t,r,i,a){function s(e,t){for(var r=0;r";return a+=e+'">',a+t+s}function p(){if(!w.k)return e(B);var t="",n=0;w.lR.lastIndex=0;for(var r=w.lR.exec(B);r;){t+=e(B.substr(n,r.index-n));var i=h(w,r);i?(y+=i[1],t+=g(i[0],e(r[0]))):t+=e(r[0]),n=w.lR.lastIndex,r=w.lR.exec(B)}return t+e(B.substr(n))}function v(){if(w.sL&&!E[w.sL])return e(B);var t=w.sL?c(w.sL,B,!0,L[w.sL]):u(B);return w.r>0&&(y+=t.r),"continuous"==w.subLanguageMode&&(L[w.sL]=t.top),g(t.language,t.value,!1,!0)}function b(){return void 0!==w.sL?v():p()}function d(t,n){var r=t.cN?g(t.cN,"",!0):"";t.rB?(M+=r,B=""):t.eB?(M+=e(n)+r,B=""):(M+=r,B=n),w=Object.create(t,{parent:{value:w}})}function R(t,n){if(B+=t,void 0===n)return M+=b(),0;var r=s(n,w);if(r)return M+=b(),d(r,n),r.rB?0:n.length;var i=l(w,n);if(i){var a=w;a.rE||a.eE||(B+=n),M+=b();do w.cN&&(M+=""),y+=w.r,w=w.parent;while(w!=i.parent);return a.eE&&(M+=e(n)),B="",i.starts&&d(i.starts,""),a.rE?0:n.length}if(f(n,w))throw new Error('Illegal lexeme "'+n+'" for mode "'+(w.cN||"")+'"');return B+=n,n.length||1}var x=m(t);if(!x)throw new Error('Unknown language: "'+t+'"');o(x);for(var w=a||x,L={},M="",k=w;k!=x;k=k.parent)k.cN&&(M=g(k.cN,"",!0)+M);var B="",y=0;try{for(var C,I,j=0;;){if(w.t.lastIndex=j,C=w.t.exec(r),!C)break;I=R(r.substr(j,C.index-j),C[0]),j=C.index+I}R(r.substr(j));for(var k=w;k.parent;k=k.parent)k.cN&&(M+="");return{r:y,value:M,language:t,top:w}}catch(A){if(-1!=A.message.indexOf("Illegal"))return{r:0,value:e(r)};throw A}}function u(t,n){n=n||N.languages||Object.keys(E);var r={r:0,value:e(t)},i=r;return n.forEach(function(e){if(m(e)){var n=c(e,t,!1);n.language=e,n.r>i.r&&(i=n),n.r>r.r&&(i=r,r=n)}}),i.language&&(r.second_best=i),r}function l(e){return N.tabReplace&&(e=e.replace(/^((<[^>]+>|\t)+)/gm,function(e,t){return t.replace(/\t/g,N.tabReplace)})),N.useBR&&(e=e.replace(/\n/g,"
    ")),e}function f(e,t,n){var r=t?R[t]:n,i=[e.trim()];return e.match(/(\s|^)hljs(\s|$)/)||i.push("hljs"),r&&i.push(r),i.join(" ").trim()}function h(e){var t=r(e);if(!/no(-?)highlight/.test(t)){var n;N.useBR?(n=document.createElementNS("http://www.w3.org/1999/xhtml","div"),n.innerHTML=e.innerHTML.replace(/\n/g,"").replace(//g,"\n")):n=e;var i=n.textContent,o=t?c(t,i,!0):u(i),h=a(n);if(h.length){var g=document.createElementNS("http://www.w3.org/1999/xhtml","div");g.innerHTML=o.value,o.value=s(h,a(g),i)}o.value=l(o.value),e.innerHTML=o.value,e.className=f(e.className,t,o.language),e.result={language:o.language,re:o.r},o.second_best&&(e.second_best={language:o.second_best.language,re:o.second_best.r})}}function g(e){N=i(N,e)}function p(){if(!p.called){p.called=!0;var e=document.querySelectorAll("pre code");Array.prototype.forEach.call(e,h)}}function v(){addEventListener("DOMContentLoaded",p,!1),addEventListener("load",p,!1)}function b(e,t){var n=E[e]=t(this);n.aliases&&n.aliases.forEach(function(t){R[t]=e})}function d(){return Object.keys(E)}function m(e){return E[e]||E[R[e]]}var N={classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:void 0},E={},R={};this.highlight=c,this.highlightAuto=u,this.fixMarkup=l,this.highlightBlock=h,this.configure=g,this.initHighlighting=p,this.initHighlightingOnLoad=v,this.registerLanguage=b,this.listLanguages=d,this.getLanguage=m,this.inherit=i,this.IR="[a-zA-Z][a-zA-Z0-9_]*",this.UIR="[a-zA-Z_][a-zA-Z0-9_]*",this.NR="\\b\\d+(\\.\\d+)?",this.CNR="(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",this.BNR="\\b(0b[01]+)",this.RSR="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",this.BE={b:"\\\\[\\s\\S]",r:0},this.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[this.BE]},this.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[this.BE]},this.PWM={b:/\b(a|an|the|are|I|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such)\b/},this.CLCM={cN:"comment",b:"//",e:"$",c:[this.PWM]},this.CBCM={cN:"comment",b:"/\\*",e:"\\*/",c:[this.PWM]},this.HCM={cN:"comment",b:"#",e:"$",c:[this.PWM]},this.NM={cN:"number",b:this.NR,r:0},this.CNM={cN:"number",b:this.CNR,r:0},this.BNM={cN:"number",b:this.BNR,r:0},this.CSSNM={cN:"number",b:this.NR+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",r:0},this.RM={cN:"regexp",b:/\//,e:/\/[gimuy]*/,i:/\n/,c:[this.BE,{b:/\[/,e:/\]/,r:0,c:[this.BE]}]},this.TM={cN:"title",b:this.IR,r:0},this.UTM={cN:"title",b:this.UIR,r:0}};hljs.registerLanguage("javascript",function(r){return{aliases:["js"],k:{keyword:"in if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const class",literal:"true false null undefined NaN Infinity",built_in:"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require module console window document"},c:[{cN:"pi",b:/^\s*('|")use strict('|")/,r:10},r.ASM,r.QSM,r.CLCM,r.CBCM,r.CNM,{b:"("+r.RSR+"|\\b(case|return|throw)\\b)\\s*",k:"return throw case",c:[r.CLCM,r.CBCM,r.RM,{b:/;/,r:0,sL:"xml"}],r:0},{cN:"function",bK:"function",e:/\{/,eE:!0,c:[r.inherit(r.TM,{b:/[A-Za-z$_][0-9A-Za-z$_]*/}),{cN:"params",b:/\(/,e:/\)/,c:[r.CLCM,r.CBCM],i:/["'\(]/}],i:/\[|%/},{b:/\$[(.]/},{b:"\\."+r.IR,r:0}]}});hljs.registerLanguage("http",function(){return{i:"\\S",c:[{cN:"status",b:"^HTTP/[0-9\\.]+",e:"$",c:[{cN:"number",b:"\\b\\d{3}\\b"}]},{cN:"request",b:"^[A-Z]+ (.*?) HTTP/[0-9\\.]+$",rB:!0,e:"$",c:[{cN:"string",b:" ",e:" ",eB:!0,eE:!0}]},{cN:"attribute",b:"^\\w",e:": ",eE:!0,i:"\\n|\\s|=",starts:{cN:"string",e:"$"}},{b:"\\n\\n",starts:{sL:"",eW:!0}}]}});hljs.registerLanguage("json",function(e){var t={literal:"true false null"},i=[e.QSM,e.CNM],l={cN:"value",e:",",eW:!0,eE:!0,c:i,k:t},c={b:"{",e:"}",c:[{cN:"attribute",b:'\\s*"',e:'"\\s*:\\s*',eB:!0,eE:!0,c:[e.BE],i:"\\n",starts:l}],i:"\\S"},n={b:"\\[",e:"\\]",c:[e.inherit(l,{cN:null})],i:"\\S"};return i.splice(i.length,0,c,n),{c:i,k:t,i:"\\S"}});hljs.registerLanguage("sql",function(e){var t={cN:"comment",b:"--",e:"$"};return{cI:!0,i:/[<>]/,c:[{cN:"operator",bK:"begin end start commit rollback savepoint lock alter create drop rename call delete do handler insert load replace select truncate update set show pragma grant merge describe use explain help declare prepare execute deallocate savepoint release unlock purge reset change stop analyze cache flush optimize repair kill install uninstall checksum restore check backup",e:/;/,eW:!0,k:{keyword:"abs absolute acos action add adddate addtime aes_decrypt aes_encrypt after aggregate all allocate alter analyze and any are as asc ascii asin assertion at atan atan2 atn2 authorization authors avg backup before begin benchmark between bin binlog bit_and bit_count bit_length bit_or bit_xor both by cache call cascade cascaded case cast catalog ceil ceiling chain change changed char_length character_length charindex charset check checksum checksum_agg choose close coalesce coercibility collate collation collationproperty column columns columns_updated commit compress concat concat_ws concurrent connect connection connection_id consistent constraint constraints continue contributors conv convert convert_tz corresponding cos cot count count_big crc32 create cross cume_dist curdate current current_date current_time current_timestamp current_user cursor curtime data database databases datalength date_add date_format date_sub dateadd datediff datefromparts datename datepart datetime2fromparts datetimeoffsetfromparts day dayname dayofmonth dayofweek dayofyear deallocate declare decode default deferrable deferred degrees delayed delete des_decrypt des_encrypt des_key_file desc describe descriptor diagnostics difference disconnect distinct distinctrow div do domain double drop dumpfile each else elt enclosed encode encrypt end end-exec engine engines eomonth errors escape escaped event eventdata events except exception exec execute exists exp explain export_set extended external extract fast fetch field fields find_in_set first first_value floor flush for force foreign format found found_rows from from_base64 from_days from_unixtime full function get get_format get_lock getdate getutcdate global go goto grant grants greatest group group_concat grouping grouping_id gtid_subset gtid_subtract handler having help hex high_priority hosts hour ident_current ident_incr ident_seed identified identity if ifnull ignore iif ilike immediate in index indicator inet6_aton inet6_ntoa inet_aton inet_ntoa infile initially inner innodb input insert install instr intersect into is is_free_lock is_ipv4 is_ipv4_compat is_ipv4_mapped is_not is_not_null is_used_lock isdate isnull isolation join key kill language last last_day last_insert_id last_value lcase lead leading least leaves left len lenght level like limit lines ln load load_file local localtime localtimestamp locate lock log log10 log2 logfile logs low_priority lower lpad ltrim make_set makedate maketime master master_pos_wait match matched max md5 medium merge microsecond mid min minute mod mode module month monthname mutex name_const names national natural nchar next no no_write_to_binlog not now nullif nvarchar oct octet_length of old_password on only open optimize option optionally or ord order outer outfile output pad parse partial partition password patindex percent_rank percentile_cont percentile_disc period_add period_diff pi plugin position pow power pragma precision prepare preserve primary prior privileges procedure procedure_analyze processlist profile profiles public publishingservername purge quarter query quick quote quotename radians rand read references regexp relative relaylog release release_lock rename repair repeat replace replicate reset restore restrict return returns reverse revoke right rlike rollback rollup round row row_count rows rpad rtrim savepoint schema scroll sec_to_time second section select serializable server session session_user set sha sha1 sha2 share show sign sin size slave sleep smalldatetimefromparts snapshot some soname soundex sounds_like space sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result sql_variant_property sqlstate sqrt square start starting status std stddev stddev_pop stddev_samp stdev stdevp stop str str_to_date straight_join strcmp string stuff subdate substr substring subtime subtring_index sum switchoffset sysdate sysdatetime sysdatetimeoffset system_user sysutcdatetime table tables tablespace tan temporary terminated tertiary_weights then time time_format time_to_sec timediff timefromparts timestamp timestampadd timestampdiff timezone_hour timezone_minute to to_base64 to_days to_seconds todatetimeoffset trailing transaction translation trigger trigger_nestlevel triggers trim truncate try_cast try_convert try_parse ucase uncompress uncompressed_length unhex unicode uninstall union unique unix_timestamp unknown unlock update upgrade upped upper usage use user user_resources using utc_date utc_time utc_timestamp uuid uuid_short validate_password_strength value values var var_pop var_samp variables variance varp version view warnings week weekday weekofyear weight_string when whenever where with work write xml xor year yearweek zon",literal:"true false null",built_in:"array bigint binary bit blob boolean char character date dec decimal float int integer interval number numeric real serial smallint varchar varying int8 serial8 text"},c:[{cN:"string",b:"'",e:"'",c:[e.BE,{b:"''"}]},{cN:"string",b:'"',e:'"',c:[e.BE,{b:'""'}]},{cN:"string",b:"`",e:"`",c:[e.BE]},e.CNM,e.CBCM,t]},e.CBCM,t]}});hljs.registerLanguage("xml",function(){var t="[A-Za-z0-9\\._:-]+",e={b:/<\?(php)?(?!\w)/,e:/\?>/,sL:"php",subLanguageMode:"continuous"},c={eW:!0,i:/]+/}]}]}]};return{aliases:["html","xhtml","rss","atom","xsl","plist"],cI:!0,c:[{cN:"doctype",b:"",r:10,c:[{b:"\\[",e:"\\]"}]},{cN:"comment",b:"",r:10},{cN:"cdata",b:"<\\!\\[CDATA\\[",e:"\\]\\]>",r:10},{cN:"tag",b:"|$)",e:">",k:{title:"style"},c:[c],starts:{e:"",rE:!0,sL:"css"}},{cN:"tag",b:"|$)",e:">",k:{title:"script"},c:[c],starts:{e:"",rE:!0,sL:"javascript"}},e,{cN:"pi",b:/<\?\w+/,e:/\?>/,r:10},{cN:"tag",b:"",c:[{cN:"title",b:/[^ \/><\n\t]+/,r:0},c]}]}});hljs.registerLanguage("java",function(e){var t=e.UIR+"(<"+e.UIR+">)?",a="false synchronized int abstract float private char boolean static null if const for true while long throw strictfp finally protected import native final return void enum else break transient new catch instanceof byte super volatile case assert short package default double public try this switch continue throws protected public private";return{aliases:["jsp"],k:a,i:/<\//,c:[{cN:"javadoc",b:"/\\*\\*",e:"\\*/",r:0,c:[{cN:"javadoctag",b:"(^|\\s)@[A-Za-z]+"}]},e.CLCM,e.CBCM,e.ASM,e.QSM,{cN:"class",bK:"class interface",e:/[{;=]/,eE:!0,k:"class interface",i:/[:"\[\]]/,c:[{bK:"extends implements"},e.UTM]},{bK:"new throw",e:/\s/,r:0},{cN:"function",b:"("+t+"\\s+)+"+e.UIR+"\\s*\\(",rB:!0,e:/[{;=]/,eE:!0,k:a,c:[{b:e.UIR+"\\s*\\(",rB:!0,c:[e.UTM]},{cN:"params",b:/\(/,e:/\)/,k:a,c:[e.ASM,e.QSM,e.CNM,e.CBCM]},e.CLCM,e.CBCM]},e.CNM,{cN:"annotation",b:"@[A-Za-z]+"}]}});hljs.registerLanguage("bash",function(e){var r={cN:"variable",v:[{b:/\$[\w\d#@][\w\d_]*/},{b:/\$\{(.*?)\}/}]},s={cN:"string",b:/"/,e:/"/,c:[e.BE,r,{cN:"variable",b:/\$\(/,e:/\)/,c:[e.BE]}]},t={cN:"string",b:/'/,e:/'/};return{aliases:["sh","zsh"],l:/-?[a-z\.]+/,k:{keyword:"if then else elif fi for break continue while in do done exit return set declare case esac export exec function",literal:"true false",built_in:"printf echo read cd pwd pushd popd dirs let eval unset typeset readonly getopts source shopt caller type hash bind help sudo",operator:"-ne -eq -lt -gt -f -d -e -s -l -a"},c:[{cN:"shebang",b:/^#![^\n]+sh\s*$/,r:10},{cN:"function",b:/\w[\w\d_]*\s*\(\s*\)\s*\{/,rB:!0,c:[e.inherit(e.TM,{b:/\w[\w\d_]*/})],r:0},e.HCM,e.NM,s,t,r]}}); \ No newline at end of file diff --git a/src/main/javadoc/hljs-theme.css b/src/main/javadoc/hljs-theme.css new file mode 100644 index 00000000..75a4d088 --- /dev/null +++ b/src/main/javadoc/hljs-theme.css @@ -0,0 +1,108 @@ +/* + +Railscasts-like style (c) Visoft, Inc. (Damien White) + +*/ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #232323; + color: #e6e1dc; + /* added by us */ + border-radius:8px; +} + +.hljs-comment, +.hljs-quote { + color: #bc9458; + font-style: italic; +} + +.hljs-keyword, +.hljs-selector-tag { + color: #c26230; +} + +.hljs-string, +.hljs-number, +.hljs-regexp, +.hljs-variable, +.hljs-template-variable { + color: #a5c261; +} + +.hljs-subst { + color: #519f50; +} + +.hljs-tag, +.hljs-name { + color: #e8bf6a; +} + +.hljs-type { + color: #ffc66d; +} + + +.hljs-symbol, +.hljs-bullet, +.hljs-built_in, +.hljs-builtin-name, +.hljs-attr, +.hljs-link { + color: #6d9cbe; +} + +.hljs-params { + color: #d0d0ff; +} + +.hljs-attribute { + color: #cda869; +} + +.hljs-meta { + color: #9b859d; +} + +.hljs-title, +.hljs-section { + color: #ffc66d; +} + +.hljs-addition { + background-color: #144212; + color: #e6e1dc; + display: inline-block; + width: 100%; +} + +.hljs-deletion { + background-color: #600; + color: #e6e1dc; + display: inline-block; + width: 100%; +} + +.hljs-selector-class { + color: #9b703f; +} + +.hljs-selector-id { + color: #8b98ab; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} + +.hljs-link { + text-decoration: underline; +} \ No newline at end of file diff --git a/src/test/java/org/assertj/db/api/AssertOnColumnOfChangeEquality_HasValues_One_Character_Test.java b/src/test/java/org/assertj/db/api/AssertOnColumnOfChangeEquality_HasValues_One_Character_Test.java index 70240427..1fb23ebd 100644 --- a/src/test/java/org/assertj/db/api/AssertOnColumnOfChangeEquality_HasValues_One_Character_Test.java +++ b/src/test/java/org/assertj/db/api/AssertOnColumnOfChangeEquality_HasValues_One_Character_Test.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api; @@ -26,7 +26,6 @@ * {@link org.assertj.db.api.assertions.AssertOnColumnOfChangeEquality#hasValues(Character)} method. * * @author Régis Pouiller - * */ public class AssertOnColumnOfChangeEquality_HasValues_One_Character_Test extends AbstractTest { @@ -61,10 +60,10 @@ public void should_fail_because_value_at_start_point_is_different() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 15 (column name : VAR16) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting that start point:%n" - + " %n" - + "to be equal to: %n" - + " <'X'>")); + + "Expecting that start point:%n" + + " %n" + + "to be equal to: %n" + + " <'X'>")); } } @@ -83,10 +82,10 @@ public void should_fail_because_value_at_end_point_is_different() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 15 (column name : VAR16) of Change at index 0 (on table : TEST and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting that end point:%n" - + " %n" - + "to be equal to: %n" - + " <'T'>")); + + "Expecting that end point:%n" + + " %n" + + "to be equal to: %n" + + " <'T'>")); } } } diff --git a/src/test/java/org/assertj/db/api/Assertions_BytesContent_Test.java b/src/test/java/org/assertj/db/api/Assertions_BytesContent_Test.java index 93a82e6c..03f105b1 100644 --- a/src/test/java/org/assertj/db/api/Assertions_BytesContent_Test.java +++ b/src/test/java/org/assertj/db/api/Assertions_BytesContent_Test.java @@ -8,26 +8,29 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api; -import org.assertj.db.exception.AssertJDBException; -import org.junit.Test; +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.db.api.Assertions.bytesContentFromClassPathOf; +import static org.assertj.db.api.Assertions.bytesContentOf; -import java.io.*; +import java.io.BufferedInputStream; +import java.io.ByteArrayInputStream; +import java.io.File; +import java.io.IOException; +import java.io.InputStream; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; -import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.db.api.Assertions.bytesContentFromClassPathOf; -import static org.assertj.db.api.Assertions.bytesContentOf; +import org.assertj.db.exception.AssertJDBException; +import org.junit.Test; /** * Tests on {@code bytesContentOf} and {@code bytesContentFromClassPathOf} methods of {@code Assertions}. - * + * * @author Régis Pouiller - * */ public class Assertions_BytesContent_Test { @@ -73,7 +76,7 @@ public void should_throw_AssertJDBException_if_call_of_bytesContentFromClassPath @Test public void test_bytesContentOf() { byte[] bytes = bytesContentOf(new File("target/test-classes/test.txt")); - assertThat(bytes).isEqualTo(new byte[] { 'T', 'e', 'x', 't', ' ', 'f', 'o', 'r', ' ', 't', 'e', 's', 't', 's' }); + assertThat(bytes).isEqualTo(new byte[]{'T', 'e', 'x', 't', ' ', 'f', 'o', 'r', ' ', 't', 'e', 's', 't', 's'}); } /** @@ -82,13 +85,13 @@ public void test_bytesContentOf() { @Test public void test_bytesContentFromClassPathOf() { byte[] bytes = bytesContentFromClassPathOf("test.txt"); - assertThat(bytes).isEqualTo(new byte[] { 'T', 'e', 'x', 't', ' ', 'f', 'o', 'r', ' ', 't', 'e', 's', 't', 's' }); + assertThat(bytes).isEqualTo(new byte[]{'T', 'e', 'x', 't', ' ', 'f', 'o', 'r', ' ', 't', 'e', 's', 't', 's'}); } /** * This method should throw an {@code AssertJDBException} when the {@code InputStream} throw an {@code IOException} * during the reading. - * + * * @throws Throwable */ @Test(expected = AssertJDBException.class) @@ -105,7 +108,7 @@ public void close() throws IOException { throw new IOException(); } }; - + Class assertionClass = Assertions.class; Method method = assertionClass.getDeclaredMethod("read", InputStream.class); method.setAccessible(true); @@ -119,7 +122,7 @@ public void close() throws IOException { /** * This method should throw an {@code AssertJDBException} when the {@code InputStream} throw an {@code IOException} * during the reading. - * + * * @throws Throwable */ @Test(expected = AssertJDBException.class) @@ -131,7 +134,7 @@ public synchronized int read() throws IOException { throw new IOException(); } }; - + Class assertionClass = Assertions.class; Method method = assertionClass.getDeclaredMethod("read", InputStream.class); method.setAccessible(true); diff --git a/src/test/java/org/assertj/db/api/Assertions_Constructor_Test.java b/src/test/java/org/assertj/db/api/Assertions_Constructor_Test.java index 19e45d9a..b6eb545f 100644 --- a/src/test/java/org/assertj/db/api/Assertions_Constructor_Test.java +++ b/src/test/java/org/assertj/db/api/Assertions_Constructor_Test.java @@ -8,34 +8,34 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api; -import org.junit.Test; +import static org.assertj.core.api.Assertions.assertThat; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Modifier; -import static org.assertj.core.api.Assertions.assertThat; +import org.junit.Test; /** * Test on the utility class {@code Assertions} : the private constructor. - * + * * @author Régis Pouiller - * */ public class Assertions_Constructor_Test { /** * This method tests the private constructor of {@code Assertions} for the tests coverage.. - * @throws NoSuchMethodException - * @throws SecurityException + * + * @throws NoSuchMethodException + * @throws SecurityException * @throws java.lang.reflect.InvocationTargetException - * @throws IllegalAccessException - * @throws InstantiationException - * @throws IllegalArgumentException + * @throws IllegalAccessException + * @throws InstantiationException + * @throws IllegalArgumentException */ @Test public void test_private_constructor_for_the_tests_coverage() throws SecurityException, NoSuchMethodException, IllegalArgumentException, InstantiationException, IllegalAccessException, InvocationTargetException { diff --git a/src/test/java/org/assertj/db/api/BDDAssertions_BytesContent_Test.java b/src/test/java/org/assertj/db/api/BDDAssertions_BytesContent_Test.java index 90588932..e88207c6 100644 --- a/src/test/java/org/assertj/db/api/BDDAssertions_BytesContent_Test.java +++ b/src/test/java/org/assertj/db/api/BDDAssertions_BytesContent_Test.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api; @@ -29,9 +29,8 @@ /** * Tests on {@code bytesContentOf} and {@code bytesContentFromClassPathOf} methods of {@code BDDAssertions}. - * + * * @author Régis Pouiller - * */ public class BDDAssertions_BytesContent_Test { @@ -77,7 +76,7 @@ public void should_throw_AssertJDBException_if_call_of_bytesContentFromClassPath @Test public void test_bytesContentOf() { byte[] bytes = bytesContentOf(new File("target/test-classes/test.txt")); - assertThat(bytes).isEqualTo(new byte[] { 'T', 'e', 'x', 't', ' ', 'f', 'o', 'r', ' ', 't', 'e', 's', 't', 's' }); + assertThat(bytes).isEqualTo(new byte[]{'T', 'e', 'x', 't', ' ', 'f', 'o', 'r', ' ', 't', 'e', 's', 't', 's'}); } /** @@ -86,13 +85,13 @@ public void test_bytesContentOf() { @Test public void test_bytesContentFromClassPathOf() { byte[] bytes = bytesContentFromClassPathOf("test.txt"); - assertThat(bytes).isEqualTo(new byte[] { 'T', 'e', 'x', 't', ' ', 'f', 'o', 'r', ' ', 't', 'e', 's', 't', 's' }); + assertThat(bytes).isEqualTo(new byte[]{'T', 'e', 'x', 't', ' ', 'f', 'o', 'r', ' ', 't', 'e', 's', 't', 's'}); } /** * This method should throw an {@code AssertJDBException} when the {@code InputStream} throw an {@code IOException} * during the reading. - * + * * @throws Throwable */ @Test(expected = AssertJDBException.class) @@ -109,7 +108,7 @@ public void close() throws IOException { throw new IOException(); } }; - + Class assertionClass = Assertions.class; Method method = assertionClass.getDeclaredMethod("read", InputStream.class); method.setAccessible(true); @@ -123,7 +122,7 @@ public void close() throws IOException { /** * This method should throw an {@code AssertJDBException} when the {@code InputStream} throw an {@code IOException} * during the reading. - * + * * @throws Throwable */ @Test(expected = AssertJDBException.class) @@ -135,7 +134,7 @@ public synchronized int read() throws IOException { throw new IOException(); } }; - + Class assertionClass = Assertions.class; Method method = assertionClass.getDeclaredMethod("read", InputStream.class); method.setAccessible(true); diff --git a/src/test/java/org/assertj/db/api/BDDAssertions_Constructor_Test.java b/src/test/java/org/assertj/db/api/BDDAssertions_Constructor_Test.java index bedf500f..06714b95 100644 --- a/src/test/java/org/assertj/db/api/BDDAssertions_Constructor_Test.java +++ b/src/test/java/org/assertj/db/api/BDDAssertions_Constructor_Test.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api; @@ -22,20 +22,20 @@ /** * Test on the utility class {@code BDDAssertions} : the private constructor. - * + * * @author Régis Pouiller - * */ public class BDDAssertions_Constructor_Test { /** * This method tests the private constructor of {@code BDDAssertions} for the tests coverage.. - * @throws NoSuchMethodException - * @throws SecurityException + * + * @throws NoSuchMethodException + * @throws SecurityException * @throws java.lang.reflect.InvocationTargetException - * @throws IllegalAccessException - * @throws InstantiationException - * @throws IllegalArgumentException + * @throws IllegalAccessException + * @throws InstantiationException + * @throws IllegalArgumentException */ @Test public void test_private_constructor_for_the_tests_coverage() throws SecurityException, NoSuchMethodException, IllegalArgumentException, InstantiationException, IllegalAccessException, InvocationTargetException { diff --git a/src/test/java/org/assertj/db/api/DefaultDescription_Test.java b/src/test/java/org/assertj/db/api/DefaultDescription_Test.java index 3bbe7dc1..7aab2386 100644 --- a/src/test/java/org/assertj/db/api/DefaultDescription_Test.java +++ b/src/test/java/org/assertj/db/api/DefaultDescription_Test.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api; @@ -30,7 +30,6 @@ * Test on default descriptions. * * @author Régis Pouiller - * */ public class DefaultDescription_Test extends AbstractTest { @@ -1120,7 +1119,7 @@ public void test_default_description_value_at_start_point_of_column_of_change_of ChangeColumnValueAssert assertionFromSource = assertThat(changesFromSource).change().column().valueAtStartPoint(); ChangeColumnValueAssert assertionFromDataSource = assertThat(changesFromDataSource).change( - 1).column().valueAtStartPoint(); + 1).column().valueAtStartPoint(); WritableAssertionInfo infoFromSource = (WritableAssertionInfo) field.get(assertionFromSource); @@ -1149,7 +1148,7 @@ public void test_default_description_value_at_end_point_of_column_of_change_of_c ChangeColumnValueAssert assertionFromSource = assertThat(changesFromSource).change().column().valueAtEndPoint(); ChangeColumnValueAssert assertionFromDataSource = assertThat(changesFromDataSource).change( - 1).column().valueAtEndPoint(); + 1).column().valueAtEndPoint(); WritableAssertionInfo infoFromSource = (WritableAssertionInfo) field.get(assertionFromSource); diff --git a/src/test/java/org/assertj/db/api/Descriptable_Test.java b/src/test/java/org/assertj/db/api/Descriptable_Test.java index b55244ac..b0484cfd 100644 --- a/src/test/java/org/assertj/db/api/Descriptable_Test.java +++ b/src/test/java/org/assertj/db/api/Descriptable_Test.java @@ -8,10 +8,15 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api; +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.db.api.Assertions.assertThat; + +import java.lang.reflect.Field; + import org.assertj.core.api.WritableAssertionInfo; import org.assertj.core.description.Description; import org.assertj.core.description.TextDescription; @@ -20,16 +25,10 @@ import org.assertj.db.type.Table; import org.junit.Test; -import java.lang.reflect.Field; - -import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.db.api.Assertions.assertThat; - /** * Test on {@code Descriptable} interface methods. * * @author Régis Pouiller - * */ public class Descriptable_Test extends AbstractTest { diff --git a/src/test/java/org/assertj/db/api/EntryPointsComparison_Test.java b/src/test/java/org/assertj/db/api/EntryPointsComparison_Test.java index 163eac34..d125bb1f 100644 --- a/src/test/java/org/assertj/db/api/EntryPointsComparison_Test.java +++ b/src/test/java/org/assertj/db/api/EntryPointsComparison_Test.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api; @@ -29,15 +29,6 @@ public class EntryPointsComparison_Test { private static final int ACCESS_MODIFIERS = Modifier.PUBLIC | Modifier.PROTECTED | Modifier.PRIVATE; private static final Comparator IGNORING_DECLARING_CLASS_AND_METHOD_NAME = internalMethodComparator(true, false, true); - @Test - public void assertions_and_bdd_assertions_should_have_the_same_methods() { - Method[] thenMethods = findMethodsWithName(BDDAssertions.class, "then"); - Method[] assertThatMethods = findMethodsWithName(Assertions.class, "assertThat"); - - assertThat(thenMethods).usingElementComparator(IGNORING_DECLARING_CLASS_AND_METHOD_NAME) - .containsExactlyInAnyOrder(assertThatMethods); - } - private static Method[] findMethodsWithName(Class clazz, String name, Class... ignoredReturnTypes) { List matchingMethods = new ArrayList<>(); Set> ignoredReturnTypesSet = Sets.newLinkedHashSet(ignoredReturnTypes); @@ -74,4 +65,13 @@ public int compare(Method method1, Method method2) { } }; } + + @Test + public void assertions_and_bdd_assertions_should_have_the_same_methods() { + Method[] thenMethods = findMethodsWithName(BDDAssertions.class, "then"); + Method[] assertThatMethods = findMethodsWithName(Assertions.class, "assertThat"); + + assertThat(thenMethods).usingElementComparator(IGNORING_DECLARING_CLASS_AND_METHOD_NAME) + .containsExactlyInAnyOrder(assertThatMethods); + } } diff --git a/src/test/java/org/assertj/db/api/SoftAssertions_Test.java b/src/test/java/org/assertj/db/api/SoftAssertions_Test.java index 984c8280..5c64be6d 100644 --- a/src/test/java/org/assertj/db/api/SoftAssertions_Test.java +++ b/src/test/java/org/assertj/db/api/SoftAssertions_Test.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api; @@ -28,7 +28,6 @@ * Test on the utility class {@code SoftAssertions}. * * @author Julien Roy - * */ public class SoftAssertions_Test extends AbstractTest { @@ -47,15 +46,16 @@ public void test_soft_assert_table() { softly.assertThat(table).hasNumberOfRows(0); softly.assertThat(table).hasNumberOfColumns(0); softly.assertThat(table) - .row(0).column("var2").value().isFalse() - .returnToColumn() - .column("var1").value().isEqualTo(0); + .row(0).column("var2").value().isFalse() + .returnToColumn() + .column("var1").value().isEqualTo(0); assertThat(softly.wasSuccess()).isFalse(); assertThat(softly.errorsCollected()).hasSize(8); assertThatThrownBy(new ThrowableAssert.ThrowingCallable() { - @Override public void call() { + @Override + public void call() { softly.assertAll(); } }).isInstanceOf(SoftAssertionError.class); @@ -76,15 +76,16 @@ public void test_soft_assert_request() { softly.assertThat(request).hasNumberOfRows(0); softly.assertThat(request).hasNumberOfColumns(0); softly.assertThat(request) - .row(0).column("var2").value().isFalse() - .returnToColumn() - .column("var1").value().isEqualTo(0); + .row(0).column("var2").value().isFalse() + .returnToColumn() + .column("var1").value().isEqualTo(0); assertThat(softly.wasSuccess()).isFalse(); assertThat(softly.errorsCollected()).hasSize(8); assertThatThrownBy(new ThrowableAssert.ThrowingCallable() { - @Override public void call() { + @Override + public void call() { softly.assertAll(); } }).isInstanceOf(SoftAssertionError.class); @@ -110,7 +111,8 @@ public void test_soft_assert_changes() { assertThat(softly.errorsCollected()).hasSize(2); assertThatThrownBy(new ThrowableAssert.ThrowingCallable() { - @Override public void call() { + @Override + public void call() { softly.assertAll(); } }).isInstanceOf(SoftAssertionError.class); diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnChangeType_IsCreation_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnChangeType_IsCreation_Test.java index f79e40c3..b75fc10e 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnChangeType_IsCreation_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnChangeType_IsCreation_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeAssert; import org.assertj.db.common.AbstractTest; @@ -19,15 +22,11 @@ import org.assertj.db.type.Changes; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link AssertOnChangeType} class : * {@link AssertOnChangeType#isCreation()}} method. * * @author Régis Pouiller - * */ public class AssertOnChangeType_IsCreation_Test extends AbstractTest { @@ -61,11 +60,11 @@ public void should_fail_because_type_of_change_is_different() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Change at index 3 (on table : ACTOR and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting:%n" - + "to be of type%n" - + " %n" - + "but was of type%n" - + " ")); + + "Expecting:%n" + + "to be of type%n" + + " %n" + + "but was of type%n" + + " ")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnChangeType_IsDeletion_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnChangeType_IsDeletion_Test.java index c089c062..7af6e086 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnChangeType_IsDeletion_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnChangeType_IsDeletion_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeAssert; import org.assertj.db.common.AbstractTest; @@ -19,15 +22,11 @@ import org.assertj.db.type.Changes; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link AssertOnChangeType} class : * {@link AssertOnChangeType#isDeletion()}} method. * * @author Régis Pouiller - * */ public class AssertOnChangeType_IsDeletion_Test extends AbstractTest { @@ -61,11 +60,11 @@ public void should_fail_because_type_of_change_is_different() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Change at index 3 (on table : ACTOR and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting:%n" - + "to be of type%n" - + " %n" - + "but was of type%n" - + " ")); + + "Expecting:%n" + + "to be of type%n" + + " %n" + + "but was of type%n" + + " ")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnChangeType_IsModification_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnChangeType_IsModification_Test.java index 44c05c5a..c5bd83fb 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnChangeType_IsModification_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnChangeType_IsModification_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeAssert; import org.assertj.db.common.AbstractTest; @@ -19,15 +22,11 @@ import org.assertj.db.type.Changes; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link AssertOnChangeType} class : * {@link AssertOnChangeType#isModification()}} method. * * @author Régis Pouiller - * */ public class AssertOnChangeType_IsModification_Test extends AbstractTest { @@ -61,11 +60,11 @@ public void should_fail_because_type_of_change_is_different() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Change at index 0 (on table : ACTOR and with primary key : [4]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting:%n" - + "to be of type%n" - + " %n" - + "but was of type%n" - + " ")); + + "Expecting:%n" + + "to be of type%n" + + " %n" + + "but was of type%n" + + " ")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnChangeType_IsOfType_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnChangeType_IsOfType_Test.java index c7e85e17..4dce3796 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnChangeType_IsOfType_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnChangeType_IsOfType_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeAssert; import org.assertj.db.common.AbstractTest; @@ -20,15 +23,11 @@ import org.assertj.db.type.Changes; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link AssertOnChangeType} class : * {@link AssertOnChangeType#isOfType(org.assertj.db.type.ChangeType)} method. * * @author Régis Pouiller - * */ public class AssertOnChangeType_IsOfType_Test extends AbstractTest { @@ -62,11 +61,11 @@ public void should_fail_because_type_of_change_is_different() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Change at index 3 (on table : ACTOR and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting:%n" - + "to be of type%n" - + " %n" - + "but was of type%n" - + " ")); + + "Expecting:%n" + + "to be of type%n" + + " %n" + + "but was of type%n" + + " ")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnClass_IsOfClass_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnClass_IsOfClass_Test.java index c718072b..0c9f1d90 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnClass_IsOfClass_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnClass_IsOfClass_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeColumnAssert; import org.assertj.db.api.TableColumnAssert; @@ -21,15 +24,11 @@ import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link AssertOnColumnClass} class : * {@link AssertOnColumnClass#isOfClass(Class, boolean)} method. * * @author Régis Pouiller - * */ public class AssertOnColumnClass_IsOfClass_Test extends AbstractTest { @@ -78,44 +77,44 @@ public void should_fail_because_value_have_different_type() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 1 (column name : VAR2) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting that the value at start point:%n" - + " %n" - + "to be of class%n" - + " ")); + + "Expecting that the value at start point:%n" + + " %n" + + "to be of class%n" + + " ")); } try { assertThat(changes).change(1).column("var1").isOfClass(Boolean.class, true); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 0 (column name : VAR1) of Change at index 1 (on table : TEST and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting that the value at start point:%n" - + " <1>%n" - + "to be of class%n" - + " %n" - + "but was of class%n" - + " ")); + + "Expecting that the value at start point:%n" + + " <1>%n" + + "to be of class%n" + + " %n" + + "but was of class%n" + + " ")); } try { assertThat(table).column("var1").isOfClass(Boolean.class, true); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 0 (column name : VAR1) of TEST table] %n" - + "Expecting that the value at index 0:%n" - + " <1>%n" - + "to be of class%n" - + " %n" - + "but was of class%n" - + " ")); + + "Expecting that the value at index 0:%n" + + " <1>%n" + + "to be of class%n" + + " %n" + + "but was of class%n" + + " ")); } try { assertThat(table2).column("var2").isOfClass(Boolean.class, false); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 1 (column name : VAR2) of TEST2 table] %n" - + "Expecting that the value at index 1:%n" - + " %n" - + "to be of class%n" - + " ")); + + "Expecting that the value at index 1:%n" + + " %n" + + "to be of class%n" + + " ")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnContent_ContainsValues_Boolean_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnContent_ContainsValues_Boolean_Test.java index a6bdc7ec..9382938a 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnContent_ContainsValues_Boolean_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnContent_ContainsValues_Boolean_Test.java @@ -8,25 +8,24 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.TableColumnAssert; import org.assertj.db.common.AbstractTest; import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnColumnContent} class : * {@link AssertOnColumnContent#containsValues(Boolean...)} method. * * @author Régis Pouiller - * */ public class AssertOnColumnContent_ContainsValues_Boolean_Test extends AbstractTest { @@ -58,11 +57,11 @@ public void should_fail_because_values_are_different() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 1 (column name : VAR2) of TEST table] %n" - + "Expecting:%n" - + " <[true, false, false, false]>%n" - + "to contain: %n" - + " <[true, false, true, false]>%n" - + " (parameter at index 2 is not found)")); + + "Expecting:%n" + + " <[true, false, false, false]>%n" + + "to contain: %n" + + " <[true, false, true, false]>%n" + + " (parameter at index 2 is not found)")); } Table table2 = new Table(source, "test2"); TableColumnAssert tableColumnAssert2 = assertThat(table2).column("var2"); @@ -71,12 +70,12 @@ public void should_fail_because_values_are_different() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format( - "[Column at index 1 (column name : VAR2) of TEST2 table] %n" - + "Expecting:%n" - + " <[true, null]>%n" - + "to contain: %n" - + " <[true, true]>%n" - + " (parameter at index 1 is not found)")); + "[Column at index 1 (column name : VAR2) of TEST2 table] %n" + + "Expecting:%n" + + " <[true, null]>%n" + + "to contain: %n" + + " <[true, true]>%n" + + " (parameter at index 1 is not found)")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnContent_ContainsValues_Bytes_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnContent_ContainsValues_Bytes_Test.java index 23f53d4e..ce578d1f 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnContent_ContainsValues_Bytes_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnContent_ContainsValues_Bytes_Test.java @@ -8,26 +8,25 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.assertj.db.api.Assertions.bytesContentFromClassPathOf; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.TableColumnAssert; import org.assertj.db.common.AbstractTest; import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.assertj.db.api.Assertions.bytesContentFromClassPathOf; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnColumnContent} class : * {@link AssertOnColumnContent#containsValues(byte[]...)} method. * * @author Régis Pouiller - * */ public class AssertOnColumnContent_ContainsValues_Bytes_Test extends AbstractTest { @@ -64,8 +63,8 @@ public void should_fail_because_values_are_different() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 10 (column name : VAR11) of TEST table] %n" - + "Expecting to contain values but not%n" - + " (parameter at index 1 is not found)")); + + "Expecting to contain values but not%n" + + " (parameter at index 1 is not found)")); } Table table2 = new Table(source, "test2"); @@ -75,8 +74,8 @@ public void should_fail_because_values_are_different() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 10 (column name : VAR11) of TEST2 table] %n" - + "Expecting to contain values but not%n" - + " (parameter at index 1 is not found)")); + + "Expecting to contain values but not%n" + + " (parameter at index 1 is not found)")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnContent_ContainsValues_Character_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnContent_ContainsValues_Character_Test.java index 704d1a29..7144dfd4 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnContent_ContainsValues_Character_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnContent_ContainsValues_Character_Test.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; @@ -26,7 +26,6 @@ * {@link AssertOnColumnContent#containsValues(Character...)} method. * * @author Régis Pouiller - * */ public class AssertOnColumnContent_ContainsValues_Character_Test extends AbstractTest { @@ -58,11 +57,11 @@ public void should_fail_because_values_are_different() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 15 (column name : VAR16) of TEST table] %n" - + "Expecting:%n" - + " <[\"T\", \"e\", \"s\", \"t\"]>%n" - + "to contain: %n" - + " <['t', 'e', 's', 't']>%n" - + " (parameter <'t'> at index 3 is not found)")); + + "Expecting:%n" + + " <[\"T\", \"e\", \"s\", \"t\"]>%n" + + "to contain: %n" + + " <['t', 'e', 's', 't']>%n" + + " (parameter <'t'> at index 3 is not found)")); } Table table2 = new Table(source, "test2"); TableColumnAssert tableColumnAssert2 = assertThat(table2).column("var17"); @@ -71,12 +70,12 @@ public void should_fail_because_values_are_different() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format( - "[Column at index 16 (column name : VAR17) of TEST2 table] %n" - + "Expecting:%n" - + " <[\"T\", null]>%n" - + "to contain: %n" - + " <['T', 'T']>%n" - + " (parameter <'T'> at index 1 is not found)")); + "[Column at index 16 (column name : VAR17) of TEST2 table] %n" + + "Expecting:%n" + + " <[\"T\", null]>%n" + + "to contain: %n" + + " <['T', 'T']>%n" + + " (parameter <'T'> at index 1 is not found)")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnContent_ContainsValues_DateTimeValue_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnContent_ContainsValues_DateTimeValue_Test.java index 4222fede..d0cd0dc5 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnContent_ContainsValues_DateTimeValue_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnContent_ContainsValues_DateTimeValue_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.TableColumnAssert; import org.assertj.db.common.AbstractTest; @@ -21,15 +24,11 @@ import org.assertj.db.type.TimeValue; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnColumnContent} class : * {@link AssertOnColumnContent#containsValues(org.assertj.db.type.DateTimeValue...)} method. * * @author Régis Pouiller - * */ public class AssertOnColumnContent_ContainsValues_DateTimeValue_Test extends AbstractTest { @@ -41,31 +40,31 @@ public void test_has_values() throws Exception { Table table = new Table(source, "test"); TableColumnAssert tableColumnAssert = assertThat(table).column("var10"); TableColumnAssert tableColumnAssertReturn = tableColumnAssert.containsValues( - DateTimeValue.of(DateValue.of(2014, 5, 24), TimeValue.of(9, 46, 30)), - DateTimeValue.of(DateValue.of(2014, 5, 30), TimeValue.of(12, 29, 49)), - DateTimeValue.of(DateValue.of(2014, 5, 30)), - DateTimeValue.of(DateValue.of(2014, 5, 30))); + DateTimeValue.of(DateValue.of(2014, 5, 24), TimeValue.of(9, 46, 30)), + DateTimeValue.of(DateValue.of(2014, 5, 30), TimeValue.of(12, 29, 49)), + DateTimeValue.of(DateValue.of(2014, 5, 30)), + DateTimeValue.of(DateValue.of(2014, 5, 30))); Assertions.assertThat(tableColumnAssert).isSameAs(tableColumnAssertReturn); Table table2 = new Table(source, "test2"); TableColumnAssert tableColumnAssert2 = assertThat(table2).column("var10"); TableColumnAssert tableColumnAssertReturn2 = tableColumnAssert2.containsValues( - DateTimeValue.of(DateValue.of(2014, 5, 24), TimeValue.of(9, 46, 30)), - null); + DateTimeValue.of(DateValue.of(2014, 5, 24), TimeValue.of(9, 46, 30)), + null); Assertions.assertThat(tableColumnAssert2).isSameAs(tableColumnAssertReturn2); TableColumnAssert tableColumnAssert3 = assertThat(table).column("var9"); TableColumnAssert tableColumnAssertReturn3 = tableColumnAssert3.containsValues( - DateTimeValue.of(DateValue.of(2014, 5, 24)), - DateTimeValue.of(DateValue.of(2014, 5, 30)), - DateTimeValue.of(DateValue.of(2014, 5, 30)), - DateTimeValue.of(DateValue.of(2014, 5, 30))); + DateTimeValue.of(DateValue.of(2014, 5, 24)), + DateTimeValue.of(DateValue.of(2014, 5, 30)), + DateTimeValue.of(DateValue.of(2014, 5, 30)), + DateTimeValue.of(DateValue.of(2014, 5, 30))); Assertions.assertThat(tableColumnAssert3).isSameAs(tableColumnAssertReturn3); TableColumnAssert tableColumnAssert4 = assertThat(table2).column("var9"); TableColumnAssert tableColumnAssertReturn4 = tableColumnAssert4.containsValues( - DateTimeValue.of(DateValue.of(2014, 5, 24)), - null); + DateTimeValue.of(DateValue.of(2014, 5, 24)), + null); Assertions.assertThat(tableColumnAssert4).isSameAs(tableColumnAssertReturn4); } @@ -78,71 +77,71 @@ public void should_fail_because_values_are_different() throws Exception { TableColumnAssert tableColumnAssert = assertThat(table).column("var10"); try { tableColumnAssert.containsValues(DateTimeValue.of(DateValue.of(2014, 5, 24), TimeValue.of(9, 46, 30)), - DateTimeValue.of(DateValue.of(2014, 5, 30), TimeValue.of(13, 29, 49)), - DateTimeValue.of(DateValue.of(2014, 5, 30)), - DateTimeValue.of(DateValue.of(2014, 5, 30))); + DateTimeValue.of(DateValue.of(2014, 5, 30), TimeValue.of(13, 29, 49)), + DateTimeValue.of(DateValue.of(2014, 5, 30)), + DateTimeValue.of(DateValue.of(2014, 5, 30))); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 9 (column name : VAR10) of TEST table] %n" - + "Expecting:%n" - + " <[2014-05-24T09:46:30.000000000,%n" - + " 2014-05-30T12:29:49.000000000,%n" - + " 2014-05-30T00:00:00.000000000,%n" - + " 2014-05-30T00:00:00.000000000]>%n" - + "to contain: %n" - + " <[2014-05-24T09:46:30.000000000,%n" - + " 2014-05-30T13:29:49.000000000,%n" - + " 2014-05-30T00:00:00.000000000,%n" - + " 2014-05-30T00:00:00.000000000]>%n" - + " (parameter <2014-05-30T13:29:49.000000000> at index 1 is not found)")); + + "Expecting:%n" + + " <[2014-05-24T09:46:30.000000000,%n" + + " 2014-05-30T12:29:49.000000000,%n" + + " 2014-05-30T00:00:00.000000000,%n" + + " 2014-05-30T00:00:00.000000000]>%n" + + "to contain: %n" + + " <[2014-05-24T09:46:30.000000000,%n" + + " 2014-05-30T13:29:49.000000000,%n" + + " 2014-05-30T00:00:00.000000000,%n" + + " 2014-05-30T00:00:00.000000000]>%n" + + " (parameter <2014-05-30T13:29:49.000000000> at index 1 is not found)")); } Table table2 = new Table(source, "test2"); TableColumnAssert tableColumnAssert2 = assertThat(table2).column("var10"); try { tableColumnAssert2.containsValues(DateTimeValue.of(DateValue.of(2014, 5, 24), TimeValue.of(9, 46, 30)), - DateTimeValue.of(DateValue.of(2014, 5, 24), TimeValue.of(9, 46, 30))); + DateTimeValue.of(DateValue.of(2014, 5, 24), TimeValue.of(9, 46, 30))); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 9 (column name : VAR10) of TEST2 table] %n" - + "Expecting:%n" - + " <[2014-05-24T09:46:30.000000000, null]>%n" - + "to contain: %n" - + " <[2014-05-24T09:46:30.000000000, 2014-05-24T09:46:30.000000000]>%n" - + " (parameter <2014-05-24T09:46:30.000000000> at index 1 is not found)")); + + "Expecting:%n" + + " <[2014-05-24T09:46:30.000000000, null]>%n" + + "to contain: %n" + + " <[2014-05-24T09:46:30.000000000, 2014-05-24T09:46:30.000000000]>%n" + + " (parameter <2014-05-24T09:46:30.000000000> at index 1 is not found)")); } TableColumnAssert tableColumnAssert3 = assertThat(table).column("var9"); try { tableColumnAssert3.containsValues(DateTimeValue.of(DateValue.of(2014, 5, 24)), - DateTimeValue.of(DateValue.of(2014, 5, 24)), - DateTimeValue.of(DateValue.of(2014, 5, 30)), - DateTimeValue.of(DateValue.of(2014, 5, 30))); + DateTimeValue.of(DateValue.of(2014, 5, 24)), + DateTimeValue.of(DateValue.of(2014, 5, 30)), + DateTimeValue.of(DateValue.of(2014, 5, 30))); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 8 (column name : VAR9) of TEST table] %n" - + "Expecting:%n" - + " <[2014-05-24T00:00:00.000 (java.sql.Date),%n" - + " 2014-05-30T00:00:00.000 (java.sql.Date),%n" - + " 2014-05-30T00:00:00.000 (java.sql.Date),%n" - + " 2014-05-30T00:00:00.000 (java.sql.Date)]>%n" - + "to contain: %n" - + " <[2014-05-24T00:00:00.000000000,%n" - + " 2014-05-24T00:00:00.000000000,%n" - + " 2014-05-30T00:00:00.000000000,%n" - + " 2014-05-30T00:00:00.000000000]>%n" - + " (parameter <2014-05-24T00:00:00.000000000> at index 1 is not found)")); + + "Expecting:%n" + + " <[2014-05-24T00:00:00.000 (java.sql.Date),%n" + + " 2014-05-30T00:00:00.000 (java.sql.Date),%n" + + " 2014-05-30T00:00:00.000 (java.sql.Date),%n" + + " 2014-05-30T00:00:00.000 (java.sql.Date)]>%n" + + "to contain: %n" + + " <[2014-05-24T00:00:00.000000000,%n" + + " 2014-05-24T00:00:00.000000000,%n" + + " 2014-05-30T00:00:00.000000000,%n" + + " 2014-05-30T00:00:00.000000000]>%n" + + " (parameter <2014-05-24T00:00:00.000000000> at index 1 is not found)")); } TableColumnAssert tableColumnAssert4 = assertThat(table2).column("var9"); try { tableColumnAssert4.containsValues(DateTimeValue.of(DateValue.of(2014, 5, 24)), - DateTimeValue.of(DateValue.of(2014, 5, 24))); + DateTimeValue.of(DateValue.of(2014, 5, 24))); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 8 (column name : VAR9) of TEST2 table] %n" - + "Expecting:%n" - + " <[2014-05-24T00:00:00.000 (java.sql.Date), null]>%n" - + "to contain: %n" - + " <[2014-05-24T00:00:00.000000000, 2014-05-24T00:00:00.000000000]>%n" - + " (parameter <2014-05-24T00:00:00.000000000> at index 1 is not found)")); + + "Expecting:%n" + + " <[2014-05-24T00:00:00.000 (java.sql.Date), null]>%n" + + "to contain: %n" + + " <[2014-05-24T00:00:00.000000000, 2014-05-24T00:00:00.000000000]>%n" + + " (parameter <2014-05-24T00:00:00.000000000> at index 1 is not found)")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnContent_ContainsValues_DateValue_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnContent_ContainsValues_DateValue_Test.java index a6ca1e2b..b75ecddd 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnContent_ContainsValues_DateValue_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnContent_ContainsValues_DateValue_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.TableColumnAssert; import org.assertj.db.common.AbstractTest; @@ -20,15 +23,11 @@ import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnColumnContent} class : * {@link AssertOnColumnContent#containsValues(org.assertj.db.type.DateValue...)} method. * * @author Régis Pouiller - * */ public class AssertOnColumnContent_ContainsValues_DateValue_Test extends AbstractTest { @@ -42,20 +41,20 @@ public void test_has_values() throws Exception { Table table = new Table(source, "test"); TableColumnAssert tableColumnAssert = assertThat(table).column("var9"); TableColumnAssert tableColumnAssertReturn = tableColumnAssert.containsValues( - DateValue.of(2014, 5, 24), - DateValue.of(2014, 5, 30), - DateValue.of(2014, 5, 30), - DateValue.of(2014, 5, 30)); + DateValue.of(2014, 5, 24), + DateValue.of(2014, 5, 30), + DateValue.of(2014, 5, 30), + DateValue.of(2014, 5, 30)); Assertions.assertThat(tableColumnAssert).isSameAs(tableColumnAssertReturn); Table table2 = new Table(source, "test2"); TableColumnAssert tableColumnAssert2 = assertThat(table2).column("var9"); TableColumnAssert tableColumnAssertReturn2 = tableColumnAssert2.containsValues(DateValue.of(2014, 5, 24), - null); + null); Assertions.assertThat(tableColumnAssert2).isSameAs(tableColumnAssertReturn2); TableColumnAssert tableColumnAssert3 = assertThat(table2).column("var10"); TableColumnAssert tableColumnAssertReturn3 = tableColumnAssert3.containsValues(DateValue.of(2014, 5, 24), - null); + null); Assertions.assertThat(tableColumnAssert3).isSameAs(tableColumnAssertReturn3); } @@ -68,47 +67,47 @@ public void should_fail_because_values_are_different() throws Exception { TableColumnAssert tableColumnAssert = assertThat(table).column("var9"); try { tableColumnAssert.containsValues(DateValue.of(2014, 5, 24), - DateValue.of(2014, 5, 29), - DateValue.of(2014, 5, 30), - DateValue.of(2014, 5, 30)); + DateValue.of(2014, 5, 29), + DateValue.of(2014, 5, 30), + DateValue.of(2014, 5, 30)); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 8 (column name : VAR9) of TEST table] %n" - + "Expecting:%n" - + " <[2014-05-24T00:00:00.000 (java.sql.Date),%n" - + " 2014-05-30T00:00:00.000 (java.sql.Date),%n" - + " 2014-05-30T00:00:00.000 (java.sql.Date),%n" - + " 2014-05-30T00:00:00.000 (java.sql.Date)]>%n" - + "to contain: %n" - + " <[2014-05-24, 2014-05-29, 2014-05-30, 2014-05-30]>%n" - + " (parameter <2014-05-29> at index 1 is not found)")); + + "Expecting:%n" + + " <[2014-05-24T00:00:00.000 (java.sql.Date),%n" + + " 2014-05-30T00:00:00.000 (java.sql.Date),%n" + + " 2014-05-30T00:00:00.000 (java.sql.Date),%n" + + " 2014-05-30T00:00:00.000 (java.sql.Date)]>%n" + + "to contain: %n" + + " <[2014-05-24, 2014-05-29, 2014-05-30, 2014-05-30]>%n" + + " (parameter <2014-05-29> at index 1 is not found)")); } Table table2 = new Table(source, "test2"); TableColumnAssert tableColumnAssert2 = assertThat(table2).column("var9"); try { tableColumnAssert2.containsValues(DateValue.of(2014, 5, 24), - DateValue.of(2014, 5, 24)); + DateValue.of(2014, 5, 24)); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 8 (column name : VAR9) of TEST2 table] %n" - + "Expecting:%n" - + " <[2014-05-24T00:00:00.000 (java.sql.Date), null]>%n" - + "to contain: %n" - + " <[2014-05-24, 2014-05-24]>%n" - + " (parameter <2014-05-24> at index 1 is not found)")); + + "Expecting:%n" + + " <[2014-05-24T00:00:00.000 (java.sql.Date), null]>%n" + + "to contain: %n" + + " <[2014-05-24, 2014-05-24]>%n" + + " (parameter <2014-05-24> at index 1 is not found)")); } TableColumnAssert tableColumnAssert3 = assertThat(table2).column("var10"); try { tableColumnAssert3.containsValues(DateValue.of(2014, 5, 23), - null); + null); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 9 (column name : VAR10) of TEST2 table] %n" - + "Expecting:%n" - + " <[2014-05-24T09:46:30.000000000, null]>%n" - + "to contain: %n" - + " <[2014-05-23, null]>%n" - + " (parameter <2014-05-23> at index 0 is not found)")); + + "Expecting:%n" + + " <[2014-05-24T09:46:30.000000000, null]>%n" + + "to contain: %n" + + " <[2014-05-23, null]>%n" + + " (parameter <2014-05-23> at index 0 is not found)")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnContent_ContainsValues_Number_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnContent_ContainsValues_Number_Test.java index 484d15be..e3b6d3cb 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnContent_ContainsValues_Number_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnContent_ContainsValues_Number_Test.java @@ -8,25 +8,24 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.TableColumnAssert; import org.assertj.db.common.AbstractTest; import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnColumnContent} class : * {@link AssertOnColumnContent#containsValues(Number...)} method. * * @author Régis Pouiller - * */ public class AssertOnColumnContent_ContainsValues_Number_Test extends AbstractTest { @@ -106,11 +105,11 @@ public void should_fail_because_values_are_different() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 2 (column name : VAR3) of TEST table] %n" - + "Expecting:%n" - + " <[2, 20, 25, 0]>%n" - + "to contain: %n" - + " <[2, 20, 35, 0]>%n" - + " (parameter <35> at index 2 is not found)")); + + "Expecting:%n" + + " <[2, 20, 25, 0]>%n" + + "to contain: %n" + + " <[2, 20, 35, 0]>%n" + + " (parameter <35> at index 2 is not found)")); } Table table2 = new Table(source, "test2"); TableColumnAssert tableColumnAssert2 = assertThat(table2).column("var3"); @@ -119,11 +118,11 @@ public void should_fail_because_values_are_different() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 2 (column name : VAR3) of TEST2 table] %n" - + "Expecting:%n" - + " <[2, null]>%n" - + "to contain: %n" - + " <[2, 2]>%n" - + " (parameter <2> at index 1 is not found)")); + + "Expecting:%n" + + " <[2, null]>%n" + + "to contain: %n" + + " <[2, 2]>%n" + + " (parameter <2> at index 1 is not found)")); } TableColumnAssert tableColumnAssert3 = assertThat(table).column("var4"); @@ -132,11 +131,11 @@ public void should_fail_because_values_are_different() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 3 (column name : VAR4) of TEST table] %n" - + "Expecting:%n" - + " <[3, 30, 300, 0]>%n" - + "to contain: %n" - + " <[3, 35, 300, 0]>%n" - + " (parameter <35> at index 1 is not found)")); + + "Expecting:%n" + + " <[3, 30, 300, 0]>%n" + + "to contain: %n" + + " <[3, 35, 300, 0]>%n" + + " (parameter <35> at index 1 is not found)")); } TableColumnAssert tableColumnAssert4 = assertThat(table2).column("var4"); @@ -145,11 +144,11 @@ public void should_fail_because_values_are_different() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 3 (column name : VAR4) of TEST2 table] %n" - + "Expecting:%n" - + " <[3, null]>%n" - + "to contain: %n" - + " <[3, 3]>%n" - + " (parameter <3> at index 1 is not found)")); + + "Expecting:%n" + + " <[3, null]>%n" + + "to contain: %n" + + " <[3, 3]>%n" + + " (parameter <3> at index 1 is not found)")); } TableColumnAssert tableColumnAssert5 = assertThat(table).column("var5"); @@ -158,11 +157,11 @@ public void should_fail_because_values_are_different() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 4 (column name : VAR5) of TEST table] %n" - + "Expecting:%n" - + " <[4L, 40L, 400L, 0L]>%n" - + "to contain: %n" - + " <[4, 45, 400, 0]>%n" - + " (parameter <45> at index 1 is not found)")); + + "Expecting:%n" + + " <[4L, 40L, 400L, 0L]>%n" + + "to contain: %n" + + " <[4, 45, 400, 0]>%n" + + " (parameter <45> at index 1 is not found)")); } TableColumnAssert tableColumnAssert6 = assertThat(table2).column("var5"); @@ -171,11 +170,11 @@ public void should_fail_because_values_are_different() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 4 (column name : VAR5) of TEST2 table] %n" - + "Expecting:%n" - + " <[4L, null]>%n" - + "to contain: %n" - + " <[4, 4]>%n" - + " (parameter <4> at index 1 is not found)")); + + "Expecting:%n" + + " <[4L, null]>%n" + + "to contain: %n" + + " <[4, 4]>%n" + + " (parameter <4> at index 1 is not found)")); } TableColumnAssert tableColumnAssert7 = assertThat(table).column("var6"); @@ -184,11 +183,11 @@ public void should_fail_because_values_are_different() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 5 (column name : VAR6) of TEST table] %n" - + "Expecting:%n" - + " <[5.60, 50.60, 500.60, 0.00]>%n" - + "to contain: %n" - + " <[5.6, 55.6, 500.6, 0]>%n" - + " (parameter <55.6> at index 1 is not found)")); + + "Expecting:%n" + + " <[5.60, 50.60, 500.60, 0.00]>%n" + + "to contain: %n" + + " <[5.6, 55.6, 500.6, 0]>%n" + + " (parameter <55.6> at index 1 is not found)")); } TableColumnAssert tableColumnAssert8 = assertThat(table2).column("var6"); @@ -197,11 +196,11 @@ public void should_fail_because_values_are_different() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 5 (column name : VAR6) of TEST2 table] %n" - + "Expecting:%n" - + " <[5.60, null]>%n" - + "to contain: %n" - + " <[5.6, 5.6]>%n" - + " (parameter <5.6> at index 1 is not found)")); + + "Expecting:%n" + + " <[5.60, null]>%n" + + "to contain: %n" + + " <[5.6, 5.6]>%n" + + " (parameter <5.6> at index 1 is not found)")); } TableColumnAssert tableColumnAssert9 = assertThat(table).column("var7"); @@ -210,11 +209,11 @@ public void should_fail_because_values_are_different() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 6 (column name : VAR7) of TEST table] %n" - + "Expecting:%n" - + " <[7.8f, 70.8f, 700.8f, 0.0f]>%n" - + "to contain: %n" - + " <[7.8, 75.8, 700.8, 0]>%n" - + " (parameter <75.8> at index 1 is not found)")); + + "Expecting:%n" + + " <[7.8f, 70.8f, 700.8f, 0.0f]>%n" + + "to contain: %n" + + " <[7.8, 75.8, 700.8, 0]>%n" + + " (parameter <75.8> at index 1 is not found)")); } TableColumnAssert tableColumnAssert10 = assertThat(table2).column("var7"); @@ -223,11 +222,11 @@ public void should_fail_because_values_are_different() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 6 (column name : VAR7) of TEST2 table] %n" - + "Expecting:%n" - + " <[7.8f, null]>%n" - + "to contain: %n" - + " <[7.8, 7.8]>%n" - + " (parameter <7.8> at index 1 is not found)")); + + "Expecting:%n" + + " <[7.8f, null]>%n" + + "to contain: %n" + + " <[7.8, 7.8]>%n" + + " (parameter <7.8> at index 1 is not found)")); } TableColumnAssert tableColumnAssert11 = assertThat(table).column("var13"); @@ -236,11 +235,11 @@ public void should_fail_because_values_are_different() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 12 (column name : VAR13) of TEST table] %n" - + "Expecting:%n" - + " <[5.00, 50.00, 500.00, 500.00]>%n" - + "to contain: %n" - + " <[5, 50, 505, 500]>%n" - + " (parameter <505> at index 2 is not found)")); + + "Expecting:%n" + + " <[5.00, 50.00, 500.00, 500.00]>%n" + + "to contain: %n" + + " <[5, 50, 505, 500]>%n" + + " (parameter <505> at index 2 is not found)")); } TableColumnAssert tableColumnAssert12 = assertThat(table2).column("var13"); @@ -249,11 +248,11 @@ public void should_fail_because_values_are_different() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 12 (column name : VAR13) of TEST2 table] %n" - + "Expecting:%n" - + " <[5.00, null]>%n" - + "to contain: %n" - + " <[5, 5]>%n" - + " (parameter <5> at index 1 is not found)")); + + "Expecting:%n" + + " <[5.00, null]>%n" + + "to contain: %n" + + " <[5, 5]>%n" + + " (parameter <5> at index 1 is not found)")); } TableColumnAssert tableColumnAssert13 = assertThat(table).column("var14"); @@ -262,11 +261,11 @@ public void should_fail_because_values_are_different() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 13 (column name : VAR14) of TEST table] %n" - + "Expecting:%n" - + " <[7.0f, 70.0f, 700.0f, 700.0f]>%n" - + "to contain: %n" - + " <[7, 70, 750, 700]>%n" - + " (parameter <750> at index 2 is not found)")); + + "Expecting:%n" + + " <[7.0f, 70.0f, 700.0f, 700.0f]>%n" + + "to contain: %n" + + " <[7, 70, 750, 700]>%n" + + " (parameter <750> at index 2 is not found)")); } TableColumnAssert tableColumnAssert14 = assertThat(table2).column("var14"); @@ -275,11 +274,11 @@ public void should_fail_because_values_are_different() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 13 (column name : VAR14) of TEST2 table] %n" - + "Expecting:%n" - + " <[7.0f, null]>%n" - + "to contain: %n" - + " <[7, 7]>%n" - + " (parameter <7> at index 1 is not found)")); + + "Expecting:%n" + + " <[7.0f, null]>%n" + + "to contain: %n" + + " <[7, 7]>%n" + + " (parameter <7> at index 1 is not found)")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnContent_ContainsValues_String_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnContent_ContainsValues_String_Test.java index 5660a701..3ac469c7 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnContent_ContainsValues_String_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnContent_ContainsValues_String_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.TableColumnAssert; import org.assertj.db.common.AbstractTest; @@ -19,15 +22,11 @@ import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnColumnContent} class : * {@link AssertOnColumnContent#containsValues(String...)} method. * * @author Régis Pouiller - * */ public class AssertOnColumnContent_ContainsValues_String_Test extends AbstractTest { @@ -97,8 +96,8 @@ public void test_has_values() throws Exception { TableColumnAssert tableColumnAssert15 = assertThat(table).column("var12"); TableColumnAssert tableColumnAssertReturn15 = tableColumnAssert15.containsValues("text", "another text", - "another text again", - "another text again"); + "another text again", + "another text again"); Assertions.assertThat(tableColumnAssert15).isSameAs(tableColumnAssertReturn15); TableColumnAssert tableColumnAssert16 = assertThat(table2).column("var12"); @@ -107,9 +106,9 @@ public void test_has_values() throws Exception { TableColumnAssert tableColumnAssert20 = assertThat(table).column("var8"); TableColumnAssert tableColumnAssertReturn20 = tableColumnAssert20.containsValues("09:46:30", - "12:29:49", - "12:29:49", - "12:29:49"); + "12:29:49", + "12:29:49", + "12:29:49"); Assertions.assertThat(tableColumnAssert20).isSameAs(tableColumnAssertReturn20); TableColumnAssert tableColumnAssert21 = assertThat(table2).column("var8"); @@ -118,53 +117,53 @@ public void test_has_values() throws Exception { TableColumnAssert tableColumnAssert22 = assertThat(table).column("var10"); TableColumnAssert tableColumnAssertReturn22 = tableColumnAssert22.containsValues( - "2014-05-24T09:46:30", - "2014-05-30T12:29:49", - "2014-05-30T00:00:00", - "2014-05-30T00:00:00"); + "2014-05-24T09:46:30", + "2014-05-30T12:29:49", + "2014-05-30T00:00:00", + "2014-05-30T00:00:00"); Assertions.assertThat(tableColumnAssert22).isSameAs(tableColumnAssertReturn22); TableColumnAssert tableColumnAssert23 = assertThat(table2).column("var10"); TableColumnAssert tableColumnAssertReturn23 = tableColumnAssert23.containsValues("2014-05-24T09:46:30", - null); + null); Assertions.assertThat(tableColumnAssert23).isSameAs(tableColumnAssertReturn23); TableColumnAssert tableColumnAssert24 = assertThat(table).column("var9"); TableColumnAssert tableColumnAssertReturn24 = tableColumnAssert24.containsValues("2014-05-24T00:00:00", - "2014-05-30T00:00:00", - "2014-05-30T00:00:00", - "2014-05-30T00:00:00"); + "2014-05-30T00:00:00", + "2014-05-30T00:00:00", + "2014-05-30T00:00:00"); Assertions.assertThat(tableColumnAssert24).isSameAs(tableColumnAssertReturn24); TableColumnAssert tableColumnAssert25 = assertThat(table2).column("var9"); TableColumnAssert tableColumnAssertReturn25 = tableColumnAssert25.containsValues("2014-05-24T00:00:00", - null); + null); Assertions.assertThat(tableColumnAssert25).isSameAs(tableColumnAssertReturn25); TableColumnAssert tableColumnAssert17 = assertThat(table).column("var9"); TableColumnAssert tableColumnAssertReturn17 = tableColumnAssert17.containsValues( - "2014-05-24", - "2014-05-30", - "2014-05-30", - "2014-05-30"); + "2014-05-24", + "2014-05-30", + "2014-05-30", + "2014-05-30"); Assertions.assertThat(tableColumnAssert17).isSameAs(tableColumnAssertReturn17); TableColumnAssert tableColumnAssert18 = assertThat(table2).column("var9"); TableColumnAssert tableColumnAssertReturn18 = tableColumnAssert18.containsValues("2014-05-24", - null); + null); Assertions.assertThat(tableColumnAssert18).isSameAs(tableColumnAssertReturn18); update("update test2 set var10 = '2014-05-24' where var1 = 1"); table2 = new Table(source, "test2"); TableColumnAssert tableColumnAssert19 = assertThat(table2).column("var10"); TableColumnAssert tableColumnAssertReturn19 = tableColumnAssert19.containsValues("2014-05-24", - null); + null); Assertions.assertThat(tableColumnAssert19).isSameAs(tableColumnAssertReturn19); TableColumnAssert tableColumnAssert99 = assertThat(table2).column("var16"); TableColumnAssert tableColumnAssertReturn99 = tableColumnAssert99.containsValues( - "30b443ae-c0c9-4790-9bec-ce1380808435", - null); + "30b443ae-c0c9-4790-9bec-ce1380808435", + null); Assertions.assertThat(tableColumnAssert99).isSameAs(tableColumnAssertReturn99); } @@ -180,11 +179,11 @@ public void should_fail_because_values_are_different() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 2 (column name : VAR3) of TEST table] %n" - + "Expecting:%n" - + " <[2, 20, 25, 0]>%n" - + "to contain: %n" - + " <[\"2\", \"20\", \"35\", \"0\"]>%n" - + " (parameter <\"35\"> at index 2 is not found)")); + + "Expecting:%n" + + " <[2, 20, 25, 0]>%n" + + "to contain: %n" + + " <[\"2\", \"20\", \"35\", \"0\"]>%n" + + " (parameter <\"35\"> at index 2 is not found)")); } Table table2 = new Table(source, "test2"); TableColumnAssert tableColumnAssert2 = assertThat(table2).column("var3"); @@ -193,11 +192,11 @@ public void should_fail_because_values_are_different() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 2 (column name : VAR3) of TEST2 table] %n" - + "Expecting:%n" - + " <[2, null]>%n" - + "to contain: %n" - + " <[\"2\", \"2\"]>%n" - + " (parameter <\"2\"> at index 1 is not found)")); + + "Expecting:%n" + + " <[2, null]>%n" + + "to contain: %n" + + " <[\"2\", \"2\"]>%n" + + " (parameter <\"2\"> at index 1 is not found)")); } TableColumnAssert tableColumnAssert3 = assertThat(table).column("var4"); @@ -206,12 +205,12 @@ public void should_fail_because_values_are_different() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format( - "[Column at index 3 (column name : VAR4) of TEST table] %n" - + "Expecting:%n" - + " <[3, 30, 300, 0]>%n" - + "to contain: %n" - + " <[\"3\", \"35\", \"300\", \"0\"]>%n" - + " (parameter <\"35\"> at index 1 is not found)")); + "[Column at index 3 (column name : VAR4) of TEST table] %n" + + "Expecting:%n" + + " <[3, 30, 300, 0]>%n" + + "to contain: %n" + + " <[\"3\", \"35\", \"300\", \"0\"]>%n" + + " (parameter <\"35\"> at index 1 is not found)")); } TableColumnAssert tableColumnAssert4 = assertThat(table2).column("var4"); @@ -220,11 +219,11 @@ public void should_fail_because_values_are_different() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 3 (column name : VAR4) of TEST2 table] %n" - + "Expecting:%n" - + " <[3, null]>%n" - + "to contain: %n" - + " <[\"3\", \"3\"]>%n" - + " (parameter <\"3\"> at index 1 is not found)")); + + "Expecting:%n" + + " <[3, null]>%n" + + "to contain: %n" + + " <[\"3\", \"3\"]>%n" + + " (parameter <\"3\"> at index 1 is not found)")); } TableColumnAssert tableColumnAssert5 = assertThat(table).column("var5"); @@ -233,12 +232,12 @@ public void should_fail_because_values_are_different() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format( - "[Column at index 4 (column name : VAR5) of TEST table] %n" - + "Expecting:%n" - + " <[4L, 40L, 400L, 0L]>%n" - + "to contain: %n" - + " <[\"4\", \"45\", \"400\", \"0\"]>%n" - + " (parameter <\"45\"> at index 1 is not found)")); + "[Column at index 4 (column name : VAR5) of TEST table] %n" + + "Expecting:%n" + + " <[4L, 40L, 400L, 0L]>%n" + + "to contain: %n" + + " <[\"4\", \"45\", \"400\", \"0\"]>%n" + + " (parameter <\"45\"> at index 1 is not found)")); } TableColumnAssert tableColumnAssert6 = assertThat(table2).column("var5"); @@ -247,11 +246,11 @@ public void should_fail_because_values_are_different() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 4 (column name : VAR5) of TEST2 table] %n" - + "Expecting:%n" - + " <[4L, null]>%n" - + "to contain: %n" - + " <[\"4\", \"4\"]>%n" - + " (parameter <\"4\"> at index 1 is not found)")); + + "Expecting:%n" + + " <[4L, null]>%n" + + "to contain: %n" + + " <[\"4\", \"4\"]>%n" + + " (parameter <\"4\"> at index 1 is not found)")); } TableColumnAssert tableColumnAssert7 = assertThat(table).column("var6"); @@ -260,12 +259,12 @@ public void should_fail_because_values_are_different() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format( - "[Column at index 5 (column name : VAR6) of TEST table] %n" - + "Expecting:%n" - + " <[5.60, 50.60, 500.60, 0.00]>%n" - + "to contain: %n" - + " <[\"5.6\", \"55.6\", \"500.6\", \"0\"]>%n" - + " (parameter <\"55.6\"> at index 1 is not found)")); + "[Column at index 5 (column name : VAR6) of TEST table] %n" + + "Expecting:%n" + + " <[5.60, 50.60, 500.60, 0.00]>%n" + + "to contain: %n" + + " <[\"5.6\", \"55.6\", \"500.6\", \"0\"]>%n" + + " (parameter <\"55.6\"> at index 1 is not found)")); } TableColumnAssert tableColumnAssert8 = assertThat(table2).column("var6"); @@ -274,11 +273,11 @@ public void should_fail_because_values_are_different() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 5 (column name : VAR6) of TEST2 table] %n" - + "Expecting:%n" - + " <[5.60, null]>%n" - + "to contain: %n" - + " <[\"5.6\", \"5.6\"]>%n" - + " (parameter <\"5.6\"> at index 1 is not found)")); + + "Expecting:%n" + + " <[5.60, null]>%n" + + "to contain: %n" + + " <[\"5.6\", \"5.6\"]>%n" + + " (parameter <\"5.6\"> at index 1 is not found)")); } TableColumnAssert tableColumnAssert9 = assertThat(table).column("var7"); @@ -287,12 +286,12 @@ public void should_fail_because_values_are_different() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format( - "[Column at index 6 (column name : VAR7) of TEST table] %n" - + "Expecting:%n" - + " <[7.8f, 70.8f, 700.8f, 0.0f]>%n" - + "to contain: %n" - + " <[\"7.8\", \"75.8\", \"700.8\", \"0\"]>%n" - + " (parameter <\"75.8\"> at index 1 is not found)")); + "[Column at index 6 (column name : VAR7) of TEST table] %n" + + "Expecting:%n" + + " <[7.8f, 70.8f, 700.8f, 0.0f]>%n" + + "to contain: %n" + + " <[\"7.8\", \"75.8\", \"700.8\", \"0\"]>%n" + + " (parameter <\"75.8\"> at index 1 is not found)")); } TableColumnAssert tableColumnAssert10 = assertThat(table2).column("var7"); @@ -301,11 +300,11 @@ public void should_fail_because_values_are_different() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 6 (column name : VAR7) of TEST2 table] %n" - + "Expecting:%n" - + " <[7.8f, null]>%n" - + "to contain: %n" - + " <[\"7.8\", \"7.8\"]>%n" - + " (parameter <\"7.8\"> at index 1 is not found)")); + + "Expecting:%n" + + " <[7.8f, null]>%n" + + "to contain: %n" + + " <[\"7.8\", \"7.8\"]>%n" + + " (parameter <\"7.8\"> at index 1 is not found)")); } TableColumnAssert tableColumnAssert11 = assertThat(table).column("var13"); @@ -314,12 +313,12 @@ public void should_fail_because_values_are_different() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format( - "[Column at index 12 (column name : VAR13) of TEST table] %n" - + "Expecting:%n" - + " <[5.00, 50.00, 500.00, 500.00]>%n" - + "to contain: %n" - + " <[\"5\", \"50\", \"505\", \"500\"]>%n" - + " (parameter <\"505\"> at index 2 is not found)")); + "[Column at index 12 (column name : VAR13) of TEST table] %n" + + "Expecting:%n" + + " <[5.00, 50.00, 500.00, 500.00]>%n" + + "to contain: %n" + + " <[\"5\", \"50\", \"505\", \"500\"]>%n" + + " (parameter <\"505\"> at index 2 is not found)")); } TableColumnAssert tableColumnAssert12 = assertThat(table2).column("var13"); @@ -328,11 +327,11 @@ public void should_fail_because_values_are_different() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 12 (column name : VAR13) of TEST2 table] %n" - + "Expecting:%n" - + " <[5.00, null]>%n" - + "to contain: %n" - + " <[\"5\", \"5\"]>%n" - + " (parameter <\"5\"> at index 1 is not found)")); + + "Expecting:%n" + + " <[5.00, null]>%n" + + "to contain: %n" + + " <[\"5\", \"5\"]>%n" + + " (parameter <\"5\"> at index 1 is not found)")); } TableColumnAssert tableColumnAssert13 = assertThat(table).column("var14"); @@ -341,12 +340,12 @@ public void should_fail_because_values_are_different() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format( - "[Column at index 13 (column name : VAR14) of TEST table] %n" - + "Expecting:%n" - + " <[7.0f, 70.0f, 700.0f, 700.0f]>%n" - + "to contain: %n" - + " <[\"7\", \"70\", \"750\", \"700\"]>%n" - + " (parameter <\"750\"> at index 2 is not found)")); + "[Column at index 13 (column name : VAR14) of TEST table] %n" + + "Expecting:%n" + + " <[7.0f, 70.0f, 700.0f, 700.0f]>%n" + + "to contain: %n" + + " <[\"7\", \"70\", \"750\", \"700\"]>%n" + + " (parameter <\"750\"> at index 2 is not found)")); } TableColumnAssert tableColumnAssert14 = assertThat(table2).column("var14"); @@ -355,11 +354,11 @@ public void should_fail_because_values_are_different() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 13 (column name : VAR14) of TEST2 table] %n" - + "Expecting:%n" - + " <[7.0f, null]>%n" - + "to contain: %n" - + " <[\"7\", \"7\"]>%n" - + " (parameter <\"7\"> at index 1 is not found)")); + + "Expecting:%n" + + " <[7.0f, null]>%n" + + "to contain: %n" + + " <[\"7\", \"7\"]>%n" + + " (parameter <\"7\"> at index 1 is not found)")); } TableColumnAssert tableColumnAssert15 = assertThat(table).column("var12"); @@ -368,12 +367,12 @@ public void should_fail_because_values_are_different() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()) - .isEqualTo(String.format("[Column at index 11 (column name : VAR12) of TEST table] %n" - + "Expecting:%n" - + " <[\"text\", \"another text\", \"another text again\", \"another text again\"]>%n" - + "to contain: %n" - + " <[\"text\", \"another text\", \"another text\", \"another text again\"]>%n" - + " (parameter <\"another text\"> at index 2 is not found)")); + .isEqualTo(String.format("[Column at index 11 (column name : VAR12) of TEST table] %n" + + "Expecting:%n" + + " <[\"text\", \"another text\", \"another text again\", \"another text again\"]>%n" + + "to contain: %n" + + " <[\"text\", \"another text\", \"another text\", \"another text again\"]>%n" + + " (parameter <\"another text\"> at index 2 is not found)")); } TableColumnAssert tableColumnAssert16 = assertThat(table2).column("var12"); @@ -382,193 +381,193 @@ public void should_fail_because_values_are_different() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format( - "[Column at index 11 (column name : VAR12) of TEST2 table] %n" - + "Expecting:%n" - + " <[\"text\", null]>%n" - + "to contain: %n" - + " <[\"text\", \"text\"]>%n" - + " (parameter <\"text\"> at index 1 is not found)")); + "[Column at index 11 (column name : VAR12) of TEST2 table] %n" + + "Expecting:%n" + + " <[\"text\", null]>%n" + + "to contain: %n" + + " <[\"text\", \"text\"]>%n" + + " (parameter <\"text\"> at index 1 is not found)")); } TableColumnAssert tableColumnAssert17 = assertThat(table).column("var9"); try { tableColumnAssert17.containsValues("2014-05-24", - "2014-05-29", - "2014-05-30", - "2014-05-30"); + "2014-05-29", + "2014-05-30", + "2014-05-30"); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()) - .isEqualTo(String.format("[Column at index 8 (column name : VAR9) of TEST table] %n" - + "Expecting:%n" - + " <[2014-05-24T00:00:00.000 (java.sql.Date),%n" - + " 2014-05-30T00:00:00.000 (java.sql.Date),%n" - + " 2014-05-30T00:00:00.000 (java.sql.Date),%n" - + " 2014-05-30T00:00:00.000 (java.sql.Date)]>%n" - + "to contain: %n" - + " <[\"2014-05-24\", \"2014-05-29\", \"2014-05-30\", \"2014-05-30\"]>%n" - + " (parameter <\"2014-05-29\"> at index 1 is not found)")); + .isEqualTo(String.format("[Column at index 8 (column name : VAR9) of TEST table] %n" + + "Expecting:%n" + + " <[2014-05-24T00:00:00.000 (java.sql.Date),%n" + + " 2014-05-30T00:00:00.000 (java.sql.Date),%n" + + " 2014-05-30T00:00:00.000 (java.sql.Date),%n" + + " 2014-05-30T00:00:00.000 (java.sql.Date)]>%n" + + "to contain: %n" + + " <[\"2014-05-24\", \"2014-05-29\", \"2014-05-30\", \"2014-05-30\"]>%n" + + " (parameter <\"2014-05-29\"> at index 1 is not found)")); } TableColumnAssert tableColumnAssert18 = assertThat(table2).column("var9"); try { tableColumnAssert18.containsValues("2014-05-24", - "2014-05-24"); + "2014-05-24"); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()) - .isEqualTo(String.format("[Column at index 8 (column name : VAR9) of TEST2 table] %n" - + "Expecting:%n" - + " <[2014-05-24T00:00:00.000 (java.sql.Date), null]>%n" - + "to contain: %n" - + " <[\"2014-05-24\", \"2014-05-24\"]>%n" - + " (parameter <\"2014-05-24\"> at index 1 is not found)")); + .isEqualTo(String.format("[Column at index 8 (column name : VAR9) of TEST2 table] %n" + + "Expecting:%n" + + " <[2014-05-24T00:00:00.000 (java.sql.Date), null]>%n" + + "to contain: %n" + + " <[\"2014-05-24\", \"2014-05-24\"]>%n" + + " (parameter <\"2014-05-24\"> at index 1 is not found)")); } TableColumnAssert tableColumnAssert19 = assertThat(table2).column("var10"); try { tableColumnAssert19.containsValues("2014-05-23", - null); + null); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()) - .isEqualTo(String.format("[Column at index 9 (column name : VAR10) of TEST2 table] %n" - + "Expecting:%n" - + " <[2014-05-24T09:46:30.000000000, null]>%n" - + "to contain: %n" - + " <[\"2014-05-23\", null]>%n" - + " (parameter <\"2014-05-23\"> at index 0 is not found)")); + .isEqualTo(String.format("[Column at index 9 (column name : VAR10) of TEST2 table] %n" + + "Expecting:%n" + + " <[2014-05-24T09:46:30.000000000, null]>%n" + + "to contain: %n" + + " <[\"2014-05-23\", null]>%n" + + " (parameter <\"2014-05-23\"> at index 0 is not found)")); } TableColumnAssert tableColumnAssert20 = assertThat(table).column("var8"); try { tableColumnAssert20.containsValues("12:29:49", - "12:29:49", - "12:29:49", - "12:29:49"); + "12:29:49", + "12:29:49", + "12:29:49"); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()) - .isEqualTo(String.format("[Column at index 7 (column name : VAR8) of TEST table] %n" - + "Expecting:%n" - + " <[09:46:30.000000000, " - + "12:29:49.000000000, " - + "12:29:49.000000000, " - + "12:29:49.000000000]>%n" - + "to contain: %n" - + " <[\"12:29:49\", \"12:29:49\", \"12:29:49\", \"12:29:49\"]>%n" - + " (parameter <\"12:29:49\"> at index 3 is not found)")); + .isEqualTo(String.format("[Column at index 7 (column name : VAR8) of TEST table] %n" + + "Expecting:%n" + + " <[09:46:30.000000000, " + + "12:29:49.000000000, " + + "12:29:49.000000000, " + + "12:29:49.000000000]>%n" + + "to contain: %n" + + " <[\"12:29:49\", \"12:29:49\", \"12:29:49\", \"12:29:49\"]>%n" + + " (parameter <\"12:29:49\"> at index 3 is not found)")); } TableColumnAssert tableColumnAssert21 = assertThat(table2).column("var8"); try { tableColumnAssert21.containsValues("09:46:30", - "12:29:49"); + "12:29:49"); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()) - .isEqualTo(String.format("[Column at index 7 (column name : VAR8) of TEST2 table] %n" - + "Expecting:%n" - + " <[09:46:30.000000000, null]>%n" - + "to contain: %n" - + " <[\"09:46:30\", \"12:29:49\"]>%n" - + " (parameter <\"12:29:49\"> at index 1 is not found)")); + .isEqualTo(String.format("[Column at index 7 (column name : VAR8) of TEST2 table] %n" + + "Expecting:%n" + + " <[09:46:30.000000000, null]>%n" + + "to contain: %n" + + " <[\"09:46:30\", \"12:29:49\"]>%n" + + " (parameter <\"12:29:49\"> at index 1 is not found)")); } TableColumnAssert tableColumnAssert22 = assertThat(table).column("var10"); try { tableColumnAssert22.containsValues("2014-05-24T09:46:30", - "2014-05-30T13:29:49", - "2014-05-30T00:00:00", - "2014-05-30T00:00:00"); + "2014-05-30T13:29:49", + "2014-05-30T00:00:00", + "2014-05-30T00:00:00"); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 9 (column name : VAR10) of TEST table] %n" - + "Expecting:%n" - + " <[2014-05-24T09:46:30.000000000,%n" - + " 2014-05-30T12:29:49.000000000,%n" - + " 2014-05-30T00:00:00.000000000,%n" - + " 2014-05-30T00:00:00.000000000]>%n" - + "to contain: %n" - + " <[\"2014-05-24T09:46:30\",%n" - + " \"2014-05-30T13:29:49\",%n" - + " \"2014-05-30T00:00:00\",%n" - + " \"2014-05-30T00:00:00\"]>%n" - + " (parameter <\"2014-05-30T13:29:49\"> at index 1 is not found)")); + + "Expecting:%n" + + " <[2014-05-24T09:46:30.000000000,%n" + + " 2014-05-30T12:29:49.000000000,%n" + + " 2014-05-30T00:00:00.000000000,%n" + + " 2014-05-30T00:00:00.000000000]>%n" + + "to contain: %n" + + " <[\"2014-05-24T09:46:30\",%n" + + " \"2014-05-30T13:29:49\",%n" + + " \"2014-05-30T00:00:00\",%n" + + " \"2014-05-30T00:00:00\"]>%n" + + " (parameter <\"2014-05-30T13:29:49\"> at index 1 is not found)")); } TableColumnAssert tableColumnAssert23 = assertThat(table2).column("var10"); try { tableColumnAssert23.containsValues("2014-05-24T09:46:30", - "2014-05-24T09:46:30"); - fail("An exception must be raised"); + "2014-05-24T09:46:30"); + fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 9 (column name : VAR10) of TEST2 table] %n" - + "Expecting:%n" - + " <[2014-05-24T09:46:30.000000000, null]>%n" - + "to contain: %n" - + " <[\"2014-05-24T09:46:30\", \"2014-05-24T09:46:30\"]>%n" - + " (parameter <\"2014-05-24T09:46:30\"> at index 1 is not found)")); + + "Expecting:%n" + + " <[2014-05-24T09:46:30.000000000, null]>%n" + + "to contain: %n" + + " <[\"2014-05-24T09:46:30\", \"2014-05-24T09:46:30\"]>%n" + + " (parameter <\"2014-05-24T09:46:30\"> at index 1 is not found)")); } TableColumnAssert tableColumnAssert24 = assertThat(table).column("var9"); try { tableColumnAssert24.containsValues("2014-05-24T00:00:00", - "2014-05-24T00:00:00", - "2014-05-30T00:00:00", - "2014-05-30T00:00:00"); + "2014-05-24T00:00:00", + "2014-05-30T00:00:00", + "2014-05-30T00:00:00"); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()) - .isEqualTo(String.format("[Column at index 8 (column name : VAR9) of TEST table] %n" - + "Expecting:%n" - + " <[2014-05-24T00:00:00.000 (java.sql.Date),%n" - + " 2014-05-30T00:00:00.000 (java.sql.Date),%n" - + " 2014-05-30T00:00:00.000 (java.sql.Date),%n" - + " 2014-05-30T00:00:00.000 (java.sql.Date)]>%n" - + "to contain: %n" - + " <[\"2014-05-24T00:00:00\",%n" - + " \"2014-05-24T00:00:00\",%n" - + " \"2014-05-30T00:00:00\",%n" - + " \"2014-05-30T00:00:00\"]>%n" - + " (parameter <\"2014-05-24T00:00:00\"> at index 1 is not found)")); + .isEqualTo(String.format("[Column at index 8 (column name : VAR9) of TEST table] %n" + + "Expecting:%n" + + " <[2014-05-24T00:00:00.000 (java.sql.Date),%n" + + " 2014-05-30T00:00:00.000 (java.sql.Date),%n" + + " 2014-05-30T00:00:00.000 (java.sql.Date),%n" + + " 2014-05-30T00:00:00.000 (java.sql.Date)]>%n" + + "to contain: %n" + + " <[\"2014-05-24T00:00:00\",%n" + + " \"2014-05-24T00:00:00\",%n" + + " \"2014-05-30T00:00:00\",%n" + + " \"2014-05-30T00:00:00\"]>%n" + + " (parameter <\"2014-05-24T00:00:00\"> at index 1 is not found)")); } TableColumnAssert tableColumnAssert25 = assertThat(table2).column("var9"); try { tableColumnAssert25.containsValues("2014-05-24T00:00:00", - "2014-05-24T00:00:00"); - fail("An exception must be raised"); + "2014-05-24T00:00:00"); + fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 8 (column name : VAR9) of TEST2 table] %n" - + "Expecting:%n" - + " <[2014-05-24T00:00:00.000 (java.sql.Date), null]>%n" - + "to contain: %n" - + " <[\"2014-05-24T00:00:00\", \"2014-05-24T00:00:00\"]>%n" - + " (parameter <\"2014-05-24T00:00:00\"> at index 1 is not found)")); + + "Expecting:%n" + + " <[2014-05-24T00:00:00.000 (java.sql.Date), null]>%n" + + "to contain: %n" + + " <[\"2014-05-24T00:00:00\", \"2014-05-24T00:00:00\"]>%n" + + " (parameter <\"2014-05-24T00:00:00\"> at index 1 is not found)")); } TableColumnAssert tableColumnAssert26 = assertThat(table2).column("var16"); try { tableColumnAssert26.containsValues("30B443AE-C0C9-4790-9BEC-CE1380808435", - "30B443AE-C0C9-4790-9BEC-CE1380808435"); + "30B443AE-C0C9-4790-9BEC-CE1380808435"); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()) - .isEqualTo(String.format("[Column at index 15 (column name : VAR16) of TEST2 table] %n" - + "Expecting:%n" - + " <[30b443ae-c0c9-4790-9bec-ce1380808435, null]>%n" - + "to contain: %n" - + " <[\"30B443AE-C0C9-4790-9BEC-CE1380808435\", " - + "\"30B443AE-C0C9-4790-9BEC-CE1380808435\"]>%n" - + " (parameter <\"30B443AE-C0C9-4790-9BEC-CE1380808435\"> at index 1 is not found)")); + .isEqualTo(String.format("[Column at index 15 (column name : VAR16) of TEST2 table] %n" + + "Expecting:%n" + + " <[30b443ae-c0c9-4790-9bec-ce1380808435, null]>%n" + + "to contain: %n" + + " <[\"30B443AE-C0C9-4790-9BEC-CE1380808435\", " + + "\"30B443AE-C0C9-4790-9BEC-CE1380808435\"]>%n" + + " (parameter <\"30B443AE-C0C9-4790-9BEC-CE1380808435\"> at index 1 is not found)")); } TableColumnAssert tableColumnAssert27 = assertThat(table2).column("var16"); try { tableColumnAssert27.containsValues("88838129-291E-40A9-A94C-A15BE36CF7C3", - "30B443AE-C0C9-4790-9BEC-CE1380808435"); + "30B443AE-C0C9-4790-9BEC-CE1380808435"); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()) - .isEqualTo(String.format("[Column at index 15 (column name : VAR16) of TEST2 table] %n" - + "Expecting:%n" - + " <[30b443ae-c0c9-4790-9bec-ce1380808435, null]>%n" - + "to contain: %n" - + " <[\"88838129-291E-40A9-A94C-A15BE36CF7C3\", " - + "\"30B443AE-C0C9-4790-9BEC-CE1380808435\"]>%n" - + " (parameter <\"88838129-291E-40A9-A94C-A15BE36CF7C3\"> at index 0 is not found)")); + .isEqualTo(String.format("[Column at index 15 (column name : VAR16) of TEST2 table] %n" + + "Expecting:%n" + + " <[30b443ae-c0c9-4790-9bec-ce1380808435, null]>%n" + + "to contain: %n" + + " <[\"88838129-291E-40A9-A94C-A15BE36CF7C3\", " + + "\"30B443AE-C0C9-4790-9BEC-CE1380808435\"]>%n" + + " (parameter <\"88838129-291E-40A9-A94C-A15BE36CF7C3\"> at index 0 is not found)")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnContent_HasValues_TimeValue_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnContent_HasValues_TimeValue_Test.java index 1b77dad7..99f7336a 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnContent_HasValues_TimeValue_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnContent_HasValues_TimeValue_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.TableColumnAssert; import org.assertj.db.common.AbstractTest; @@ -19,15 +22,11 @@ import org.assertj.db.type.TimeValue; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnColumnContent} class : * {@link AssertOnColumnContent#containsValues(org.assertj.db.type.TimeValue...)} method. * * @author Régis Pouiller - * */ public class AssertOnColumnContent_HasValues_TimeValue_Test extends AbstractTest { @@ -39,9 +38,9 @@ public void test_has_values() throws Exception { Table table = new Table(source, "test"); TableColumnAssert tableColumnAssert = assertThat(table).column("var8"); TableColumnAssert tableColumnAssertReturn = tableColumnAssert.containsValues(TimeValue.of(9, 46, 30), - TimeValue.of(12, 29, 49), - TimeValue.of(12, 29, 49), - TimeValue.of(12, 29, 49)); + TimeValue.of(12, 29, 49), + TimeValue.of(12, 29, 49), + TimeValue.of(12, 29, 49)); Assertions.assertThat(tableColumnAssert).isSameAs(tableColumnAssertReturn); Table table2 = new Table(source, "test2"); @@ -59,37 +58,37 @@ public void should_fail_because_values_are_different() throws Exception { TableColumnAssert tableColumnAssert = assertThat(table).column("var8"); try { tableColumnAssert.containsValues(TimeValue.of(12, 29, 49), - TimeValue.of(12, 29, 49), - TimeValue.of(12, 29, 49), - TimeValue.of(12, 29, 49)); + TimeValue.of(12, 29, 49), + TimeValue.of(12, 29, 49), + TimeValue.of(12, 29, 49)); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 7 (column name : VAR8) of TEST table] %n" - + "Expecting:%n" - + " <[09:46:30.000000000, " - + "12:29:49.000000000, " - + "12:29:49.000000000, " - + "12:29:49.000000000]>%n" - + "to contain: %n" - + " <[12:29:49.000000000, " - + "12:29:49.000000000, " - + "12:29:49.000000000, " - + "12:29:49.000000000]>%n" - + " (parameter <12:29:49.000000000> at index 3 is not found)")); + + "Expecting:%n" + + " <[09:46:30.000000000, " + + "12:29:49.000000000, " + + "12:29:49.000000000, " + + "12:29:49.000000000]>%n" + + "to contain: %n" + + " <[12:29:49.000000000, " + + "12:29:49.000000000, " + + "12:29:49.000000000, " + + "12:29:49.000000000]>%n" + + " (parameter <12:29:49.000000000> at index 3 is not found)")); } Table table2 = new Table(source, "test2"); TableColumnAssert tableColumnAssert2 = assertThat(table2).column("var8"); try { tableColumnAssert2.containsValues(TimeValue.of(9, 46, 30), - TimeValue.of(12, 29, 49)); + TimeValue.of(12, 29, 49)); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 7 (column name : VAR8) of TEST2 table] %n" - + "Expecting:%n" - + " <[09:46:30.000000000, null]>%n" - + "to contain: %n" - + " <[09:46:30.000000000, 12:29:49.000000000]>%n" - + " (parameter <12:29:49.000000000> at index 1 is not found)")); + + "Expecting:%n" + + " <[09:46:30.000000000, null]>%n" + + "to contain: %n" + + " <[09:46:30.000000000, 12:29:49.000000000]>%n" + + " (parameter <12:29:49.000000000> at index 1 is not found)")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnContent_HasValues_UUID_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnContent_HasValues_UUID_Test.java index e44e6820..b1d87aeb 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnContent_HasValues_UUID_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnContent_HasValues_UUID_Test.java @@ -8,21 +8,21 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + +import java.util.UUID; + import org.assertj.core.api.Assertions; import org.assertj.db.api.TableColumnAssert; import org.assertj.db.common.AbstractTest; import org.assertj.db.type.Table; import org.junit.Test; -import java.util.UUID; - -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnColumnContent} class : * {@link AssertOnColumnContent#containsValues(java.util.UUID...)} method. @@ -39,17 +39,17 @@ public void test_has_values() throws Exception { Table table = new Table(source, "test"); TableColumnAssert tableColumnAssert = assertThat(table).column("var15"); TableColumnAssert tableColumnAssertReturn = tableColumnAssert.containsValues( - UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435"), - UUID.fromString("0E2A1269-EFF0-4233-B87B-B53E8B6F164D"), - UUID.fromString("2B0D1BDD-909E-4362-BA10-C930BA82718D"), - UUID.fromString("399FFFCA-7874-4225-9903-E227C4E9DCC1") + UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435"), + UUID.fromString("0E2A1269-EFF0-4233-B87B-B53E8B6F164D"), + UUID.fromString("2B0D1BDD-909E-4362-BA10-C930BA82718D"), + UUID.fromString("399FFFCA-7874-4225-9903-E227C4E9DCC1") ); Assertions.assertThat(tableColumnAssert).isSameAs(tableColumnAssertReturn); Table table2 = new Table(source, "test2"); TableColumnAssert tableColumnAssert2 = assertThat(table2).column("var16"); TableColumnAssert tableColumnAssertReturn2 = tableColumnAssert2 - .containsValues(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435"), null); + .containsValues(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435"), null); Assertions.assertThat(tableColumnAssert2).isSameAs(tableColumnAssertReturn2); } @@ -62,39 +62,39 @@ public void should_fail_because_values_are_different() throws Exception { TableColumnAssert tableColumnAssert = assertThat(table).column("var15"); try { tableColumnAssert.containsValues(UUID.fromString("F96EC595-CE91-47CC-9152-CCC8AC48AAD6"), - UUID.fromString("F96EC595-CE91-47CC-9152-CCC8AC48AAD6"), - UUID.fromString("F96EC595-CE91-47CC-9152-CCC8AC48AAD6"), - UUID.fromString("F96EC595-CE91-47CC-9152-CCC8AC48AAD6")); + UUID.fromString("F96EC595-CE91-47CC-9152-CCC8AC48AAD6"), + UUID.fromString("F96EC595-CE91-47CC-9152-CCC8AC48AAD6"), + UUID.fromString("F96EC595-CE91-47CC-9152-CCC8AC48AAD6")); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()) - .isEqualTo(String.format("[Column at index 14 (column name : VAR15) of TEST table] %n" - + "Expecting:%n" - + " <[30b443ae-c0c9-4790-9bec-ce1380808435,%n" - + " 0e2a1269-eff0-4233-b87b-b53e8b6f164d,%n" - + " 2b0d1bdd-909e-4362-ba10-c930ba82718d,%n" - + " 399fffca-7874-4225-9903-e227c4e9dcc1]>%n" - + "to contain: %n" - + " <[f96ec595-ce91-47cc-9152-ccc8ac48aad6,%n" - + " f96ec595-ce91-47cc-9152-ccc8ac48aad6,%n" - + " f96ec595-ce91-47cc-9152-ccc8ac48aad6,%n" - + " f96ec595-ce91-47cc-9152-ccc8ac48aad6]>%n" - + " (parameter at index 0 is not found)")); + .isEqualTo(String.format("[Column at index 14 (column name : VAR15) of TEST table] %n" + + "Expecting:%n" + + " <[30b443ae-c0c9-4790-9bec-ce1380808435,%n" + + " 0e2a1269-eff0-4233-b87b-b53e8b6f164d,%n" + + " 2b0d1bdd-909e-4362-ba10-c930ba82718d,%n" + + " 399fffca-7874-4225-9903-e227c4e9dcc1]>%n" + + "to contain: %n" + + " <[f96ec595-ce91-47cc-9152-ccc8ac48aad6,%n" + + " f96ec595-ce91-47cc-9152-ccc8ac48aad6,%n" + + " f96ec595-ce91-47cc-9152-ccc8ac48aad6,%n" + + " f96ec595-ce91-47cc-9152-ccc8ac48aad6]>%n" + + " (parameter at index 0 is not found)")); } Table table2 = new Table(source, "test2"); TableColumnAssert tableColumnAssert2 = assertThat(table2).column("var16"); try { tableColumnAssert2.containsValues(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435"), - UUID.fromString("F96EC595-CE91-47CC-9152-CCC8AC48AAD6")); + UUID.fromString("F96EC595-CE91-47CC-9152-CCC8AC48AAD6")); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()) - .isEqualTo(String.format("[Column at index 15 (column name : VAR16) of TEST2 table] %n" - + "Expecting:%n" - + " <[30b443ae-c0c9-4790-9bec-ce1380808435, null]>%n" - + "to contain: %n" - + " <[30b443ae-c0c9-4790-9bec-ce1380808435, f96ec595-ce91-47cc-9152-ccc8ac48aad6]>%n" - + " (parameter at index 1 is not found)")); + .isEqualTo(String.format("[Column at index 15 (column name : VAR16) of TEST2 table] %n" + + "Expecting:%n" + + " <[30b443ae-c0c9-4790-9bec-ce1380808435, null]>%n" + + "to contain: %n" + + " <[30b443ae-c0c9-4790-9bec-ce1380808435, f96ec595-ce91-47cc-9152-ccc8ac48aad6]>%n" + + " (parameter at index 1 is not found)")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnEquality_HasValues_Boolean_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnEquality_HasValues_Boolean_Test.java index 2624e620..ee0a4c2b 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnEquality_HasValues_Boolean_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnEquality_HasValues_Boolean_Test.java @@ -8,25 +8,24 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.TableColumnAssert; import org.assertj.db.common.AbstractTest; import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link AssertOnColumnEquality} class : * {@link org.assertj.db.api.assertions.AssertOnColumnEquality#hasValues(Boolean...)} method. * * @author Régis Pouiller - * */ public class AssertOnColumnEquality_HasValues_Boolean_Test extends AbstractTest { @@ -58,10 +57,10 @@ public void should_fail_because_values_are_different() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 1 (column name : VAR2) of TEST table] %n" - + "Expecting that the value at index 2:%n" - + " %n" - + "to be equal to: %n" - + " ")); + + "Expecting that the value at index 2:%n" + + " %n" + + "to be equal to: %n" + + " ")); } Table table2 = new Table(source, "test2"); TableColumnAssert tableColumnAssert2 = assertThat(table2).column("var2"); @@ -70,10 +69,10 @@ public void should_fail_because_values_are_different() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 1 (column name : VAR2) of TEST2 table] %n" - + "Expecting that the value at index 1:%n" - + " %n" - + "to be equal to: %n" - + " ")); + + "Expecting that the value at index 1:%n" + + " %n" + + "to be equal to: %n" + + " ")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnEquality_HasValues_Bytes_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnEquality_HasValues_Bytes_Test.java index 78c4388d..dbc74e51 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnEquality_HasValues_Bytes_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnEquality_HasValues_Bytes_Test.java @@ -8,26 +8,25 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.assertj.db.api.Assertions.bytesContentFromClassPathOf; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.TableColumnAssert; import org.assertj.db.common.AbstractTest; import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.assertj.db.api.Assertions.bytesContentFromClassPathOf; -import static org.junit.Assert.fail; - /** * Tests on {@link AssertOnColumnEquality} class : * {@link org.assertj.db.api.assertions.AssertOnColumnEquality#hasValues(byte[]...)} method. * * @author Régis Pouiller - * */ public class AssertOnColumnEquality_HasValues_Bytes_Test extends AbstractTest { @@ -64,7 +63,7 @@ public void should_fail_because_values_are_different() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 10 (column name : VAR11) of TEST table] %n" - + "Expecting that the value at index 1 to be equal to the expected value but was not equal")); + + "Expecting that the value at index 1 to be equal to the expected value but was not equal")); } Table table2 = new Table(source, "test2"); @@ -74,7 +73,7 @@ public void should_fail_because_values_are_different() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 10 (column name : VAR11) of TEST2 table] %n" - + "Expecting that the value at index 1 to be equal to the expected value but was not equal")); + + "Expecting that the value at index 1 to be equal to the expected value but was not equal")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnEquality_HasValues_Character_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnEquality_HasValues_Character_Test.java index c0df937e..5e0ddc2d 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnEquality_HasValues_Character_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnEquality_HasValues_Character_Test.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; @@ -26,7 +26,6 @@ * {@link org.assertj.db.api.assertions.AssertOnColumnEquality#hasValues(Character...)} method. * * @author Régis Pouiller - * */ public class AssertOnColumnEquality_HasValues_Character_Test extends AbstractTest { @@ -58,10 +57,10 @@ public void should_fail_because_values_are_different() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 15 (column name : VAR16) of TEST table] %n" - + "Expecting that the value at index 0:%n" - + " <\"T\">%n" - + "to be equal to: %n" - + " <'t'>")); + + "Expecting that the value at index 0:%n" + + " <\"T\">%n" + + "to be equal to: %n" + + " <'t'>")); } Table table2 = new Table(source, "test2"); TableColumnAssert tableColumnAssert2 = assertThat(table2).column("var17"); @@ -70,10 +69,10 @@ public void should_fail_because_values_are_different() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 16 (column name : VAR17) of TEST2 table] %n" - + "Expecting that the value at index 1:%n" - + " %n" - + "to be equal to: %n" - + " <'T'>")); + + "Expecting that the value at index 1:%n" + + " %n" + + "to be equal to: %n" + + " <'T'>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnEquality_HasValues_DateTimeValue_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnEquality_HasValues_DateTimeValue_Test.java index 88cb4aba..5b5d454e 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnEquality_HasValues_DateTimeValue_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnEquality_HasValues_DateTimeValue_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.TableColumnAssert; import org.assertj.db.common.AbstractTest; @@ -21,15 +24,11 @@ import org.assertj.db.type.TimeValue; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link AssertOnColumnEquality} class : * {@link org.assertj.db.api.assertions.AssertOnColumnEquality#hasValues(org.assertj.db.type.DateTimeValue...)} method. * * @author Régis Pouiller - * */ public class AssertOnColumnEquality_HasValues_DateTimeValue_Test extends AbstractTest { @@ -41,31 +40,31 @@ public void test_has_values() throws Exception { Table table = new Table(source, "test"); TableColumnAssert tableColumnAssert = assertThat(table).column("var10"); TableColumnAssert tableColumnAssertReturn = tableColumnAssert.hasValues( - DateTimeValue.of(DateValue.of(2014, 5, 24), TimeValue.of(9, 46, 30)), - DateTimeValue.of(DateValue.of(2014, 5, 30), TimeValue.of(12, 29, 49)), - DateTimeValue.of(DateValue.of(2014, 5, 30)), - DateTimeValue.of(DateValue.of(2014, 5, 30))); + DateTimeValue.of(DateValue.of(2014, 5, 24), TimeValue.of(9, 46, 30)), + DateTimeValue.of(DateValue.of(2014, 5, 30), TimeValue.of(12, 29, 49)), + DateTimeValue.of(DateValue.of(2014, 5, 30)), + DateTimeValue.of(DateValue.of(2014, 5, 30))); Assertions.assertThat(tableColumnAssert).isSameAs(tableColumnAssertReturn); Table table2 = new Table(source, "test2"); TableColumnAssert tableColumnAssert2 = assertThat(table2).column("var10"); TableColumnAssert tableColumnAssertReturn2 = tableColumnAssert2.hasValues( - DateTimeValue.of(DateValue.of(2014, 5, 24), TimeValue.of(9, 46, 30)), - null); + DateTimeValue.of(DateValue.of(2014, 5, 24), TimeValue.of(9, 46, 30)), + null); Assertions.assertThat(tableColumnAssert2).isSameAs(tableColumnAssertReturn2); TableColumnAssert tableColumnAssert3 = assertThat(table).column("var9"); TableColumnAssert tableColumnAssertReturn3 = tableColumnAssert3.hasValues( - DateTimeValue.of(DateValue.of(2014, 5, 24)), - DateTimeValue.of(DateValue.of(2014, 5, 30)), - DateTimeValue.of(DateValue.of(2014, 5, 30)), - DateTimeValue.of(DateValue.of(2014, 5, 30))); + DateTimeValue.of(DateValue.of(2014, 5, 24)), + DateTimeValue.of(DateValue.of(2014, 5, 30)), + DateTimeValue.of(DateValue.of(2014, 5, 30)), + DateTimeValue.of(DateValue.of(2014, 5, 30))); Assertions.assertThat(tableColumnAssert3).isSameAs(tableColumnAssertReturn3); TableColumnAssert tableColumnAssert4 = assertThat(table2).column("var9"); TableColumnAssert tableColumnAssertReturn4 = tableColumnAssert4.hasValues( - DateTimeValue.of(DateValue.of(2014, 5, 24)), - null); + DateTimeValue.of(DateValue.of(2014, 5, 24)), + null); Assertions.assertThat(tableColumnAssert4).isSameAs(tableColumnAssertReturn4); } @@ -78,55 +77,55 @@ public void should_fail_because_values_are_different() throws Exception { TableColumnAssert tableColumnAssert = assertThat(table).column("var10"); try { tableColumnAssert.hasValues(DateTimeValue.of(DateValue.of(2014, 5, 24), TimeValue.of(9, 46, 30)), - DateTimeValue.of(DateValue.of(2014, 5, 30), TimeValue.of(13, 29, 49)), - DateTimeValue.of(DateValue.of(2014, 5, 30)), - DateTimeValue.of(DateValue.of(2014, 5, 30))); + DateTimeValue.of(DateValue.of(2014, 5, 30), TimeValue.of(13, 29, 49)), + DateTimeValue.of(DateValue.of(2014, 5, 30)), + DateTimeValue.of(DateValue.of(2014, 5, 30))); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 9 (column name : VAR10) of TEST table] %n" - + "Expecting that the value at index 1:%n" - + " <2014-05-30T12:29:49.000000000>%n" - + "to be equal to: %n" - + " <2014-05-30T13:29:49.000000000>")); + + "Expecting that the value at index 1:%n" + + " <2014-05-30T12:29:49.000000000>%n" + + "to be equal to: %n" + + " <2014-05-30T13:29:49.000000000>")); } Table table2 = new Table(source, "test2"); TableColumnAssert tableColumnAssert2 = assertThat(table2).column("var10"); try { tableColumnAssert2.hasValues(DateTimeValue.of(DateValue.of(2014, 5, 24), TimeValue.of(9, 46, 30)), - DateTimeValue.of(DateValue.of(2014, 5, 24), TimeValue.of(9, 46, 30))); + DateTimeValue.of(DateValue.of(2014, 5, 24), TimeValue.of(9, 46, 30))); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 9 (column name : VAR10) of TEST2 table] %n" - + "Expecting that the value at index 1:%n" - + " %n" - + "to be equal to: %n" - + " <2014-05-24T09:46:30.000000000>")); + + "Expecting that the value at index 1:%n" + + " %n" + + "to be equal to: %n" + + " <2014-05-24T09:46:30.000000000>")); } TableColumnAssert tableColumnAssert3 = assertThat(table).column("var9"); try { tableColumnAssert3.hasValues(DateTimeValue.of(DateValue.of(2014, 5, 24)), - DateTimeValue.of(DateValue.of(2014, 5, 24)), - DateTimeValue.of(DateValue.of(2014, 5, 30)), - DateTimeValue.of(DateValue.of(2014, 5, 30))); + DateTimeValue.of(DateValue.of(2014, 5, 24)), + DateTimeValue.of(DateValue.of(2014, 5, 30)), + DateTimeValue.of(DateValue.of(2014, 5, 30))); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 8 (column name : VAR9) of TEST table] %n" - + "Expecting that the value at index 1:%n" - + " <2014-05-30T00:00:00.000000000>%n" - + "to be equal to: %n" - + " <2014-05-24T00:00:00.000000000>")); + + "Expecting that the value at index 1:%n" + + " <2014-05-30T00:00:00.000000000>%n" + + "to be equal to: %n" + + " <2014-05-24T00:00:00.000000000>")); } TableColumnAssert tableColumnAssert4 = assertThat(table2).column("var9"); try { tableColumnAssert4.hasValues(DateTimeValue.of(DateValue.of(2014, 5, 24)), - DateTimeValue.of(DateValue.of(2014, 5, 24))); + DateTimeValue.of(DateValue.of(2014, 5, 24))); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 8 (column name : VAR9) of TEST2 table] %n" - + "Expecting that the value at index 1:%n" - + " %n" - + "to be equal to: %n" - + " <2014-05-24T00:00:00.000000000>")); + + "Expecting that the value at index 1:%n" + + " %n" + + "to be equal to: %n" + + " <2014-05-24T00:00:00.000000000>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnEquality_HasValues_DateValue_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnEquality_HasValues_DateValue_Test.java index 5de0522d..a25c480c 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnEquality_HasValues_DateValue_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnEquality_HasValues_DateValue_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.TableColumnAssert; import org.assertj.db.common.AbstractTest; @@ -20,15 +23,11 @@ import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link AssertOnColumnEquality} class : * {@link org.assertj.db.api.assertions.AssertOnColumnEquality#hasValues(org.assertj.db.type.DateValue...)} method. * * @author Régis Pouiller - * */ public class AssertOnColumnEquality_HasValues_DateValue_Test extends AbstractTest { @@ -42,20 +41,20 @@ public void test_has_values() throws Exception { Table table = new Table(source, "test"); TableColumnAssert tableColumnAssert = assertThat(table).column("var9"); TableColumnAssert tableColumnAssertReturn = tableColumnAssert.hasValues( - DateValue.of(2014, 5, 24), - DateValue.of(2014, 5, 30), - DateValue.of(2014, 5, 30), - DateValue.of(2014, 5, 30)); + DateValue.of(2014, 5, 24), + DateValue.of(2014, 5, 30), + DateValue.of(2014, 5, 30), + DateValue.of(2014, 5, 30)); Assertions.assertThat(tableColumnAssert).isSameAs(tableColumnAssertReturn); Table table2 = new Table(source, "test2"); TableColumnAssert tableColumnAssert2 = assertThat(table2).column("var9"); TableColumnAssert tableColumnAssertReturn2 = tableColumnAssert2.hasValues(DateValue.of(2014, 5, 24), - null); + null); Assertions.assertThat(tableColumnAssert2).isSameAs(tableColumnAssertReturn2); TableColumnAssert tableColumnAssert3 = assertThat(table2).column("var10"); TableColumnAssert tableColumnAssertReturn3 = tableColumnAssert3.hasValues(DateValue.of(2014, 5, 24), - null); + null); Assertions.assertThat(tableColumnAssert3).isSameAs(tableColumnAssertReturn3); } @@ -68,41 +67,41 @@ public void should_fail_because_values_are_different() throws Exception { TableColumnAssert tableColumnAssert = assertThat(table).column("var9"); try { tableColumnAssert.hasValues(DateValue.of(2014, 5, 24), - DateValue.of(2014, 5, 29), - DateValue.of(2014, 5, 30), - DateValue.of(2014, 5, 30)); + DateValue.of(2014, 5, 29), + DateValue.of(2014, 5, 30), + DateValue.of(2014, 5, 30)); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 8 (column name : VAR9) of TEST table] %n" - + "Expecting that the value at index 1:%n" - + " <2014-05-30>%n" - + "to be equal to: %n" - + " <2014-05-29>")); + + "Expecting that the value at index 1:%n" + + " <2014-05-30>%n" + + "to be equal to: %n" + + " <2014-05-29>")); } Table table2 = new Table(source, "test2"); TableColumnAssert tableColumnAssert2 = assertThat(table2).column("var9"); try { tableColumnAssert2.hasValues(DateValue.of(2014, 5, 24), - DateValue.of(2014, 5, 24)); + DateValue.of(2014, 5, 24)); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 8 (column name : VAR9) of TEST2 table] %n" - + "Expecting that the value at index 1:%n" - + " %n" - + "to be equal to: %n" - + " <2014-05-24>")); + + "Expecting that the value at index 1:%n" + + " %n" + + "to be equal to: %n" + + " <2014-05-24>")); } TableColumnAssert tableColumnAssert3 = assertThat(table2).column("var10"); try { tableColumnAssert3.hasValues(DateValue.of(2014, 5, 23), - null); + null); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 9 (column name : VAR10) of TEST2 table] %n" - + "Expecting that the value at index 0:%n" - + " <2014-05-24T09:46:30.000000000>%n" - + "to be equal to: %n" - + " <2014-05-23>")); + + "Expecting that the value at index 0:%n" + + " <2014-05-24T09:46:30.000000000>%n" + + "to be equal to: %n" + + " <2014-05-23>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnEquality_HasValues_Number_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnEquality_HasValues_Number_Test.java index 3b19ea67..ca13e0f5 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnEquality_HasValues_Number_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnEquality_HasValues_Number_Test.java @@ -8,25 +8,24 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.TableColumnAssert; import org.assertj.db.common.AbstractTest; import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link AssertOnColumnEquality} class : * {@link org.assertj.db.api.assertions.AssertOnColumnEquality#hasValues(Number...)} method. * * @author Régis Pouiller - * */ public class AssertOnColumnEquality_HasValues_Number_Test extends AbstractTest { @@ -106,10 +105,10 @@ public void should_fail_because_values_are_different() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 2 (column name : VAR3) of TEST table] %n" - + "Expecting that the value at index 2:%n" - + " <25>%n" - + "to be equal to: %n" - + " <35>")); + + "Expecting that the value at index 2:%n" + + " <25>%n" + + "to be equal to: %n" + + " <35>")); } Table table2 = new Table(source, "test2"); TableColumnAssert tableColumnAssert2 = assertThat(table2).column("var3"); @@ -118,10 +117,10 @@ public void should_fail_because_values_are_different() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 2 (column name : VAR3) of TEST2 table] %n" - + "Expecting that the value at index 1:%n" - + " %n" - + "to be equal to: %n" - + " <2>")); + + "Expecting that the value at index 1:%n" + + " %n" + + "to be equal to: %n" + + " <2>")); } TableColumnAssert tableColumnAssert3 = assertThat(table).column("var4"); @@ -130,10 +129,10 @@ public void should_fail_because_values_are_different() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 3 (column name : VAR4) of TEST table] %n" - + "Expecting that the value at index 1:%n" - + " <30>%n" - + "to be equal to: %n" - + " <35>")); + + "Expecting that the value at index 1:%n" + + " <30>%n" + + "to be equal to: %n" + + " <35>")); } TableColumnAssert tableColumnAssert4 = assertThat(table2).column("var4"); @@ -142,10 +141,10 @@ public void should_fail_because_values_are_different() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 3 (column name : VAR4) of TEST2 table] %n" - + "Expecting that the value at index 1:%n" - + " %n" - + "to be equal to: %n" - + " <3>")); + + "Expecting that the value at index 1:%n" + + " %n" + + "to be equal to: %n" + + " <3>")); } TableColumnAssert tableColumnAssert5 = assertThat(table).column("var5"); @@ -154,10 +153,10 @@ public void should_fail_because_values_are_different() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 4 (column name : VAR5) of TEST table] %n" - + "Expecting that the value at index 1:%n" - + " <40L>%n" - + "to be equal to: %n" - + " <45>")); + + "Expecting that the value at index 1:%n" + + " <40L>%n" + + "to be equal to: %n" + + " <45>")); } TableColumnAssert tableColumnAssert6 = assertThat(table2).column("var5"); @@ -166,10 +165,10 @@ public void should_fail_because_values_are_different() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 4 (column name : VAR5) of TEST2 table] %n" - + "Expecting that the value at index 1:%n" - + " %n" - + "to be equal to: %n" - + " <4>")); + + "Expecting that the value at index 1:%n" + + " %n" + + "to be equal to: %n" + + " <4>")); } TableColumnAssert tableColumnAssert7 = assertThat(table).column("var6"); @@ -178,10 +177,10 @@ public void should_fail_because_values_are_different() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 5 (column name : VAR6) of TEST table] %n" - + "Expecting that the value at index 1:%n" - + " <50.60>%n" - + "to be equal to: %n" - + " <55.6>")); + + "Expecting that the value at index 1:%n" + + " <50.60>%n" + + "to be equal to: %n" + + " <55.6>")); } TableColumnAssert tableColumnAssert8 = assertThat(table2).column("var6"); @@ -190,10 +189,10 @@ public void should_fail_because_values_are_different() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 5 (column name : VAR6) of TEST2 table] %n" - + "Expecting that the value at index 1:%n" - + " %n" - + "to be equal to: %n" - + " <5.6>")); + + "Expecting that the value at index 1:%n" + + " %n" + + "to be equal to: %n" + + " <5.6>")); } TableColumnAssert tableColumnAssert9 = assertThat(table).column("var7"); @@ -202,10 +201,10 @@ public void should_fail_because_values_are_different() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 6 (column name : VAR7) of TEST table] %n" - + "Expecting that the value at index 1:%n" - + " <70.8f>%n" - + "to be equal to: %n" - + " <75.8>")); + + "Expecting that the value at index 1:%n" + + " <70.8f>%n" + + "to be equal to: %n" + + " <75.8>")); } TableColumnAssert tableColumnAssert10 = assertThat(table2).column("var7"); @@ -214,10 +213,10 @@ public void should_fail_because_values_are_different() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 6 (column name : VAR7) of TEST2 table] %n" - + "Expecting that the value at index 1:%n" - + " %n" - + "to be equal to: %n" - + " <7.8>")); + + "Expecting that the value at index 1:%n" + + " %n" + + "to be equal to: %n" + + " <7.8>")); } TableColumnAssert tableColumnAssert11 = assertThat(table).column("var13"); @@ -226,10 +225,10 @@ public void should_fail_because_values_are_different() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 12 (column name : VAR13) of TEST table] %n" - + "Expecting that the value at index 2:%n" - + " <500.00>%n" - + "to be equal to: %n" - + " <505>")); + + "Expecting that the value at index 2:%n" + + " <500.00>%n" + + "to be equal to: %n" + + " <505>")); } TableColumnAssert tableColumnAssert12 = assertThat(table2).column("var13"); @@ -238,10 +237,10 @@ public void should_fail_because_values_are_different() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 12 (column name : VAR13) of TEST2 table] %n" - + "Expecting that the value at index 1:%n" - + " %n" - + "to be equal to: %n" - + " <5>")); + + "Expecting that the value at index 1:%n" + + " %n" + + "to be equal to: %n" + + " <5>")); } TableColumnAssert tableColumnAssert13 = assertThat(table).column("var14"); @@ -250,10 +249,10 @@ public void should_fail_because_values_are_different() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 13 (column name : VAR14) of TEST table] %n" - + "Expecting that the value at index 2:%n" - + " <700.0f>%n" - + "to be equal to: %n" - + " <750>")); + + "Expecting that the value at index 2:%n" + + " <700.0f>%n" + + "to be equal to: %n" + + " <750>")); } TableColumnAssert tableColumnAssert14 = assertThat(table2).column("var14"); @@ -262,10 +261,10 @@ public void should_fail_because_values_are_different() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 13 (column name : VAR14) of TEST2 table] %n" - + "Expecting that the value at index 1:%n" - + " %n" - + "to be equal to: %n" - + " <7>")); + + "Expecting that the value at index 1:%n" + + " %n" + + "to be equal to: %n" + + " <7>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnEquality_HasValues_String_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnEquality_HasValues_String_Test.java index e88a2783..2829f3ba 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnEquality_HasValues_String_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnEquality_HasValues_String_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.TableColumnAssert; import org.assertj.db.common.AbstractTest; @@ -19,15 +22,11 @@ import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link AssertOnColumnEquality} class : * {@link org.assertj.db.api.assertions.AssertOnColumnEquality#hasValues(String...)} method. * * @author Régis Pouiller - * */ public class AssertOnColumnEquality_HasValues_String_Test extends AbstractTest { @@ -97,8 +96,8 @@ public void test_has_values() throws Exception { TableColumnAssert tableColumnAssert15 = assertThat(table).column("var12"); TableColumnAssert tableColumnAssertReturn15 = tableColumnAssert15.hasValues("text", "another text", - "another text again", - "another text again"); + "another text again", + "another text again"); Assertions.assertThat(tableColumnAssert15).isSameAs(tableColumnAssertReturn15); TableColumnAssert tableColumnAssert16 = assertThat(table2).column("var12"); @@ -107,9 +106,9 @@ public void test_has_values() throws Exception { TableColumnAssert tableColumnAssert20 = assertThat(table).column("var8"); TableColumnAssert tableColumnAssertReturn20 = tableColumnAssert20.hasValues("09:46:30", - "12:29:49", - "12:29:49", - "12:29:49"); + "12:29:49", + "12:29:49", + "12:29:49"); Assertions.assertThat(tableColumnAssert20).isSameAs(tableColumnAssertReturn20); TableColumnAssert tableColumnAssert21 = assertThat(table2).column("var8"); @@ -118,52 +117,52 @@ public void test_has_values() throws Exception { TableColumnAssert tableColumnAssert22 = assertThat(table).column("var10"); TableColumnAssert tableColumnAssertReturn22 = tableColumnAssert22.hasValues( - "2014-05-24T09:46:30", - "2014-05-30T12:29:49", - "2014-05-30T00:00:00", - "2014-05-30T00:00:00"); + "2014-05-24T09:46:30", + "2014-05-30T12:29:49", + "2014-05-30T00:00:00", + "2014-05-30T00:00:00"); Assertions.assertThat(tableColumnAssert22).isSameAs(tableColumnAssertReturn22); TableColumnAssert tableColumnAssert23 = assertThat(table2).column("var10"); TableColumnAssert tableColumnAssertReturn23 = tableColumnAssert23.hasValues("2014-05-24T09:46:30", - null); + null); Assertions.assertThat(tableColumnAssert23).isSameAs(tableColumnAssertReturn23); TableColumnAssert tableColumnAssert24 = assertThat(table).column("var9"); TableColumnAssert tableColumnAssertReturn24 = tableColumnAssert24.hasValues("2014-05-24T00:00:00", - "2014-05-30T00:00:00", - "2014-05-30T00:00:00", - "2014-05-30T00:00:00"); + "2014-05-30T00:00:00", + "2014-05-30T00:00:00", + "2014-05-30T00:00:00"); Assertions.assertThat(tableColumnAssert24).isSameAs(tableColumnAssertReturn24); TableColumnAssert tableColumnAssert25 = assertThat(table2).column("var9"); TableColumnAssert tableColumnAssertReturn25 = tableColumnAssert25.hasValues("2014-05-24T00:00:00", - null); + null); Assertions.assertThat(tableColumnAssert25).isSameAs(tableColumnAssertReturn25); TableColumnAssert tableColumnAssert17 = assertThat(table).column("var9"); TableColumnAssert tableColumnAssertReturn17 = tableColumnAssert17.hasValues( - "2014-05-24", - "2014-05-30", - "2014-05-30", - "2014-05-30"); + "2014-05-24", + "2014-05-30", + "2014-05-30", + "2014-05-30"); Assertions.assertThat(tableColumnAssert17).isSameAs(tableColumnAssertReturn17); TableColumnAssert tableColumnAssert18 = assertThat(table2).column("var9"); TableColumnAssert tableColumnAssertReturn18 = tableColumnAssert18.hasValues("2014-05-24", - null); + null); Assertions.assertThat(tableColumnAssert18).isSameAs(tableColumnAssertReturn18); update("update test2 set var10 = '2014-05-24' where var1 = 1"); table2 = new Table(source, "test2"); TableColumnAssert tableColumnAssert19 = assertThat(table2).column("var10"); TableColumnAssert tableColumnAssertReturn19 = tableColumnAssert19.hasValues("2014-05-24", - null); + null); Assertions.assertThat(tableColumnAssert19).isSameAs(tableColumnAssertReturn19); TableColumnAssert tableColumnAssert99 = assertThat(table2).column("var16"); TableColumnAssert tableColumnAssertReturn99 = tableColumnAssert99.hasValues("30b443ae-c0c9-4790-9bec-ce1380808435", - null); + null); Assertions.assertThat(tableColumnAssert99).isSameAs(tableColumnAssertReturn99); } @@ -179,10 +178,10 @@ public void should_fail_because_values_are_different() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 2 (column name : VAR3) of TEST table] %n" - + "Expecting that the value at index 2:%n" - + " <\"25\">%n" - + "to be equal to: %n" - + " <\"35\">")); + + "Expecting that the value at index 2:%n" + + " <\"25\">%n" + + "to be equal to: %n" + + " <\"35\">")); } Table table2 = new Table(source, "test2"); TableColumnAssert tableColumnAssert2 = assertThat(table2).column("var3"); @@ -191,10 +190,10 @@ public void should_fail_because_values_are_different() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 2 (column name : VAR3) of TEST2 table] %n" - + "Expecting that the value at index 1:%n" - + " %n" - + "to be equal to: %n" - + " <\"2\">")); + + "Expecting that the value at index 1:%n" + + " %n" + + "to be equal to: %n" + + " <\"2\">")); } TableColumnAssert tableColumnAssert3 = assertThat(table).column("var4"); @@ -203,10 +202,10 @@ public void should_fail_because_values_are_different() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 3 (column name : VAR4) of TEST table] %n" - + "Expecting that the value at index 1:%n" - + " <\"30\">%n" - + "to be equal to: %n" - + " <\"35\">")); + + "Expecting that the value at index 1:%n" + + " <\"30\">%n" + + "to be equal to: %n" + + " <\"35\">")); } TableColumnAssert tableColumnAssert4 = assertThat(table2).column("var4"); @@ -215,10 +214,10 @@ public void should_fail_because_values_are_different() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 3 (column name : VAR4) of TEST2 table] %n" - + "Expecting that the value at index 1:%n" - + " %n" - + "to be equal to: %n" - + " <\"3\">")); + + "Expecting that the value at index 1:%n" + + " %n" + + "to be equal to: %n" + + " <\"3\">")); } TableColumnAssert tableColumnAssert5 = assertThat(table).column("var5"); @@ -227,10 +226,10 @@ public void should_fail_because_values_are_different() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 4 (column name : VAR5) of TEST table] %n" - + "Expecting that the value at index 1:%n" - + " <\"40\">%n" - + "to be equal to: %n" - + " <\"45\">")); + + "Expecting that the value at index 1:%n" + + " <\"40\">%n" + + "to be equal to: %n" + + " <\"45\">")); } TableColumnAssert tableColumnAssert6 = assertThat(table2).column("var5"); @@ -239,10 +238,10 @@ public void should_fail_because_values_are_different() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 4 (column name : VAR5) of TEST2 table] %n" - + "Expecting that the value at index 1:%n" - + " %n" - + "to be equal to: %n" - + " <\"4\">")); + + "Expecting that the value at index 1:%n" + + " %n" + + "to be equal to: %n" + + " <\"4\">")); } TableColumnAssert tableColumnAssert7 = assertThat(table).column("var6"); @@ -251,10 +250,10 @@ public void should_fail_because_values_are_different() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 5 (column name : VAR6) of TEST table] %n" - + "Expecting that the value at index 1:%n" - + " <\"50.60\">%n" - + "to be equal to: %n" - + " <\"55.6\">")); + + "Expecting that the value at index 1:%n" + + " <\"50.60\">%n" + + "to be equal to: %n" + + " <\"55.6\">")); } TableColumnAssert tableColumnAssert8 = assertThat(table2).column("var6"); @@ -263,10 +262,10 @@ public void should_fail_because_values_are_different() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 5 (column name : VAR6) of TEST2 table] %n" - + "Expecting that the value at index 1:%n" - + " %n" - + "to be equal to: %n" - + " <\"5.6\">")); + + "Expecting that the value at index 1:%n" + + " %n" + + "to be equal to: %n" + + " <\"5.6\">")); } TableColumnAssert tableColumnAssert9 = assertThat(table).column("var7"); @@ -275,10 +274,10 @@ public void should_fail_because_values_are_different() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 6 (column name : VAR7) of TEST table] %n" - + "Expecting that the value at index 1:%n" - + " <\"70.8\">%n" - + "to be equal to: %n" - + " <\"75.8\">")); + + "Expecting that the value at index 1:%n" + + " <\"70.8\">%n" + + "to be equal to: %n" + + " <\"75.8\">")); } TableColumnAssert tableColumnAssert10 = assertThat(table2).column("var7"); @@ -287,10 +286,10 @@ public void should_fail_because_values_are_different() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 6 (column name : VAR7) of TEST2 table] %n" - + "Expecting that the value at index 1:%n" - + " %n" - + "to be equal to: %n" - + " <\"7.8\">")); + + "Expecting that the value at index 1:%n" + + " %n" + + "to be equal to: %n" + + " <\"7.8\">")); } TableColumnAssert tableColumnAssert11 = assertThat(table).column("var13"); @@ -299,10 +298,10 @@ public void should_fail_because_values_are_different() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 12 (column name : VAR13) of TEST table] %n" - + "Expecting that the value at index 2:%n" - + " <\"500.00\">%n" - + "to be equal to: %n" - + " <\"505\">")); + + "Expecting that the value at index 2:%n" + + " <\"500.00\">%n" + + "to be equal to: %n" + + " <\"505\">")); } TableColumnAssert tableColumnAssert12 = assertThat(table2).column("var13"); @@ -311,10 +310,10 @@ public void should_fail_because_values_are_different() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 12 (column name : VAR13) of TEST2 table] %n" - + "Expecting that the value at index 1:%n" - + " %n" - + "to be equal to: %n" - + " <\"5\">")); + + "Expecting that the value at index 1:%n" + + " %n" + + "to be equal to: %n" + + " <\"5\">")); } TableColumnAssert tableColumnAssert13 = assertThat(table).column("var14"); @@ -323,10 +322,10 @@ public void should_fail_because_values_are_different() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 13 (column name : VAR14) of TEST table] %n" - + "Expecting that the value at index 2:%n" - + " <\"700.0\">%n" - + "to be equal to: %n" - + " <\"750\">")); + + "Expecting that the value at index 2:%n" + + " <\"700.0\">%n" + + "to be equal to: %n" + + " <\"750\">")); } TableColumnAssert tableColumnAssert14 = assertThat(table2).column("var14"); @@ -335,10 +334,10 @@ public void should_fail_because_values_are_different() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 13 (column name : VAR14) of TEST2 table] %n" - + "Expecting that the value at index 1:%n" - + " %n" - + "to be equal to: %n" - + " <\"7\">")); + + "Expecting that the value at index 1:%n" + + " %n" + + "to be equal to: %n" + + " <\"7\">")); } TableColumnAssert tableColumnAssert15 = assertThat(table).column("var12"); @@ -347,10 +346,10 @@ public void should_fail_because_values_are_different() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 11 (column name : VAR12) of TEST table] %n" - + "Expecting that the value at index 2:%n" - + " <\"another text again\">%n" - + "to be equal to: %n" - + " <\"another text\">")); + + "Expecting that the value at index 2:%n" + + " <\"another text again\">%n" + + "to be equal to: %n" + + " <\"another text\">")); } TableColumnAssert tableColumnAssert16 = assertThat(table2).column("var12"); @@ -359,152 +358,152 @@ public void should_fail_because_values_are_different() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 11 (column name : VAR12) of TEST2 table] %n" - + "Expecting that the value at index 1:%n" - + " %n" - + "to be equal to: %n" - + " <\"text\">")); + + "Expecting that the value at index 1:%n" + + " %n" + + "to be equal to: %n" + + " <\"text\">")); } TableColumnAssert tableColumnAssert17 = assertThat(table).column("var9"); try { tableColumnAssert17.hasValues("2014-05-24", - "2014-05-29", - "2014-05-30", - "2014-05-30"); + "2014-05-29", + "2014-05-30", + "2014-05-30"); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 8 (column name : VAR9) of TEST table] %n" - + "Expecting that the value at index 1:%n" - + " <\"2014-05-30\">%n" - + "to be equal to: %n" - + " <\"2014-05-29\">")); + + "Expecting that the value at index 1:%n" + + " <\"2014-05-30\">%n" + + "to be equal to: %n" + + " <\"2014-05-29\">")); } TableColumnAssert tableColumnAssert18 = assertThat(table2).column("var9"); try { tableColumnAssert18.hasValues("2014-05-24", - "2014-05-24"); + "2014-05-24"); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 8 (column name : VAR9) of TEST2 table] %n" - + "Expecting that the value at index 1:%n" - + " %n" - + "to be equal to: %n" - + " <\"2014-05-24\">")); + + "Expecting that the value at index 1:%n" + + " %n" + + "to be equal to: %n" + + " <\"2014-05-24\">")); } TableColumnAssert tableColumnAssert19 = assertThat(table2).column("var10"); try { tableColumnAssert19.hasValues("2014-05-23", - null); + null); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 9 (column name : VAR10) of TEST2 table] %n" - + "Expecting that the value at index 0:%n" - + " <\"2014-05-24T09:46:30.000000000\">%n" - + "to be equal to: %n" - + " <\"2014-05-23\">")); + + "Expecting that the value at index 0:%n" + + " <\"2014-05-24T09:46:30.000000000\">%n" + + "to be equal to: %n" + + " <\"2014-05-23\">")); } TableColumnAssert tableColumnAssert20 = assertThat(table).column("var8"); try { tableColumnAssert20.hasValues("12:29:49", - "12:29:49", - "12:29:49", - "12:29:49"); + "12:29:49", + "12:29:49", + "12:29:49"); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 7 (column name : VAR8) of TEST table] %n" - + "Expecting that the value at index 0:%n" - + " <\"09:46:30.000000000\">%n" - + "to be equal to: %n" - + " <\"12:29:49\">")); + + "Expecting that the value at index 0:%n" + + " <\"09:46:30.000000000\">%n" + + "to be equal to: %n" + + " <\"12:29:49\">")); } TableColumnAssert tableColumnAssert21 = assertThat(table2).column("var8"); try { tableColumnAssert21.hasValues("09:46:30", - "12:29:49"); + "12:29:49"); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 7 (column name : VAR8) of TEST2 table] %n" - + "Expecting that the value at index 1:%n" - + " %n" - + "to be equal to: %n" - + " <\"12:29:49\">")); + + "Expecting that the value at index 1:%n" + + " %n" + + "to be equal to: %n" + + " <\"12:29:49\">")); } TableColumnAssert tableColumnAssert22 = assertThat(table).column("var10"); try { tableColumnAssert22.hasValues("2014-05-24T09:46:30", - "2014-05-30T13:29:49", - "2014-05-30T00:00:00", - "2014-05-30T00:00:00"); - fail("An exception must be raised"); + "2014-05-30T13:29:49", + "2014-05-30T00:00:00", + "2014-05-30T00:00:00"); + fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 9 (column name : VAR10) of TEST table] %n" - + "Expecting that the value at index 1:%n" - + " <\"2014-05-30T12:29:49.000000000\">%n" - + "to be equal to: %n" - + " <\"2014-05-30T13:29:49\">")); + + "Expecting that the value at index 1:%n" + + " <\"2014-05-30T12:29:49.000000000\">%n" + + "to be equal to: %n" + + " <\"2014-05-30T13:29:49\">")); } TableColumnAssert tableColumnAssert23 = assertThat(table2).column("var10"); try { tableColumnAssert23.hasValues("2014-05-24T09:46:30", - "2014-05-24T09:46:30"); - fail("An exception must be raised"); + "2014-05-24T09:46:30"); + fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 9 (column name : VAR10) of TEST2 table] %n" - + "Expecting that the value at index 1:%n" - + " %n" - + "to be equal to: %n" - + " <\"2014-05-24T09:46:30\">")); + + "Expecting that the value at index 1:%n" + + " %n" + + "to be equal to: %n" + + " <\"2014-05-24T09:46:30\">")); } TableColumnAssert tableColumnAssert24 = assertThat(table).column("var9"); try { tableColumnAssert24.hasValues("2014-05-24T00:00:00", - "2014-05-24T00:00:00", - "2014-05-30T00:00:00", - "2014-05-30T00:00:00"); + "2014-05-24T00:00:00", + "2014-05-30T00:00:00", + "2014-05-30T00:00:00"); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 8 (column name : VAR9) of TEST table] %n" - + "Expecting that the value at index 1:%n" - + " <\"2014-05-30T00:00:00.000000000\">%n" - + "to be equal to: %n" - + " <\"2014-05-24T00:00:00\">")); + + "Expecting that the value at index 1:%n" + + " <\"2014-05-30T00:00:00.000000000\">%n" + + "to be equal to: %n" + + " <\"2014-05-24T00:00:00\">")); } TableColumnAssert tableColumnAssert25 = assertThat(table2).column("var9"); try { tableColumnAssert25.hasValues("2014-05-24T00:00:00", - "2014-05-24T00:00:00"); - fail("An exception must be raised"); + "2014-05-24T00:00:00"); + fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 8 (column name : VAR9) of TEST2 table] %n" - + "Expecting that the value at index 1:%n" - + " %n" - + "to be equal to: %n" - + " <\"2014-05-24T00:00:00\">")); + + "Expecting that the value at index 1:%n" + + " %n" + + "to be equal to: %n" + + " <\"2014-05-24T00:00:00\">")); } TableColumnAssert tableColumnAssert26 = assertThat(table2).column("var16"); try { tableColumnAssert26.hasValues("30B443AE-C0C9-4790-9BEC-CE1380808435", - "30B443AE-C0C9-4790-9BEC-CE1380808435"); + "30B443AE-C0C9-4790-9BEC-CE1380808435"); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 15 (column name : VAR16) of TEST2 table] %n" - + "Expecting that the value at index 1:%n" - + " %n" - + "to be equal to: %n" - + " <\"30B443AE-C0C9-4790-9BEC-CE1380808435\">")); + + "Expecting that the value at index 1:%n" + + " %n" + + "to be equal to: %n" + + " <\"30B443AE-C0C9-4790-9BEC-CE1380808435\">")); } TableColumnAssert tableColumnAssert27 = assertThat(table2).column("var16"); try { tableColumnAssert27.hasValues("88838129-291E-40A9-A94C-A15BE36CF7C3", - "30B443AE-C0C9-4790-9BEC-CE1380808435"); + "30B443AE-C0C9-4790-9BEC-CE1380808435"); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 15 (column name : VAR16) of TEST2 table] %n" - + "Expecting that the value at index 0:%n" - + " <\"30b443ae-c0c9-4790-9bec-ce1380808435\">%n" - + "to be equal to: %n" - + " <\"88838129-291E-40A9-A94C-A15BE36CF7C3\">")); + + "Expecting that the value at index 0:%n" + + " <\"30b443ae-c0c9-4790-9bec-ce1380808435\">%n" + + "to be equal to: %n" + + " <\"88838129-291E-40A9-A94C-A15BE36CF7C3\">")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnEquality_HasValues_TimeValue_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnEquality_HasValues_TimeValue_Test.java index 6df261dc..16bdbf15 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnEquality_HasValues_TimeValue_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnEquality_HasValues_TimeValue_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.TableColumnAssert; import org.assertj.db.common.AbstractTest; @@ -19,15 +22,11 @@ import org.assertj.db.type.TimeValue; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link AssertOnColumnEquality} class : * {@link org.assertj.db.api.assertions.AssertOnColumnEquality#hasValues(org.assertj.db.type.TimeValue...)} method. * * @author Régis Pouiller - * */ public class AssertOnColumnEquality_HasValues_TimeValue_Test extends AbstractTest { @@ -39,9 +38,9 @@ public void test_has_values() throws Exception { Table table = new Table(source, "test"); TableColumnAssert tableColumnAssert = assertThat(table).column("var8"); TableColumnAssert tableColumnAssertReturn = tableColumnAssert.hasValues(TimeValue.of(9, 46, 30), - TimeValue.of(12, 29, 49), - TimeValue.of(12, 29, 49), - TimeValue.of(12, 29, 49)); + TimeValue.of(12, 29, 49), + TimeValue.of(12, 29, 49), + TimeValue.of(12, 29, 49)); Assertions.assertThat(tableColumnAssert).isSameAs(tableColumnAssertReturn); Table table2 = new Table(source, "test2"); @@ -59,29 +58,29 @@ public void should_fail_because_values_are_different() throws Exception { TableColumnAssert tableColumnAssert = assertThat(table).column("var8"); try { tableColumnAssert.hasValues(TimeValue.of(12, 29, 49), - TimeValue.of(12, 29, 49), - TimeValue.of(12, 29, 49), - TimeValue.of(12, 29, 49)); + TimeValue.of(12, 29, 49), + TimeValue.of(12, 29, 49), + TimeValue.of(12, 29, 49)); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 7 (column name : VAR8) of TEST table] %n" - + "Expecting that the value at index 0:%n" - + " <09:46:30.000000000>%n" - + "to be equal to: %n" - + " <12:29:49.000000000>")); + + "Expecting that the value at index 0:%n" + + " <09:46:30.000000000>%n" + + "to be equal to: %n" + + " <12:29:49.000000000>")); } Table table2 = new Table(source, "test2"); TableColumnAssert tableColumnAssert2 = assertThat(table2).column("var8"); try { tableColumnAssert2.hasValues(TimeValue.of(9, 46, 30), - TimeValue.of(12, 29, 49)); + TimeValue.of(12, 29, 49)); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 7 (column name : VAR8) of TEST2 table] %n" - + "Expecting that the value at index 1:%n" - + " %n" - + "to be equal to: %n" - + " <12:29:49.000000000>")); + + "Expecting that the value at index 1:%n" + + " %n" + + "to be equal to: %n" + + " <12:29:49.000000000>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnEquality_HasValues_UUID_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnEquality_HasValues_UUID_Test.java index 46215e9f..d69796ff 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnEquality_HasValues_UUID_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnEquality_HasValues_UUID_Test.java @@ -8,21 +8,21 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + +import java.util.UUID; + import org.assertj.core.api.Assertions; import org.assertj.db.api.TableColumnAssert; import org.assertj.db.common.AbstractTest; import org.assertj.db.type.Table; import org.junit.Test; -import java.util.UUID; - -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link AssertOnColumnEquality} class : * {@link org.assertj.db.api.assertions.AssertOnColumnEquality#hasValues(java.util.UUID...)} method. @@ -39,17 +39,17 @@ public void test_has_values() throws Exception { Table table = new Table(source, "test"); TableColumnAssert tableColumnAssert = assertThat(table).column("var15"); TableColumnAssert tableColumnAssertReturn = tableColumnAssert.hasValues( - UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435"), - UUID.fromString("0E2A1269-EFF0-4233-B87B-B53E8B6F164D"), - UUID.fromString("2B0D1BDD-909E-4362-BA10-C930BA82718D"), - UUID.fromString("399FFFCA-7874-4225-9903-E227C4E9DCC1") + UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435"), + UUID.fromString("0E2A1269-EFF0-4233-B87B-B53E8B6F164D"), + UUID.fromString("2B0D1BDD-909E-4362-BA10-C930BA82718D"), + UUID.fromString("399FFFCA-7874-4225-9903-E227C4E9DCC1") ); Assertions.assertThat(tableColumnAssert).isSameAs(tableColumnAssertReturn); Table table2 = new Table(source, "test2"); TableColumnAssert tableColumnAssert2 = assertThat(table2).column("var16"); TableColumnAssert tableColumnAssertReturn2 = tableColumnAssert2 - .hasValues(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435"), null); + .hasValues(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435"), null); Assertions.assertThat(tableColumnAssert2).isSameAs(tableColumnAssertReturn2); } @@ -62,31 +62,31 @@ public void should_fail_because_values_are_different() throws Exception { TableColumnAssert tableColumnAssert = assertThat(table).column("var15"); try { tableColumnAssert.hasValues(UUID.fromString("F96EC595-CE91-47CC-9152-CCC8AC48AAD6"), - UUID.fromString("F96EC595-CE91-47CC-9152-CCC8AC48AAD6"), - UUID.fromString("F96EC595-CE91-47CC-9152-CCC8AC48AAD6"), - UUID.fromString("F96EC595-CE91-47CC-9152-CCC8AC48AAD6")); + UUID.fromString("F96EC595-CE91-47CC-9152-CCC8AC48AAD6"), + UUID.fromString("F96EC595-CE91-47CC-9152-CCC8AC48AAD6"), + UUID.fromString("F96EC595-CE91-47CC-9152-CCC8AC48AAD6")); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()) - .isEqualTo(String.format("[Column at index 14 (column name : VAR15) of TEST table] %n" - + "Expecting that the value at index 0:%n" - + " <30b443ae-c0c9-4790-9bec-ce1380808435>%n" - + "to be equal to: %n" - + " ")); + .isEqualTo(String.format("[Column at index 14 (column name : VAR15) of TEST table] %n" + + "Expecting that the value at index 0:%n" + + " <30b443ae-c0c9-4790-9bec-ce1380808435>%n" + + "to be equal to: %n" + + " ")); } Table table2 = new Table(source, "test2"); TableColumnAssert tableColumnAssert2 = assertThat(table2).column("var16"); try { tableColumnAssert2.hasValues(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435"), - UUID.fromString("F96EC595-CE91-47CC-9152-CCC8AC48AAD6")); + UUID.fromString("F96EC595-CE91-47CC-9152-CCC8AC48AAD6")); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()) - .isEqualTo(String.format("[Column at index 15 (column name : VAR16) of TEST2 table] %n" - + "Expecting that the value at index 1:%n" - + " %n" - + "to be equal to: %n" - + " ")); + .isEqualTo(String.format("[Column at index 15 (column name : VAR16) of TEST2 table] %n" + + "Expecting that the value at index 1:%n" + + " %n" + + "to be equal to: %n" + + " ")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnName_HasColumnName_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnName_HasColumnName_Test.java index 32e438ed..4ca2e35b 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnName_HasColumnName_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnName_HasColumnName_Test.java @@ -8,27 +8,31 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; -import org.assertj.db.api.*; +import org.assertj.db.api.ChangeAssert; +import org.assertj.db.api.ChangeColumnAssert; +import org.assertj.db.api.ChangeRowValueAssert; +import org.assertj.db.api.TableAssert; +import org.assertj.db.api.TableColumnAssert; +import org.assertj.db.api.TableRowValueAssert; import org.assertj.db.common.AbstractTest; import org.assertj.db.common.NeedReload; import org.assertj.db.type.Changes; import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link AssertOnColumnName} class : * {@link AssertOnColumnName#hasColumnName(String)} method. * * @author Régis Pouiller - * */ public class AssertOnColumnName_HasColumnName_Test extends AbstractTest { @@ -76,20 +80,20 @@ public void should_fail_because_column_name_is_different() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 0 (column name : ID) of Change at index 0 (on table : ACTOR and with primary key : [4]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting :%n" - + " \"ID2\"%n" - + "to be the name of the column but was:%n" - + " \"ID\"")); + + "Expecting :%n" + + " \"ID2\"%n" + + "to be the name of the column but was:%n" + + " \"ID\"")); } try { changeAssert.rowAtEndPoint().value().hasColumnName("ID2"); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at index 0 (column name : ID) of Row at end point of Change at index 0 (on table : ACTOR and with primary key : [4]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting :%n" - + " \"ID2\"%n" - + "to be the name of the column but was:%n" - + " \"ID\"")); + + "Expecting :%n" + + " \"ID2\"%n" + + "to be the name of the column but was:%n" + + " \"ID\"")); } Table table = new Table(source, "actor"); @@ -99,20 +103,20 @@ public void should_fail_because_column_name_is_different() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 0 (column name : ID) of ACTOR table] %n" - + "Expecting :%n" - + " \"ID2\"%n" - + "to be the name of the column but was:%n" - + " \"ID\"")); + + "Expecting :%n" + + " \"ID2\"%n" + + "to be the name of the column but was:%n" + + " \"ID\"")); } try { tableAssert.row().value().hasColumnName("ID2"); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at index 0 (column name : ID) of Row at index 0 of ACTOR table] %n" - + "Expecting :%n" - + " \"ID2\"%n" - + "to be the name of the column but was:%n" - + " \"ID\"")); + + "Expecting :%n" + + " \"ID2\"%n" + + "to be the name of the column but was:%n" + + " \"ID\"")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnNullity_HasOnlyNotNullValues_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnNullity_HasOnlyNotNullValues_Test.java index 94888851..b56dc5bb 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnNullity_HasOnlyNotNullValues_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnNullity_HasOnlyNotNullValues_Test.java @@ -8,25 +8,24 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.TableColumnAssert; import org.assertj.db.common.AbstractTest; import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link AssertOnColumnNullity} class : * {@link org.assertj.db.api.assertions.AssertOnColumnNullity#hasOnlyNotNullValues()} method. * * @author Régis Pouiller - * */ public class AssertOnColumnNullity_HasOnlyNotNullValues_Test extends AbstractTest { @@ -53,8 +52,8 @@ public void should_fail_because_column_has_null_value() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 13 (column name : VAR14) of TEST2 table] %n" - + "Expecting to contain only not null:%n" - + "but contains null at index: 1")); + + "Expecting to contain only not null:%n" + + "but contains null at index: 1")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnNullity_HasOnlyNullValues_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnNullity_HasOnlyNullValues_Test.java index 900befd2..a5df95af 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnNullity_HasOnlyNullValues_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnNullity_HasOnlyNullValues_Test.java @@ -8,25 +8,24 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.TableColumnAssert; import org.assertj.db.common.AbstractTest; import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link AssertOnColumnNullity} class : * {@link org.assertj.db.api.assertions.AssertOnColumnNullity#hasOnlyNullValues()} method. * * @author Régis Pouiller - * */ public class AssertOnColumnNullity_HasOnlyNullValues_Test extends AbstractTest { @@ -53,8 +52,8 @@ public void should_fail_because_column_has_not_null_value() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 13 (column name : VAR14) of TEST2 table] %n" - + "Expecting to contain only null:%n" - + "but contains not null at index: 0")); + + "Expecting to contain only null:%n" + + "but contains not null at index: 0")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_One_Boolean_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_One_Boolean_Test.java index 8eb351f4..e501d5e3 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_One_Boolean_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_One_Boolean_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeAssert; import org.assertj.db.api.ChangeColumnAssert; @@ -20,15 +23,11 @@ import org.assertj.db.type.Changes; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnColumnOfChangeEquality} class : * {@link org.assertj.db.api.assertions.AssertOnColumnOfChangeEquality#hasValues(Boolean)} method. * * @author Régis Pouiller - * */ public class AssertOnColumnOfChangeEquality_HasValues_One_Boolean_Test extends AbstractTest { @@ -63,10 +62,10 @@ public void should_fail_because_value_at_start_point_is_different() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 1 (column name : VAR2) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting that start point:%n" - + " %n" - + "to be equal to: %n" - + " ")); + + "Expecting that start point:%n" + + " %n" + + "to be equal to: %n" + + " ")); } } @@ -85,10 +84,10 @@ public void should_fail_because_value_at_end_point_is_different() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 1 (column name : VAR2) of Change at index 0 (on table : TEST and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting that end point:%n" - + " %n" - + "to be equal to: %n" - + " ")); + + "Expecting that end point:%n" + + " %n" + + "to be equal to: %n" + + " ")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_One_Bytes_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_One_Bytes_Test.java index cdb2ac35..d8d8ea74 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_One_Bytes_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_One_Bytes_Test.java @@ -8,10 +8,14 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.assertj.db.api.Assertions.bytesContentFromClassPathOf; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeAssert; import org.assertj.db.api.ChangeColumnAssert; @@ -20,16 +24,11 @@ import org.assertj.db.type.Changes; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.assertj.db.api.Assertions.bytesContentFromClassPathOf; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnColumnOfChangeEquality} class : * {@link org.assertj.db.api.assertions.AssertOnColumnOfChangeEquality#hasValues(byte[])} method. * * @author Régis Pouiller - * */ public class AssertOnColumnOfChangeEquality_HasValues_One_Bytes_Test extends AbstractTest { @@ -68,7 +67,7 @@ public void should_fail_because_value_at_start_point_is_different() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 10 (column name : VAR11) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting that start point to be equal to the expected value but was not equal")); + + "Expecting that start point to be equal to the expected value but was not equal")); } } @@ -89,7 +88,7 @@ public void should_fail_because_value_at_end_point_is_different() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 10 (column name : VAR11) of Change at index 0 (on table : TEST and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting that end point to be equal to the expected value but was not equal")); + + "Expecting that end point to be equal to the expected value but was not equal")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_One_DateTimeValue_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_One_DateTimeValue_Test.java index 8ff11436..dc0b14c9 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_One_DateTimeValue_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_One_DateTimeValue_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeAssert; import org.assertj.db.api.ChangeColumnAssert; @@ -23,15 +26,11 @@ import org.assertj.db.type.TimeValue; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnColumnOfChangeEquality} class : * {@link org.assertj.db.api.assertions.AssertOnColumnOfChangeEquality#hasValues(org.assertj.db.type.DateTimeValue)} method. * * @author Régis Pouiller - * */ public class AssertOnColumnOfChangeEquality_HasValues_One_DateTimeValue_Test extends AbstractTest { @@ -48,7 +47,7 @@ public void test_have_values_equal_to() { ChangeAssert changeAssert = assertThat(changes).change(); ChangeColumnAssert changeColumnAssert = changeAssert.column("var10"); ChangeColumnAssert changeColumnAssert2 = changeColumnAssert.hasValues(DateTimeValue.of( - DateValue.of(2014, 5, 24), TimeValue.of(9, 46, 30))); + DateValue.of(2014, 5, 24), TimeValue.of(9, 46, 30))); Assertions.assertThat(changeColumnAssert).isSameAs(changeColumnAssert2); } @@ -64,14 +63,14 @@ public void should_fail_because_value_at_start_point_is_different() { try { assertThat(changes).change().column("var10").hasValues(DateTimeValue.of( - DateValue.of(2014, 5, 24), TimeValue.of(9, 46, 30))); + DateValue.of(2014, 5, 24), TimeValue.of(9, 46, 30))); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 9 (column name : VAR10) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting that start point:%n" - + " %n" - + "to be equal to: %n" - + " <2014-05-24T09:46:30.000000000>")); + + "Expecting that start point:%n" + + " %n" + + "to be equal to: %n" + + " <2014-05-24T09:46:30.000000000>")); } } @@ -87,14 +86,14 @@ public void should_fail_because_value_at_end_point_is_different() { try { assertThat(changes).change().column("var10").hasValues(DateTimeValue.of( - DateValue.of(2014, 5, 24), TimeValue.of(9, 46, 30))); + DateValue.of(2014, 5, 24), TimeValue.of(9, 46, 30))); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 9 (column name : VAR10) of Change at index 0 (on table : TEST and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting that end point:%n" - + " %n" - + "to be equal to: %n" - + " <2014-05-24T09:46:30.000000000>")); + + "Expecting that end point:%n" + + " %n" + + "to be equal to: %n" + + " <2014-05-24T09:46:30.000000000>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_One_DateValue_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_One_DateValue_Test.java index 82f0500f..b8e868db 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_One_DateValue_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_One_DateValue_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeAssert; import org.assertj.db.api.ChangeColumnAssert; @@ -21,15 +24,11 @@ import org.assertj.db.type.DateValue; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnColumnOfChangeEquality} class : * {@link org.assertj.db.api.assertions.AssertOnColumnOfChangeEquality#hasValues(org.assertj.db.type.DateValue)} method. * * @author Régis Pouiller - * */ public class AssertOnColumnOfChangeEquality_HasValues_One_DateValue_Test extends AbstractTest { @@ -64,10 +63,10 @@ public void should_fail_because_value_at_start_point_is_different() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 8 (column name : VAR9) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting that start point:%n" - + " %n" - + "to be equal to: %n" - + " <2014-05-24>")); + + "Expecting that start point:%n" + + " %n" + + "to be equal to: %n" + + " <2014-05-24>")); } } @@ -86,10 +85,10 @@ public void should_fail_because_value_at_end_point_is_different() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 8 (column name : VAR9) of Change at index 0 (on table : TEST and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting that end point:%n" - + " %n" - + "to be equal to: %n" - + " <2014-05-24>")); + + "Expecting that end point:%n" + + " %n" + + "to be equal to: %n" + + " <2014-05-24>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_One_Number_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_One_Number_Test.java index 212e6f6e..30dd2f4d 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_One_Number_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_One_Number_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeAssert; import org.assertj.db.api.ChangeColumnAssert; @@ -20,15 +23,11 @@ import org.assertj.db.type.Changes; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnColumnOfChangeEquality} class : * {@link org.assertj.db.api.assertions.AssertOnColumnOfChangeEquality#hasValues(Number)} method. * * @author Régis Pouiller - * */ public class AssertOnColumnOfChangeEquality_HasValues_One_Number_Test extends AbstractTest { @@ -63,10 +62,10 @@ public void should_fail_because_value_at_start_point_is_different() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 2 (column name : VAR3) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting that start point:%n" - + " %n" - + "to be equal to: %n" - + " <3>")); + + "Expecting that start point:%n" + + " %n" + + "to be equal to: %n" + + " <3>")); } } @@ -85,10 +84,10 @@ public void should_fail_because_value_at_end_point_is_different() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 2 (column name : VAR3) of Change at index 0 (on table : TEST and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting that end point:%n" - + " %n" - + "to be equal to: %n" - + " <2>")); + + "Expecting that end point:%n" + + " %n" + + "to be equal to: %n" + + " <2>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_One_String_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_One_String_Test.java index 017874cd..8a559f5d 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_One_String_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_One_String_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeAssert; import org.assertj.db.api.ChangeColumnAssert; @@ -20,15 +23,11 @@ import org.assertj.db.type.Changes; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnColumnOfChangeEquality} class : * {@link org.assertj.db.api.assertions.AssertOnColumnOfChangeEquality#hasValues(String)} method. * * @author Régis Pouiller - * */ public class AssertOnColumnOfChangeEquality_HasValues_One_String_Test extends AbstractTest { @@ -66,20 +65,20 @@ public void should_fail_because_value_at_start_point_is_different() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 11 (column name : VAR12) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting that start point:%n" - + " %n" - + "to be equal to: %n" - + " <\"test\">")); + + "Expecting that start point:%n" + + " %n" + + "to be equal to: %n" + + " <\"test\">")); } try { assertThat(changes).change().column("var15").hasValues("88838129-291E-40A9-A94C-A15BE36CF7C3"); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 14 (column name : VAR15) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting that start point:%n" - + " %n" - + "to be equal to: %n" - + " <\"88838129-291E-40A9-A94C-A15BE36CF7C3\">")); + + "Expecting that start point:%n" + + " %n" + + "to be equal to: %n" + + " <\"88838129-291E-40A9-A94C-A15BE36CF7C3\">")); } } @@ -98,20 +97,20 @@ public void should_fail_because_value_at_end_point_is_different() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 11 (column name : VAR12) of Change at index 0 (on table : TEST and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting that end point:%n" - + " %n" - + "to be equal to: %n" - + " <\"text\">")); + + "Expecting that end point:%n" + + " %n" + + "to be equal to: %n" + + " <\"text\">")); } try { assertThat(changes).change().column("var15").hasValues("30B443AE-C0C9-4790-9BEC-CE1380808435"); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 14 (column name : VAR15) of Change at index 0 (on table : TEST and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting that end point:%n" - + " %n" - + "to be equal to: %n" - + " <\"30B443AE-C0C9-4790-9BEC-CE1380808435\">")); + + "Expecting that end point:%n" + + " %n" + + "to be equal to: %n" + + " <\"30B443AE-C0C9-4790-9BEC-CE1380808435\">")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_One_TimeValue_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_One_TimeValue_Test.java index 9bc61e79..9a9410f4 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_One_TimeValue_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_One_TimeValue_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeAssert; import org.assertj.db.api.ChangeColumnAssert; @@ -21,15 +24,11 @@ import org.assertj.db.type.TimeValue; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnColumnOfChangeEquality} class : * {@link org.assertj.db.api.assertions.AssertOnColumnOfChangeEquality#hasValues(org.assertj.db.type.TimeValue)} method. * * @author Régis Pouiller - * */ public class AssertOnColumnOfChangeEquality_HasValues_One_TimeValue_Test extends AbstractTest { @@ -64,10 +63,10 @@ public void should_fail_because_value_at_start_point_is_different() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 7 (column name : VAR8) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting that start point:%n" - + " %n" - + "to be equal to: %n" - + " <09:46:30.000000000>")); + + "Expecting that start point:%n" + + " %n" + + "to be equal to: %n" + + " <09:46:30.000000000>")); } } @@ -86,10 +85,10 @@ public void should_fail_because_value_at_end_point_is_different() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 7 (column name : VAR8) of Change at index 0 (on table : TEST and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting that end point:%n" - + " %n" - + "to be equal to: %n" - + " <09:46:30.000000000>")); + + "Expecting that end point:%n" + + " %n" + + "to be equal to: %n" + + " <09:46:30.000000000>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_One_UUID_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_One_UUID_Test.java index 787f3190..f032a2c9 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_One_UUID_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_One_UUID_Test.java @@ -8,10 +8,15 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + +import java.util.UUID; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeAssert; import org.assertj.db.api.ChangeColumnAssert; @@ -20,11 +25,6 @@ import org.assertj.db.type.Changes; import org.junit.Test; -import java.util.UUID; - -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * * Tests on {@link org.assertj.db.api.assertions.AssertOnColumnOfChangeEquality} class : * {@link org.assertj.db.api.assertions.AssertOnColumnOfChangeEquality#hasValues(UUID)} method. @@ -46,7 +46,7 @@ public void test_have_values_equal_to() { ChangeAssert changeAssert = assertThat(changes).change(); ChangeColumnAssert changeColumnAssert = changeAssert.column("var15"); ChangeColumnAssert changeColumnAssert2 = changeColumnAssert - .hasValues(UUID.fromString("30b443ae-c0c9-4790-9bec-ce1380808435")); + .hasValues(UUID.fromString("30b443ae-c0c9-4790-9bec-ce1380808435")); Assertions.assertThat(changeColumnAssert).isSameAs(changeColumnAssert2); } @@ -65,7 +65,7 @@ public void should_fail_because_value_at_start_point_is_different() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format( - "[Column at index 14 (column name : VAR15) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n" + "[Column at index 14 (column name : VAR15) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n" + "Expecting that start point:%n" + " %n" + "to be equal to: %n" @@ -88,7 +88,7 @@ public void should_fail_because_value_at_end_point_is_different() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format( - "[Column at index 14 (column name : VAR15) of Change at index 0 (on table : TEST and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n" + "[Column at index 14 (column name : VAR15) of Change at index 0 (on table : TEST and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n" + "Expecting that end point:%n" + " %n" + "to be equal to: %n" diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_Two_Boolean_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_Two_Boolean_Test.java index 28672842..5842676e 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_Two_Boolean_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_Two_Boolean_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeAssert; import org.assertj.db.api.ChangeColumnAssert; @@ -20,15 +23,11 @@ import org.assertj.db.type.Changes; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnColumnOfChangeEquality} class : * {@link org.assertj.db.api.assertions.AssertOnColumnOfChangeEquality#hasValues(Boolean, Boolean)} method. * * @author Régis Pouiller - * */ public class AssertOnColumnOfChangeEquality_HasValues_Two_Boolean_Test extends AbstractTest { @@ -63,10 +62,10 @@ public void should_fail_because_value_at_start_point_is_different() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 1 (column name : VAR2) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting that start point:%n" - + " %n" - + "to be equal to: %n" - + " ")); + + "Expecting that start point:%n" + + " %n" + + "to be equal to: %n" + + " ")); } } @@ -85,10 +84,10 @@ public void should_fail_because_value_at_end_point_is_different() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 1 (column name : VAR2) of Change at index 0 (on table : TEST and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting that end point:%n" - + " %n" - + "to be equal to: %n" - + " ")); + + "Expecting that end point:%n" + + " %n" + + "to be equal to: %n" + + " ")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_Two_Bytes_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_Two_Bytes_Test.java index cfd6f153..6c94a8fa 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_Two_Bytes_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_Two_Bytes_Test.java @@ -8,10 +8,14 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.assertj.db.api.Assertions.bytesContentFromClassPathOf; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeAssert; import org.assertj.db.api.ChangeColumnAssert; @@ -20,16 +24,11 @@ import org.assertj.db.type.Changes; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.assertj.db.api.Assertions.bytesContentFromClassPathOf; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnColumnOfChangeEquality} class : * {@link org.assertj.db.api.assertions.AssertOnColumnOfChangeEquality#hasValues(byte[], byte[])} method. * * @author Régis Pouiller - * */ public class AssertOnColumnOfChangeEquality_HasValues_Two_Bytes_Test extends AbstractTest { @@ -68,7 +67,7 @@ public void should_fail_because_value_at_start_point_is_different() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 10 (column name : VAR11) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting that start point to be equal to the expected value but was not equal")); + + "Expecting that start point to be equal to the expected value but was not equal")); } } @@ -89,7 +88,7 @@ public void should_fail_because_value_at_end_point_is_different() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 10 (column name : VAR11) of Change at index 0 (on table : TEST and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting that end point to be equal to the expected value but was not equal")); + + "Expecting that end point to be equal to the expected value but was not equal")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_Two_Character_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_Two_Character_Test.java index 630f21f4..85e1623e 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_Two_Character_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_Two_Character_Test.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; @@ -28,7 +28,6 @@ * {@link org.assertj.db.api.assertions.AssertOnColumnOfChangeEquality#hasValues(Character, Character)} method. * * @author Régis Pouiller - * */ public class AssertOnColumnOfChangeEquality_HasValues_Two_Character_Test extends AbstractTest { @@ -63,10 +62,10 @@ public void should_fail_because_value_at_start_point_is_different() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 15 (column name : VAR16) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting that start point:%n" - + " %n" - + "to be equal to: %n" - + " <'T'>")); + + "Expecting that start point:%n" + + " %n" + + "to be equal to: %n" + + " <'T'>")); } } @@ -85,10 +84,10 @@ public void should_fail_because_value_at_end_point_is_different() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 15 (column name : VAR16) of Change at index 0 (on table : TEST and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting that end point:%n" - + " %n" - + "to be equal to: %n" - + " <'T'>")); + + "Expecting that end point:%n" + + " %n" + + "to be equal to: %n" + + " <'T'>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_Two_DateTimeValue_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_Two_DateTimeValue_Test.java index edea40d6..224914e0 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_Two_DateTimeValue_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_Two_DateTimeValue_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeAssert; import org.assertj.db.api.ChangeColumnAssert; @@ -23,15 +26,11 @@ import org.assertj.db.type.TimeValue; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnColumnOfChangeEquality} class : * {@link org.assertj.db.api.assertions.AssertOnColumnOfChangeEquality#hasValues(org.assertj.db.type.DateTimeValue, org.assertj.db.type.DateTimeValue)} method. * * @author Régis Pouiller - * */ public class AssertOnColumnOfChangeEquality_HasValues_Two_DateTimeValue_Test extends AbstractTest { @@ -48,8 +47,8 @@ public void test_has_values() { ChangeAssert changeAssert = assertThat(changes).change(); ChangeColumnAssert changeColumnAssert = changeAssert.column("var10"); ChangeColumnAssert changeColumnAssert2 = changeColumnAssert.hasValues(DateTimeValue.of( - DateValue.of(2014, 5, 24), TimeValue.of(9, 46, 30)), DateTimeValue.of( - DateValue.of(2014, 5, 24), TimeValue.of(9, 46, 30))); + DateValue.of(2014, 5, 24), TimeValue.of(9, 46, 30)), DateTimeValue.of( + DateValue.of(2014, 5, 24), TimeValue.of(9, 46, 30))); Assertions.assertThat(changeColumnAssert).isSameAs(changeColumnAssert2); } @@ -65,15 +64,15 @@ public void should_fail_because_value_at_start_point_is_different() { try { assertThat(changes).change().column("var10").hasValues(DateTimeValue.of( - DateValue.of(2014, 5, 24), TimeValue.of(9, 46, 30)), DateTimeValue.of( - DateValue.of(2014, 5, 24), TimeValue.of(9, 46, 30))); + DateValue.of(2014, 5, 24), TimeValue.of(9, 46, 30)), DateTimeValue.of( + DateValue.of(2014, 5, 24), TimeValue.of(9, 46, 30))); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 9 (column name : VAR10) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting that start point:%n" - + " %n" - + "to be equal to: %n" - + " <2014-05-24T09:46:30.000000000>")); + + "Expecting that start point:%n" + + " %n" + + "to be equal to: %n" + + " <2014-05-24T09:46:30.000000000>")); } } @@ -89,15 +88,15 @@ public void should_fail_because_value_at_end_point_is_different() { try { assertThat(changes).change().column("var10").hasValues(DateTimeValue.of( - DateValue.of(2014, 5, 24), TimeValue.of(9, 46, 30)), DateTimeValue.of( - DateValue.of(2014, 5, 24), TimeValue.of(9, 46, 30))); + DateValue.of(2014, 5, 24), TimeValue.of(9, 46, 30)), DateTimeValue.of( + DateValue.of(2014, 5, 24), TimeValue.of(9, 46, 30))); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 9 (column name : VAR10) of Change at index 0 (on table : TEST and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting that end point:%n" - + " %n" - + "to be equal to: %n" - + " <2014-05-24T09:46:30.000000000>")); + + "Expecting that end point:%n" + + " %n" + + "to be equal to: %n" + + " <2014-05-24T09:46:30.000000000>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_Two_DateValue_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_Two_DateValue_Test.java index 44e070b1..985a407b 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_Two_DateValue_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_Two_DateValue_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeAssert; import org.assertj.db.api.ChangeColumnAssert; @@ -21,15 +24,11 @@ import org.assertj.db.type.DateValue; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnColumnOfChangeEquality} class : * {@link org.assertj.db.api.assertions.AssertOnColumnOfChangeEquality#hasValues(org.assertj.db.type.DateValue, org.assertj.db.type.DateValue)} method. * * @author Régis Pouiller - * */ public class AssertOnColumnOfChangeEquality_HasValues_Two_DateValue_Test extends AbstractTest { @@ -46,7 +45,7 @@ public void test_has_values() { ChangeAssert changeAssert = assertThat(changes).change(); ChangeColumnAssert changeColumnAssert = changeAssert.column("var9"); ChangeColumnAssert changeColumnAssert2 = changeColumnAssert.hasValues(DateValue.of(2014, 5, 24), - DateValue.of(2014, 5, 24)); + DateValue.of(2014, 5, 24)); Assertions.assertThat(changeColumnAssert).isSameAs(changeColumnAssert2); } @@ -65,10 +64,10 @@ public void should_fail_because_value_at_start_point_is_different() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 8 (column name : VAR9) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting that start point:%n" - + " %n" - + "to be equal to: %n" - + " <2014-05-24>")); + + "Expecting that start point:%n" + + " %n" + + "to be equal to: %n" + + " <2014-05-24>")); } } @@ -87,10 +86,10 @@ public void should_fail_because_value_at_end_point_is_different() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 8 (column name : VAR9) of Change at index 0 (on table : TEST and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting that end point:%n" - + " %n" - + "to be equal to: %n" - + " <2014-05-24>")); + + "Expecting that end point:%n" + + " %n" + + "to be equal to: %n" + + " <2014-05-24>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_Two_Number_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_Two_Number_Test.java index 387704b4..599e8c80 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_Two_Number_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_Two_Number_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeAssert; import org.assertj.db.api.ChangeColumnAssert; @@ -20,15 +23,11 @@ import org.assertj.db.type.Changes; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnColumnOfChangeEquality} class : * {@link org.assertj.db.api.assertions.AssertOnColumnOfChangeEquality#hasValues(Number, Number)} method. * * @author Régis Pouiller - * */ public class AssertOnColumnOfChangeEquality_HasValues_Two_Number_Test extends AbstractTest { @@ -63,10 +62,10 @@ public void should_fail_because_value_at_start_point_is_different() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 2 (column name : VAR3) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting that start point:%n" - + " %n" - + "to be equal to: %n" - + " <3>")); + + "Expecting that start point:%n" + + " %n" + + "to be equal to: %n" + + " <3>")); } } @@ -85,10 +84,10 @@ public void should_fail_because_value_at_end_point_is_different() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 2 (column name : VAR3) of Change at index 0 (on table : TEST and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting that end point:%n" - + " %n" - + "to be equal to: %n" - + " <2>")); + + "Expecting that end point:%n" + + " %n" + + "to be equal to: %n" + + " <2>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_Two_String_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_Two_String_Test.java index b1b262a6..1718cc24 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_Two_String_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_Two_String_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeAssert; import org.assertj.db.api.ChangeColumnAssert; @@ -20,15 +23,11 @@ import org.assertj.db.type.Changes; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnColumnOfChangeEquality} class : * {@link org.assertj.db.api.assertions.AssertOnColumnOfChangeEquality#hasValues(String, String)} method. * * @author Régis Pouiller - * */ public class AssertOnColumnOfChangeEquality_HasValues_Two_String_Test extends AbstractTest { @@ -66,20 +65,20 @@ public void should_fail_because_value_at_start_point_is_different() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 11 (column name : VAR12) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting that start point:%n" - + " %n" - + "to be equal to: %n" - + " <\"test\">")); + + "Expecting that start point:%n" + + " %n" + + "to be equal to: %n" + + " <\"test\">")); } try { assertThat(changes).change().column("var15").hasValues("88838129-291E-40A9-A94C-A15BE36CF7C3", "88838129-291E-40A9-A94C-A15BE36CF7C3"); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 14 (column name : VAR15) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting that start point:%n" - + " %n" - + "to be equal to: %n" - + " <\"88838129-291E-40A9-A94C-A15BE36CF7C3\">")); + + "Expecting that start point:%n" + + " %n" + + "to be equal to: %n" + + " <\"88838129-291E-40A9-A94C-A15BE36CF7C3\">")); } } @@ -98,20 +97,20 @@ public void should_fail_because_value_at_end_point_is_different() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 11 (column name : VAR12) of Change at index 0 (on table : TEST and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting that end point:%n" - + " %n" - + "to be equal to: %n" - + " <\"text\">")); + + "Expecting that end point:%n" + + " %n" + + "to be equal to: %n" + + " <\"text\">")); } try { assertThat(changes).change().column("var15").hasValues("30B443AE-C0C9-4790-9BEC-CE1380808435", "30B443AE-C0C9-4790-9BEC-CE1380808435"); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 14 (column name : VAR15) of Change at index 0 (on table : TEST and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting that end point:%n" - + " %n" - + "to be equal to: %n" - + " <\"30B443AE-C0C9-4790-9BEC-CE1380808435\">")); + + "Expecting that end point:%n" + + " %n" + + "to be equal to: %n" + + " <\"30B443AE-C0C9-4790-9BEC-CE1380808435\">")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_Two_TimeValue_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_Two_TimeValue_Test.java index ab50e87f..aa8f046b 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_Two_TimeValue_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_Two_TimeValue_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeAssert; import org.assertj.db.api.ChangeColumnAssert; @@ -21,15 +24,11 @@ import org.assertj.db.type.TimeValue; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnColumnOfChangeEquality} class : * {@link org.assertj.db.api.assertions.AssertOnColumnOfChangeEquality#hasValues(org.assertj.db.type.TimeValue, org.assertj.db.type.TimeValue)} method. * * @author Régis Pouiller - * */ public class AssertOnColumnOfChangeEquality_HasValues_Two_TimeValue_Test extends AbstractTest { @@ -46,7 +45,7 @@ public void test_has_values() { ChangeAssert changeAssert = assertThat(changes).change(); ChangeColumnAssert changeColumnAssert = changeAssert.column("var8"); ChangeColumnAssert changeColumnAssert2 = changeColumnAssert.hasValues(TimeValue.of(9, 46, 30), - TimeValue.of(9, 46, 30)); + TimeValue.of(9, 46, 30)); Assertions.assertThat(changeColumnAssert).isSameAs(changeColumnAssert2); } @@ -65,10 +64,10 @@ public void should_fail_because_value_at_start_point_is_different() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 7 (column name : VAR8) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting that start point:%n" - + " %n" - + "to be equal to: %n" - + " <09:46:30.000000000>")); + + "Expecting that start point:%n" + + " %n" + + "to be equal to: %n" + + " <09:46:30.000000000>")); } } @@ -87,10 +86,10 @@ public void should_fail_because_value_at_end_point_is_different() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 7 (column name : VAR8) of Change at index 0 (on table : TEST and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting that end point:%n" - + " %n" - + "to be equal to: %n" - + " <09:46:30.000000000>")); + + "Expecting that end point:%n" + + " %n" + + "to be equal to: %n" + + " <09:46:30.000000000>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_Two_UUID_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_Two_UUID_Test.java index 28cee24e..50ff516e 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_Two_UUID_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnOfChangeEquality_HasValues_Two_UUID_Test.java @@ -8,10 +8,15 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + +import java.util.UUID; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeAssert; import org.assertj.db.api.ChangeColumnAssert; @@ -20,11 +25,6 @@ import org.assertj.db.type.Changes; import org.junit.Test; -import java.util.UUID; - -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnColumnOfChangeEquality} class : * {@link org.assertj.db.api.assertions.AssertOnColumnOfChangeEquality#hasValues(java.util.UUID, java.util.UUID)} method. @@ -46,8 +46,8 @@ public void test_has_values() { ChangeAssert changeAssert = assertThat(changes).change(); ChangeColumnAssert changeColumnAssert = changeAssert.column("var15"); ChangeColumnAssert changeColumnAssert2 = changeColumnAssert - .hasValues(UUID.fromString("30b443ae-c0c9-4790-9bec-ce1380808435"), - UUID.fromString("0e2a1269-eff0-4233-b87b-b53e8b6f164d")); + .hasValues(UUID.fromString("30b443ae-c0c9-4790-9bec-ce1380808435"), + UUID.fromString("0e2a1269-eff0-4233-b87b-b53e8b6f164d")); Assertions.assertThat(changeColumnAssert).isSameAs(changeColumnAssert2); } @@ -63,11 +63,11 @@ public void should_fail_because_value_at_start_point_is_different() { try { assertThat(changes).change().column("var15").hasValues(UUID.fromString("0e2a1269-eff0-4233-b87b-b53e8b6f164d"), - UUID.fromString("0e2a1269-eff0-4233-b87b-b53e8b6f164d")); + UUID.fromString("0e2a1269-eff0-4233-b87b-b53e8b6f164d")); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format( - "[Column at index 14 (column name : VAR15) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n" + "[Column at index 14 (column name : VAR15) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n" + "Expecting that start point:%n" + " %n" + "to be equal to: %n" @@ -87,11 +87,11 @@ public void should_fail_because_value_at_end_point_is_different() { try { assertThat(changes).change().column("var15").hasValues(UUID.fromString("30b443ae-c0c9-4790-9bec-ce1380808435"), - UUID.fromString("30b443ae-c0c9-4790-9bec-ce1380808435")); + UUID.fromString("30b443ae-c0c9-4790-9bec-ce1380808435")); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format( - "[Column at index 14 (column name : VAR15) of Change at index 0 (on table : TEST and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n" + "[Column at index 14 (column name : VAR15) of Change at index 0 (on table : TEST and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n" + "Expecting that end point:%n" + " %n" + "to be equal to: %n" diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnType_IsBoolean_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnType_IsBoolean_Test.java index ccf5ed30..39d2555e 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnType_IsBoolean_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnType_IsBoolean_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeColumnAssert; import org.assertj.db.api.TableColumnAssert; @@ -21,15 +24,11 @@ import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnColumnType} class : * {@link org.assertj.db.api.assertions.AssertOnColumnType#isBoolean(boolean)} method. * * @author Régis Pouiller - * */ public class AssertOnColumnType_IsBoolean_Test extends AbstractTest { @@ -78,48 +77,48 @@ public void should_fail_because_value_have_different_type() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 1 (column name : VAR2) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting that the value at start point:%n" - + " %n" - + "to be of type%n" - + " %n" - + "but was of type%n" - + " ")); + + "Expecting that the value at start point:%n" + + " %n" + + "to be of type%n" + + " %n" + + "but was of type%n" + + " ")); } try { assertThat(changes).change(1).column("var1").isBoolean(true); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 0 (column name : VAR1) of Change at index 1 (on table : TEST and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting that the value at start point:%n" - + " <1>%n" - + "to be of type%n" - + " <[BOOLEAN, NOT_IDENTIFIED]>%n" - + "but was of type%n" - + " ")); + + "Expecting that the value at start point:%n" + + " <1>%n" + + "to be of type%n" + + " <[BOOLEAN, NOT_IDENTIFIED]>%n" + + "but was of type%n" + + " ")); } try { assertThat(table).column("var1").isBoolean(true); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 0 (column name : VAR1) of TEST table] %n" - + "Expecting that the value at index 0:%n" - + " <1>%n" - + "to be of type%n" - + " <[BOOLEAN, NOT_IDENTIFIED]>%n" - + "but was of type%n" - + " ")); + + "Expecting that the value at index 0:%n" + + " <1>%n" + + "to be of type%n" + + " <[BOOLEAN, NOT_IDENTIFIED]>%n" + + "but was of type%n" + + " ")); } try { assertThat(table2).column("var2").isBoolean(false); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 1 (column name : VAR2) of TEST2 table] %n" - + "Expecting that the value at index 1:%n" - + " %n" - + "to be of type%n" - + " %n" - + "but was of type%n" - + " ")); + + "Expecting that the value at index 1:%n" + + " %n" + + "to be of type%n" + + " %n" + + "but was of type%n" + + " ")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnType_IsBytes_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnType_IsBytes_Test.java index db8e2892..28386c6f 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnType_IsBytes_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnType_IsBytes_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeColumnAssert; import org.assertj.db.api.TableColumnAssert; @@ -21,15 +24,11 @@ import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnColumnType} class : * {@link org.assertj.db.api.assertions.AssertOnColumnType#isBytes(boolean)} method. * * @author Régis Pouiller - * */ public class AssertOnColumnType_IsBytes_Test extends AbstractTest { @@ -78,48 +77,48 @@ public void should_fail_because_value_have_different_type() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 10 (column name : VAR11) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting that the value at start point:%n" - + " %n" - + "to be of type%n" - + " %n" - + "but was of type%n" - + " ")); + + "Expecting that the value at start point:%n" + + " %n" + + "to be of type%n" + + " %n" + + "but was of type%n" + + " ")); } try { assertThat(changes).change(1).column("var1").isBytes(true); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 0 (column name : VAR1) of Change at index 1 (on table : TEST and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting that the value at start point:%n" - + " <1>%n" - + "to be of type%n" - + " <[BYTES, NOT_IDENTIFIED]>%n" - + "but was of type%n" - + " ")); + + "Expecting that the value at start point:%n" + + " <1>%n" + + "to be of type%n" + + " <[BYTES, NOT_IDENTIFIED]>%n" + + "but was of type%n" + + " ")); } try { assertThat(table).column("var1").isBytes(true); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 0 (column name : VAR1) of TEST table] %n" - + "Expecting that the value at index 0:%n" - + " <1>%n" - + "to be of type%n" - + " <[BYTES, NOT_IDENTIFIED]>%n" - + "but was of type%n" - + " ")); + + "Expecting that the value at index 0:%n" + + " <1>%n" + + "to be of type%n" + + " <[BYTES, NOT_IDENTIFIED]>%n" + + "but was of type%n" + + " ")); } try { assertThat(table2).column("var11").isBytes(false); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 10 (column name : VAR11) of TEST2 table] %n" - + "Expecting that the value at index 1:%n" - + " %n" - + "to be of type%n" - + " %n" - + "but was of type%n" - + " ")); + + "Expecting that the value at index 1:%n" + + " %n" + + "to be of type%n" + + " %n" + + "but was of type%n" + + " ")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnType_IsDateTime_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnType_IsDateTime_Test.java index 9bcd4e11..e3e5d0ac 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnType_IsDateTime_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnType_IsDateTime_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeColumnAssert; import org.assertj.db.api.TableColumnAssert; @@ -21,15 +24,11 @@ import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnColumnType} class : * {@link org.assertj.db.api.assertions.AssertOnColumnType#isDateTime(boolean)} method. * * @author Régis Pouiller - * */ public class AssertOnColumnType_IsDateTime_Test extends AbstractTest { @@ -78,48 +77,48 @@ public void should_fail_because_value_have_different_type() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 9 (column name : VAR10) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting that the value at start point:%n" - + " %n" - + "to be of type%n" - + " %n" - + "but was of type%n" - + " ")); + + "Expecting that the value at start point:%n" + + " %n" + + "to be of type%n" + + " %n" + + "but was of type%n" + + " ")); } try { assertThat(changes).change(1).column("var1").isDateTime(true); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 0 (column name : VAR1) of Change at index 1 (on table : TEST and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting that the value at start point:%n" - + " <1>%n" - + "to be of type%n" - + " <[DATE_TIME, NOT_IDENTIFIED]>%n" - + "but was of type%n" - + " ")); + + "Expecting that the value at start point:%n" + + " <1>%n" + + "to be of type%n" + + " <[DATE_TIME, NOT_IDENTIFIED]>%n" + + "but was of type%n" + + " ")); } try { assertThat(table).column("var1").isDateTime(true); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 0 (column name : VAR1) of TEST table] %n" - + "Expecting that the value at index 0:%n" - + " <1>%n" - + "to be of type%n" - + " <[DATE_TIME, NOT_IDENTIFIED]>%n" - + "but was of type%n" - + " ")); + + "Expecting that the value at index 0:%n" + + " <1>%n" + + "to be of type%n" + + " <[DATE_TIME, NOT_IDENTIFIED]>%n" + + "but was of type%n" + + " ")); } try { assertThat(table2).column("var10").isDateTime(false); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 9 (column name : VAR10) of TEST2 table] %n" - + "Expecting that the value at index 1:%n" - + " %n" - + "to be of type%n" - + " %n" - + "but was of type%n" - + " ")); + + "Expecting that the value at index 1:%n" + + " %n" + + "to be of type%n" + + " %n" + + "but was of type%n" + + " ")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnType_IsDate_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnType_IsDate_Test.java index 6b802b8f..cbcf2687 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnType_IsDate_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnType_IsDate_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeColumnAssert; import org.assertj.db.api.TableColumnAssert; @@ -21,15 +24,11 @@ import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnColumnType} class : * {@link org.assertj.db.api.assertions.AssertOnColumnType#isDate(boolean)} method. * * @author Régis Pouiller - * */ public class AssertOnColumnType_IsDate_Test extends AbstractTest { @@ -78,48 +77,48 @@ public void should_fail_because_value_have_different_type() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 8 (column name : VAR9) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting that the value at start point:%n" - + " %n" - + "to be of type%n" - + " %n" - + "but was of type%n" - + " ")); + + "Expecting that the value at start point:%n" + + " %n" + + "to be of type%n" + + " %n" + + "but was of type%n" + + " ")); } try { assertThat(changes).change(1).column("var1").isDate(true); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 0 (column name : VAR1) of Change at index 1 (on table : TEST and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting that the value at start point:%n" - + " <1>%n" - + "to be of type%n" - + " <[DATE, NOT_IDENTIFIED]>%n" - + "but was of type%n" - + " ")); + + "Expecting that the value at start point:%n" + + " <1>%n" + + "to be of type%n" + + " <[DATE, NOT_IDENTIFIED]>%n" + + "but was of type%n" + + " ")); } try { assertThat(table).column("var1").isDate(true); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 0 (column name : VAR1) of TEST table] %n" - + "Expecting that the value at index 0:%n" - + " <1>%n" - + "to be of type%n" - + " <[DATE, NOT_IDENTIFIED]>%n" - + "but was of type%n" - + " ")); + + "Expecting that the value at index 0:%n" + + " <1>%n" + + "to be of type%n" + + " <[DATE, NOT_IDENTIFIED]>%n" + + "but was of type%n" + + " ")); } try { assertThat(table2).column("var9").isDate(false); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 8 (column name : VAR9) of TEST2 table] %n" - + "Expecting that the value at index 1:%n" - + " %n" - + "to be of type%n" - + " %n" - + "but was of type%n" - + " ")); + + "Expecting that the value at index 1:%n" + + " %n" + + "to be of type%n" + + " %n" + + "but was of type%n" + + " ")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnType_IsNumber_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnType_IsNumber_Test.java index 1be7a807..477754fd 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnType_IsNumber_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnType_IsNumber_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeColumnAssert; import org.assertj.db.api.TableColumnAssert; @@ -21,15 +24,11 @@ import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnColumnType} class : * {@link org.assertj.db.api.assertions.AssertOnColumnType#isNumber(boolean)} method. * * @author Régis Pouiller - * */ public class AssertOnColumnType_IsNumber_Test extends AbstractTest { @@ -78,48 +77,48 @@ public void should_fail_because_value_have_different_type() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 2 (column name : VAR3) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting that the value at start point:%n" - + " %n" - + "to be of type%n" - + " %n" - + "but was of type%n" - + " ")); + + "Expecting that the value at start point:%n" + + " %n" + + "to be of type%n" + + " %n" + + "but was of type%n" + + " ")); } try { assertThat(changes).change(1).column("var2").isNumber(true); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 1 (column name : VAR2) of Change at index 1 (on table : TEST and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting that the value at start point:%n" - + " %n" - + "to be of type%n" - + " <[NUMBER, NOT_IDENTIFIED]>%n" - + "but was of type%n" - + " ")); + + "Expecting that the value at start point:%n" + + " %n" + + "to be of type%n" + + " <[NUMBER, NOT_IDENTIFIED]>%n" + + "but was of type%n" + + " ")); } try { assertThat(table).column("var2").isNumber(true); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 1 (column name : VAR2) of TEST table] %n" - + "Expecting that the value at index 0:%n" - + " %n" - + "to be of type%n" - + " <[NUMBER, NOT_IDENTIFIED]>%n" - + "but was of type%n" - + " ")); + + "Expecting that the value at index 0:%n" + + " %n" + + "to be of type%n" + + " <[NUMBER, NOT_IDENTIFIED]>%n" + + "but was of type%n" + + " ")); } try { assertThat(table2).column("var3").isNumber(false); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 2 (column name : VAR3) of TEST2 table] %n" - + "Expecting that the value at index 1:%n" - + " %n" - + "to be of type%n" - + " %n" - + "but was of type%n" - + " ")); + + "Expecting that the value at index 1:%n" + + " %n" + + "to be of type%n" + + " %n" + + "but was of type%n" + + " ")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnType_IsOfAnyTypeIn_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnType_IsOfAnyTypeIn_Test.java index 4345b374..ea1e7432 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnType_IsOfAnyTypeIn_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnType_IsOfAnyTypeIn_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeColumnAssert; import org.assertj.db.api.TableColumnAssert; @@ -22,15 +25,11 @@ import org.assertj.db.type.ValueType; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnColumnType} class : * {@link org.assertj.db.api.assertions.AssertOnColumnType#isOfAnyTypeIn(org.assertj.db.type.ValueType...)} method. * * @author Régis Pouiller - * */ public class AssertOnColumnType_IsOfAnyTypeIn_Test extends AbstractTest { @@ -49,7 +48,7 @@ public void test_is_of_any_of_types() { ChangeColumnAssert changeColumnAssert1 = assertThat(changes).change().column("var2"); ChangeColumnAssert changeColumnAssertReturn1 = changeColumnAssert1.isOfAnyTypeIn(ValueType.BOOLEAN, - ValueType.NOT_IDENTIFIED); + ValueType.NOT_IDENTIFIED); Assertions.assertThat(changeColumnAssert1).isSameAs(changeColumnAssertReturn1); ChangeColumnAssert changeColumnAssert2 = assertThat(changes).change(1).column("var2"); ChangeColumnAssert changeColumnAssertReturn2 = changeColumnAssert2.isOfAnyTypeIn(ValueType.BOOLEAN, ValueType.TEXT); @@ -59,7 +58,7 @@ public void test_is_of_any_of_types() { Assertions.assertThat(tableColumnAssert1).isSameAs(tableColumnAssertReturn1); TableColumnAssert tableColumnAssert2 = assertThat(table2).column("var2"); TableColumnAssert tableColumnAssertReturn2 = tableColumnAssert2.isOfAnyTypeIn(ValueType.BOOLEAN, - ValueType.NOT_IDENTIFIED); + ValueType.NOT_IDENTIFIED); Assertions.assertThat(tableColumnAssert2).isSameAs(tableColumnAssertReturn2); } @@ -81,49 +80,49 @@ public void should_fail_because_value_have_different_type() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 1 (column name : VAR2) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting that the value at start point:%n" - + " %n" - + "to be of type%n" - + " <[BOOLEAN, TEXT]>%n" - + "but was of type%n" - + " ")); + + "Expecting that the value at start point:%n" + + " %n" + + "to be of type%n" + + " <[BOOLEAN, TEXT]>%n" + + "but was of type%n" + + " ")); } try { assertThat(changes).change(1).column("var1").isOfAnyTypeIn(ValueType.BOOLEAN, ValueType.TEXT, - ValueType.NOT_IDENTIFIED); + ValueType.NOT_IDENTIFIED); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 0 (column name : VAR1) of Change at index 1 (on table : TEST and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting that the value at start point:%n" - + " <1>%n" - + "to be of type%n" - + " <[BOOLEAN, TEXT, NOT_IDENTIFIED]>%n" - + "but was of type%n" - + " ")); + + "Expecting that the value at start point:%n" + + " <1>%n" + + "to be of type%n" + + " <[BOOLEAN, TEXT, NOT_IDENTIFIED]>%n" + + "but was of type%n" + + " ")); } try { assertThat(table).column("var1").isOfAnyTypeIn(ValueType.BOOLEAN, ValueType.TEXT, ValueType.NOT_IDENTIFIED); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 0 (column name : VAR1) of TEST table] %n" - + "Expecting that the value at index 0:%n" - + " <1>%n" - + "to be of type%n" - + " <[BOOLEAN, TEXT, NOT_IDENTIFIED]>%n" - + "but was of type%n" - + " ")); + + "Expecting that the value at index 0:%n" + + " <1>%n" + + "to be of type%n" + + " <[BOOLEAN, TEXT, NOT_IDENTIFIED]>%n" + + "but was of type%n" + + " ")); } try { assertThat(table2).column("var2").isOfAnyTypeIn(ValueType.BOOLEAN, ValueType.TEXT); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 1 (column name : VAR2) of TEST2 table] %n" - + "Expecting that the value at index 1:%n" - + " %n" - + "to be of type%n" - + " <[BOOLEAN, TEXT]>%n" - + "but was of type%n" - + " ")); + + "Expecting that the value at index 1:%n" + + " %n" + + "to be of type%n" + + " <[BOOLEAN, TEXT]>%n" + + "but was of type%n" + + " ")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnType_IsOfType_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnType_IsOfType_Test.java index a8662160..df82c6f9 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnType_IsOfType_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnType_IsOfType_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeColumnAssert; import org.assertj.db.api.TableColumnAssert; @@ -22,15 +25,11 @@ import org.assertj.db.type.ValueType; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnColumnType} class : * {@link org.assertj.db.api.assertions.AssertOnColumnType#isOfType(org.assertj.db.type.ValueType, boolean)} method. * * @author Régis Pouiller - * */ public class AssertOnColumnType_IsOfType_Test extends AbstractTest { @@ -79,48 +78,48 @@ public void should_fail_because_value_have_different_type() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 1 (column name : VAR2) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting that the value at start point:%n" - + " %n" - + "to be of type%n" - + " %n" - + "but was of type%n" - + " ")); + + "Expecting that the value at start point:%n" + + " %n" + + "to be of type%n" + + " %n" + + "but was of type%n" + + " ")); } try { assertThat(changes).change(1).column("var1").isOfType(ValueType.BOOLEAN, true); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 0 (column name : VAR1) of Change at index 1 (on table : TEST and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting that the value at start point:%n" - + " <1>%n" - + "to be of type%n" - + " <[BOOLEAN, NOT_IDENTIFIED]>%n" - + "but was of type%n" - + " ")); + + "Expecting that the value at start point:%n" + + " <1>%n" + + "to be of type%n" + + " <[BOOLEAN, NOT_IDENTIFIED]>%n" + + "but was of type%n" + + " ")); } try { assertThat(table).column("var1").isOfType(ValueType.BOOLEAN, true); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 0 (column name : VAR1) of TEST table] %n" - + "Expecting that the value at index 0:%n" - + " <1>%n" - + "to be of type%n" - + " <[BOOLEAN, NOT_IDENTIFIED]>%n" - + "but was of type%n" - + " ")); + + "Expecting that the value at index 0:%n" + + " <1>%n" + + "to be of type%n" + + " <[BOOLEAN, NOT_IDENTIFIED]>%n" + + "but was of type%n" + + " ")); } try { assertThat(table2).column("var2").isOfType(ValueType.BOOLEAN, false); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 1 (column name : VAR2) of TEST2 table] %n" - + "Expecting that the value at index 1:%n" - + " %n" - + "to be of type%n" - + " %n" - + "but was of type%n" - + " ")); + + "Expecting that the value at index 1:%n" + + " %n" + + "to be of type%n" + + " %n" + + "but was of type%n" + + " ")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnType_IsText_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnType_IsText_Test.java index c04ef372..78456154 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnType_IsText_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnType_IsText_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeColumnAssert; import org.assertj.db.api.TableColumnAssert; @@ -21,15 +24,11 @@ import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnColumnType} class : * {@link org.assertj.db.api.assertions.AssertOnColumnType#isText(boolean)} method. * * @author Régis Pouiller - * */ public class AssertOnColumnType_IsText_Test extends AbstractTest { @@ -78,48 +77,48 @@ public void should_fail_because_value_have_different_type() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 11 (column name : VAR12) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting that the value at start point:%n" - + " %n" - + "to be of type%n" - + " %n" - + "but was of type%n" - + " ")); + + "Expecting that the value at start point:%n" + + " %n" + + "to be of type%n" + + " %n" + + "but was of type%n" + + " ")); } try { assertThat(changes).change(1).column("var1").isText(true); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 0 (column name : VAR1) of Change at index 1 (on table : TEST and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting that the value at start point:%n" - + " <1>%n" - + "to be of type%n" - + " <[TEXT, NOT_IDENTIFIED]>%n" - + "but was of type%n" - + " ")); + + "Expecting that the value at start point:%n" + + " <1>%n" + + "to be of type%n" + + " <[TEXT, NOT_IDENTIFIED]>%n" + + "but was of type%n" + + " ")); } try { assertThat(table).column("var1").isText(true); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 0 (column name : VAR1) of TEST table] %n" - + "Expecting that the value at index 0:%n" - + " <1>%n" - + "to be of type%n" - + " <[TEXT, NOT_IDENTIFIED]>%n" - + "but was of type%n" - + " ")); + + "Expecting that the value at index 0:%n" + + " <1>%n" + + "to be of type%n" + + " <[TEXT, NOT_IDENTIFIED]>%n" + + "but was of type%n" + + " ")); } try { assertThat(table2).column("var12").isText(false); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 11 (column name : VAR12) of TEST2 table] %n" - + "Expecting that the value at index 1:%n" - + " %n" - + "to be of type%n" - + " %n" - + "but was of type%n" - + " ")); + + "Expecting that the value at index 1:%n" + + " %n" + + "to be of type%n" + + " %n" + + "but was of type%n" + + " ")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnType_IsTime_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnType_IsTime_Test.java index 3f2800ce..ae9d13d5 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnColumnType_IsTime_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnColumnType_IsTime_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeColumnAssert; import org.assertj.db.api.TableColumnAssert; @@ -21,15 +24,11 @@ import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnColumnType} class : * {@link org.assertj.db.api.assertions.AssertOnColumnType#isTime(boolean)} method. * * @author Régis Pouiller - * */ public class AssertOnColumnType_IsTime_Test extends AbstractTest { @@ -78,48 +77,48 @@ public void should_fail_because_value_have_different_type() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 7 (column name : VAR8) of Change at index 0 (on table : TEST and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting that the value at start point:%n" - + " %n" - + "to be of type%n" - + "
    %n" - + "but was on data type%n" - + " ")); + + "Expecting:%n" + + "to be on data type%n" + + "
    %n" + + "but was on data type%n" + + " ")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnDataType_IsOnRequest_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnDataType_IsOnRequest_Test.java index 71224edd..ae68b6e2 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnDataType_IsOnRequest_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnDataType_IsOnRequest_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeAssert; import org.assertj.db.common.AbstractTest; @@ -21,15 +24,11 @@ import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnDataType} class : * {@link org.assertj.db.api.assertions.AssertOnDataType#isOnRequest()} method. * * @author Régis Pouiller - * */ public class AssertOnDataType_IsOnRequest_Test extends AbstractTest { @@ -65,11 +64,11 @@ public void should_fail_because_data_type_is_different() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Change at index 0 (with primary key : [4]) of Changes on ACTOR table of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting:%n" - + "to be on data type%n" - + " %n" - + "but was on data type%n" - + "
    ")); + + "Expecting:%n" + + "to be on data type%n" + + " %n" + + "but was on data type%n" + + "
    ")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnDataType_IsOnTable_Name_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnDataType_IsOnTable_Name_Test.java index 23a93cc3..5cb2a755 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnDataType_IsOnTable_Name_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnDataType_IsOnTable_Name_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeAssert; import org.assertj.db.common.AbstractTest; @@ -21,15 +24,11 @@ import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnDataType} class : * {@link org.assertj.db.api.assertions.AssertOnDataType#isOnTable(String)} method. * * @author Régis Pouiller - * */ public class AssertOnDataType_IsOnTable_Name_Test extends AbstractTest { @@ -65,11 +64,11 @@ public void should_fail_because_data_type_is_different() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Change at index 0 of Changes on 'select * from actor' request of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting:%n" - + "to be on data type%n" - + "
    %n" - + "but was on data type%n" - + " ")); + + "Expecting:%n" + + "to be on data type%n" + + "
    %n" + + "but was on data type%n" + + " ")); } } @@ -89,10 +88,10 @@ public void should_fail_because_table_name_is_different() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Change at index 0 (with primary key : [4]) of Changes on ACTOR table of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting to be on the table:%n" - + " <\"movie\">%n" - + "but was on the table:%n" - + " <\"ACTOR\">")); + + "Expecting to be on the table:%n" + + " <\"movie\">%n" + + "but was on the table:%n" + + " <\"ACTOR\">")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnDataType_IsOnTable_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnDataType_IsOnTable_Test.java index 50a60f8b..b42898c0 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnDataType_IsOnTable_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnDataType_IsOnTable_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeAssert; import org.assertj.db.common.AbstractTest; @@ -21,15 +24,11 @@ import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnDataType} class : * {@link org.assertj.db.api.assertions.AssertOnDataType#isOnTable()} method. * * @author Régis Pouiller - * */ public class AssertOnDataType_IsOnTable_Test extends AbstractTest { @@ -65,11 +64,11 @@ public void should_fail_because_data_type_is_different() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Change at index 0 of Changes on 'select * from actor' request of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting:%n" - + "to be on data type%n" - + "
    %n" - + "but was on data type%n" - + " ")); + + "Expecting:%n" + + "to be on data type%n" + + "
    %n" + + "but was on data type%n" + + " ")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnExistence_DoesNotExist_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnExistence_DoesNotExist_Test.java index efc002a0..2b8b1c98 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnExistence_DoesNotExist_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnExistence_DoesNotExist_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.TableAssert; import org.assertj.db.common.AbstractTest; @@ -19,15 +22,11 @@ import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link AssertOnExistence} class : * {@link AssertOnExistence#doesNotExist()} method. * * @author Julien Roy - * */ public class AssertOnExistence_DoesNotExist_Test extends AbstractTest { @@ -56,7 +55,7 @@ public void should_fail_because_table_exist() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[TEST table] %n" - + "Expecting not exist but exists")); + + "Expecting not exist but exists")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnExistence_Exists_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnExistence_Exists_Test.java index 54c837b2..42fa7ead 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnExistence_Exists_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnExistence_Exists_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.TableAssert; import org.assertj.db.common.AbstractTest; @@ -19,15 +22,11 @@ import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link AssertOnExistence} class : * {@link AssertOnExistence#exists()} method. * * @author Julien Roy - * */ public class AssertOnExistence_Exists_Test extends AbstractTest { @@ -56,7 +55,7 @@ public void should_fail_because_table_not_exist() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[not-exist-test table] %n" - + "Expecting exist but do not exist")); + + "Expecting exist but do not exist")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnModifiedColumn_IsModified_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnModifiedColumn_IsModified_Test.java index 8835954d..d9dd743c 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnModifiedColumn_IsModified_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnModifiedColumn_IsModified_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeColumnAssert; import org.assertj.db.common.AbstractTest; @@ -19,15 +22,11 @@ import org.assertj.db.type.Changes; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnModifiedColumn} class : * {@link org.assertj.db.api.assertions.AssertOnModifiedColumn#isModified()} method. * * @author Régis Pouiller - * */ public class AssertOnModifiedColumn_IsModified_Test extends AbstractTest { @@ -61,10 +60,10 @@ public void should_fail_because_column_is_not_modified() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 0 (column name : ID) of Change at index 3 (on table : ACTOR and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting :%n" - + " <1>%n" - + "is modified but is still:%n" - + " <1>")); + + "Expecting :%n" + + " <1>%n" + + "is modified but is still:%n" + + " <1>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnModifiedColumn_IsNotModified_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnModifiedColumn_IsNotModified_Test.java index 84c38d07..6883bb31 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnModifiedColumn_IsNotModified_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnModifiedColumn_IsNotModified_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeColumnAssert; import org.assertj.db.common.AbstractTest; @@ -19,15 +22,11 @@ import org.assertj.db.type.Changes; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnModifiedColumn} class : * {@link org.assertj.db.api.assertions.AssertOnModifiedColumn#isNotModified()} method. * * @author Régis Pouiller - * */ public class AssertOnModifiedColumn_IsNotModified_Test extends AbstractTest { @@ -61,10 +60,10 @@ public void should_fail_because_column_is_modified() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 0 (column name : ID) of Change at index 0 (on table : ACTOR and with primary key : [4]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting :%n" - + " %n" - + "is not modified but is :%n" - + " <4>")); + + "Expecting :%n" + + " %n" + + "is not modified but is :%n" + + " <4>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnModifiedColumns_HasModifiedColumns_Integer_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnModifiedColumns_HasModifiedColumns_Integer_Test.java index c1f8a43d..6b91bc06 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnModifiedColumns_HasModifiedColumns_Integer_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnModifiedColumns_HasModifiedColumns_Integer_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeAssert; import org.assertj.db.common.AbstractTest; @@ -19,15 +22,11 @@ import org.assertj.db.type.Changes; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnModifiedColumns} class : * {@link org.assertj.db.api.assertions.AssertOnModifiedColumns#hasModifiedColumns(Integer...)} method. * * @author Régis Pouiller - * */ public class AssertOnModifiedColumns_HasModifiedColumns_Integer_Test extends AbstractTest { @@ -61,10 +60,10 @@ public void should_fail_because_modified_columns_are_different() throws Exceptio fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Change at index 3 (on table : ACTOR and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting :%n" - + " [1]%n" - + "as indexes of modified columns but was:%n" - + " [2]")); + + "Expecting :%n" + + " [1]%n" + + "as indexes of modified columns but was:%n" + + " [2]")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnModifiedColumns_HasModifiedColumns_String_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnModifiedColumns_HasModifiedColumns_String_Test.java index 2a7f737a..697039f7 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnModifiedColumns_HasModifiedColumns_String_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnModifiedColumns_HasModifiedColumns_String_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeAssert; import org.assertj.db.common.AbstractTest; @@ -19,15 +22,11 @@ import org.assertj.db.type.Changes; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnModifiedColumns} class : * {@link org.assertj.db.api.assertions.AssertOnModifiedColumns(String...)} method. * * @author Régis Pouiller - * */ public class AssertOnModifiedColumns_HasModifiedColumns_String_Test extends AbstractTest { @@ -61,10 +60,10 @@ public void should_fail_because_modified_columns_are_different() throws Exceptio fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Change at index 3 (on table : ACTOR and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting :%n" - + " [\"ID\"]%n" - + "as modified columns but was:%n" - + " [\"FIRSTNAME\"]")); + + "Expecting :%n" + + " [\"ID\"]%n" + + "as modified columns but was:%n" + + " [\"FIRSTNAME\"]")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnModifiedColumns_HasNumberOfModifiedColumnsGreaterThanOrEqualTo_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnModifiedColumns_HasNumberOfModifiedColumnsGreaterThanOrEqualTo_Test.java index b3f2fdfc..065c1f0d 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnModifiedColumns_HasNumberOfModifiedColumnsGreaterThanOrEqualTo_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnModifiedColumns_HasNumberOfModifiedColumnsGreaterThanOrEqualTo_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeAssert; import org.assertj.db.common.AbstractTest; @@ -19,15 +22,11 @@ import org.assertj.db.type.Changes; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnModifiedColumns} class : * {@link org.assertj.db.api.assertions.AssertOnModifiedColumns#hasNumberOfModifiedColumnsGreaterThanOrEqualTo(int)} method. * * @author Régis Pouiller - * */ public class AssertOnModifiedColumns_HasNumberOfModifiedColumnsGreaterThanOrEqualTo_Test extends AbstractTest { @@ -61,10 +60,10 @@ public void should_fail_because_number_of_modified_columns_is_less() throws Exce fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Change at index 3 (on table : ACTOR and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting :%n" - + " number of modifications is greater than or equal to 2%n" - + "but was:%n" - + " 1")); + + "Expecting :%n" + + " number of modifications is greater than or equal to 2%n" + + "but was:%n" + + " 1")); } } -} \ No newline at end of file +} diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnModifiedColumns_HasNumberOfModifiedColumnsGreaterThan_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnModifiedColumns_HasNumberOfModifiedColumnsGreaterThan_Test.java index f62063ab..660899b0 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnModifiedColumns_HasNumberOfModifiedColumnsGreaterThan_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnModifiedColumns_HasNumberOfModifiedColumnsGreaterThan_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeAssert; import org.assertj.db.common.AbstractTest; @@ -19,15 +22,11 @@ import org.assertj.db.type.Changes; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnModifiedColumns} class : * {@link org.assertj.db.api.assertions.AssertOnModifiedColumns#hasNumberOfModifiedColumnsGreaterThan(int)} method. * * @author Régis Pouiller - * */ public class AssertOnModifiedColumns_HasNumberOfModifiedColumnsGreaterThan_Test extends AbstractTest { @@ -61,10 +60,10 @@ public void should_fail_because_number_of_modified_columns_is_less_or_equal() th fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Change at index 3 (on table : ACTOR and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting :%n" - + " number of modifications is greater than 1%n" - + "but was:%n" - + " 1")); + + "Expecting :%n" + + " number of modifications is greater than 1%n" + + "but was:%n" + + " 1")); } } -} \ No newline at end of file +} diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnModifiedColumns_HasNumberOfModifiedColumnsLessThanOrEqualTo_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnModifiedColumns_HasNumberOfModifiedColumnsLessThanOrEqualTo_Test.java index 6af600c2..0086442c 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnModifiedColumns_HasNumberOfModifiedColumnsLessThanOrEqualTo_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnModifiedColumns_HasNumberOfModifiedColumnsLessThanOrEqualTo_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeAssert; import org.assertj.db.common.AbstractTest; @@ -19,15 +22,11 @@ import org.assertj.db.type.Changes; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnModifiedColumns} class : * {@link org.assertj.db.api.assertions.AssertOnModifiedColumns#hasNumberOfModifiedColumnsLessThanOrEqualTo(int)} method. * * @author Régis Pouiller - * */ public class AssertOnModifiedColumns_HasNumberOfModifiedColumnsLessThanOrEqualTo_Test extends AbstractTest { @@ -61,10 +60,10 @@ public void should_fail_because_number_of_modified_columns_is_greater() throws E fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Change at index 3 (on table : ACTOR and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting :%n" - + " number of modifications is less than or equal to 0%n" - + "but was:%n" - + " 1")); + + "Expecting :%n" + + " number of modifications is less than or equal to 0%n" + + "but was:%n" + + " 1")); } } -} \ No newline at end of file +} diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnModifiedColumns_HasNumberOfModifiedColumnsLessThan_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnModifiedColumns_HasNumberOfModifiedColumnsLessThan_Test.java index c240d9ca..a285a6ef 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnModifiedColumns_HasNumberOfModifiedColumnsLessThan_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnModifiedColumns_HasNumberOfModifiedColumnsLessThan_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeAssert; import org.assertj.db.common.AbstractTest; @@ -19,15 +22,11 @@ import org.assertj.db.type.Changes; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnModifiedColumns} class : * {@link org.assertj.db.api.assertions.AssertOnModifiedColumns#hasNumberOfModifiedColumnsLessThan(int)} method. * * @author Régis Pouiller - * */ public class AssertOnModifiedColumns_HasNumberOfModifiedColumnsLessThan_Test extends AbstractTest { @@ -61,10 +60,10 @@ public void should_fail_because_number_of_modified_columns_is_greater_or_equal() fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Change at index 3 (on table : ACTOR and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting :%n" - + " number of modifications is less than 1%n" - + "but was:%n" - + " 1")); + + "Expecting :%n" + + " number of modifications is less than 1%n" + + "but was:%n" + + " 1")); } } -} \ No newline at end of file +} diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnModifiedColumns_HasNumberOfModifiedColumns_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnModifiedColumns_HasNumberOfModifiedColumns_Test.java index a693d8d1..f902b90f 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnModifiedColumns_HasNumberOfModifiedColumns_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnModifiedColumns_HasNumberOfModifiedColumns_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeAssert; import org.assertj.db.common.AbstractTest; @@ -19,15 +22,11 @@ import org.assertj.db.type.Changes; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnModifiedColumns} class : * {@link org.assertj.db.api.assertions.AssertOnModifiedColumns#hasNumberOfModifiedColumns(int)} method. * * @author Régis Pouiller - * */ public class AssertOnModifiedColumns_HasNumberOfModifiedColumns_Test extends AbstractTest { @@ -61,10 +60,10 @@ public void should_fail_because_number_of_modified_columns_is_different() throws fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Change at index 3 (on table : ACTOR and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting :%n" - + " 2 modifications%n" - + "but was:%n" - + " 1")); + + "Expecting :%n" + + " 2 modifications%n" + + "but was:%n" + + " 1")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfChanges_HasNumberOfChangesGreaterThanOrEqualTo_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfChanges_HasNumberOfChangesGreaterThanOrEqualTo_Test.java index c7c0e01b..78c3e623 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfChanges_HasNumberOfChangesGreaterThanOrEqualTo_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfChanges_HasNumberOfChangesGreaterThanOrEqualTo_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangesAssert; import org.assertj.db.common.AbstractTest; @@ -21,15 +24,11 @@ import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnNumberOfChanges} class : * {@link org.assertj.db.api.assertions.AssertOnNumberOfChanges#hasNumberOfChangesGreaterThanOrEqualTo(int)} method. * * @author Régis Pouiller - * */ public class AssertOnNumberOfChanges_HasNumberOfChangesGreaterThanOrEqualTo_Test extends AbstractTest { @@ -65,10 +64,10 @@ public void should_fail_because_number_of_changes_is_less() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Changes on 'select * from actor' request of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting size (number of changes) to be greater than or equal to :%n" - + " <9>%n" - + "but was:%n" - + " <4>")); + + "Expecting size (number of changes) to be greater than or equal to :%n" + + " <9>%n" + + "but was:%n" + + " <4>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfChanges_HasNumberOfChangesGreaterThan_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfChanges_HasNumberOfChangesGreaterThan_Test.java index 33096cb1..f66b834c 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfChanges_HasNumberOfChangesGreaterThan_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfChanges_HasNumberOfChangesGreaterThan_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangesAssert; import org.assertj.db.common.AbstractTest; @@ -21,15 +24,11 @@ import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnNumberOfChanges} class : * {@link org.assertj.db.api.assertions.AssertOnNumberOfChanges#hasNumberOfChangesGreaterThan(int)} method. * * @author Régis Pouiller - * */ public class AssertOnNumberOfChanges_HasNumberOfChangesGreaterThan_Test extends AbstractTest { @@ -65,10 +64,10 @@ public void should_fail_because_number_of_changes_is_less_or_equal() throws Exce fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Changes on 'select * from actor' request of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting size (number of changes) to be greater than :%n" - + " <4>%n" - + "but was:%n" - + " <4>")); + + "Expecting size (number of changes) to be greater than :%n" + + " <4>%n" + + "but was:%n" + + " <4>")); } } -} \ No newline at end of file +} diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfChanges_HasNumberOfChangesLessThanOrEqualTo_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfChanges_HasNumberOfChangesLessThanOrEqualTo_Test.java index c14b2599..7e72be01 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfChanges_HasNumberOfChangesLessThanOrEqualTo_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfChanges_HasNumberOfChangesLessThanOrEqualTo_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangesAssert; import org.assertj.db.common.AbstractTest; @@ -21,15 +24,11 @@ import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnNumberOfChanges} class : * {@link org.assertj.db.api.assertions.AssertOnNumberOfChanges#hasNumberOfChangesLessThanOrEqualTo(int)} method. * * @author Régis Pouiller - * */ public class AssertOnNumberOfChanges_HasNumberOfChangesLessThanOrEqualTo_Test extends AbstractTest { @@ -65,10 +64,10 @@ public void should_fail_because_number_of_changes_is_greater() throws Exception fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Changes on 'select * from actor' request of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting size (number of changes) to be less than or equal to :%n" - + " <2>%n" - + "but was:%n" - + " <4>")); + + "Expecting size (number of changes) to be less than or equal to :%n" + + " <2>%n" + + "but was:%n" + + " <4>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfChanges_HasNumberOfChangesLessThan_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfChanges_HasNumberOfChangesLessThan_Test.java index a9463793..ca8bfef4 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfChanges_HasNumberOfChangesLessThan_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfChanges_HasNumberOfChangesLessThan_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangesAssert; import org.assertj.db.common.AbstractTest; @@ -21,15 +24,11 @@ import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnNumberOfChanges} class : * {@link org.assertj.db.api.assertions.AssertOnNumberOfChanges#hasNumberOfChangesLessThan(int)} method. * * @author Régis Pouiller - * */ public class AssertOnNumberOfChanges_HasNumberOfChangesLessThan_Test extends AbstractTest { @@ -65,10 +64,10 @@ public void should_fail_because_number_of_changes_is_greater_or_equal() throws E fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Changes on 'select * from actor' request of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting size (number of changes) to be less than :%n" - + " <2>%n" - + "but was:%n" - + " <4>")); + + "Expecting size (number of changes) to be less than :%n" + + " <2>%n" + + "but was:%n" + + " <4>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfChanges_HasNumberOfChanges_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfChanges_HasNumberOfChanges_Test.java index d2a7e424..def35ac6 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfChanges_HasNumberOfChanges_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfChanges_HasNumberOfChanges_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangesAssert; import org.assertj.db.common.AbstractTest; @@ -21,15 +24,11 @@ import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnNumberOfChanges} class : * {@link org.assertj.db.api.assertions.AssertOnNumberOfChanges#hasNumberOfChanges(int)} method. * * @author Régis Pouiller - * */ public class AssertOnNumberOfChanges_HasNumberOfChanges_Test extends AbstractTest { @@ -67,10 +66,10 @@ public void should_fail_because_number_of_changes_is_different() throws Exceptio fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Changes on 'select * from actor' request of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting size (number of changes) to be equal to :%n" - + " <9>%n" - + "but was:%n" - + " <4>")); + + "Expecting size (number of changes) to be equal to :%n" + + " <9>%n" + + "but was:%n" + + " <4>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfColumns_HasNumberOfColumnsGreaterThanOrEqualTo_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfColumns_HasNumberOfColumnsGreaterThanOrEqualTo_Test.java index acac1544..d2d495d2 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfColumns_HasNumberOfColumnsGreaterThanOrEqualTo_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfColumns_HasNumberOfColumnsGreaterThanOrEqualTo_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeAssert; import org.assertj.db.api.ChangeRowAssert; @@ -24,15 +27,11 @@ import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnNumberOfColumns} class : * {@link org.assertj.db.api.assertions.AssertOnNumberOfColumns#hasNumberOfColumnsGreaterThanOrEqualTo(int)} method. * * @author Régis Pouiller - * */ public class AssertOnNumberOfColumns_HasNumberOfColumnsGreaterThanOrEqualTo_Test extends AbstractTest { @@ -80,40 +79,40 @@ public void should_fail_because_number_of_columns_is_greater() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Change at index 0 of Changes on 'select * from actor' request of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting size (number of columns) to be greater than or equal to :%n" - + " <6>%n" - + "but was:%n" - + " <5>")); + + "Expecting size (number of columns) to be greater than or equal to :%n" + + " <6>%n" + + "but was:%n" + + " <5>")); } try { assertThat(changes).change().rowAtEndPoint().hasNumberOfColumnsGreaterThanOrEqualTo(6); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Row at end point of Change at index 0 of Changes on 'select * from actor' request of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting size (number of columns) to be greater than or equal to :%n" - + " <6>%n" - + "but was:%n" - + " <5>")); + + "Expecting size (number of columns) to be greater than or equal to :%n" + + " <6>%n" + + "but was:%n" + + " <5>")); } try { assertThat(request).hasNumberOfColumnsGreaterThanOrEqualTo(6); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("['select * from actor' request] %n" - + "Expecting size (number of columns) to be greater than or equal to :%n" - + " <6>%n" - + "but was:%n" - + " <5>")); + + "Expecting size (number of columns) to be greater than or equal to :%n" + + " <6>%n" + + "but was:%n" + + " <5>")); } try { assertThat(request).row().hasNumberOfColumnsGreaterThanOrEqualTo(6); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Row at index 0 of 'select * from actor' request] %n" - + "Expecting size (number of columns) to be greater than or equal to :%n" - + " <6>%n" - + "but was:%n" - + " <5>")); + + "Expecting size (number of columns) to be greater than or equal to :%n" + + " <6>%n" + + "but was:%n" + + " <5>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfColumns_HasNumberOfColumnsGreaterThan_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfColumns_HasNumberOfColumnsGreaterThan_Test.java index 7968605a..d93b8201 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfColumns_HasNumberOfColumnsGreaterThan_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfColumns_HasNumberOfColumnsGreaterThan_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeAssert; import org.assertj.db.api.ChangeRowAssert; @@ -24,15 +27,11 @@ import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnNumberOfColumns} class : * {@link org.assertj.db.api.assertions.AssertOnNumberOfColumns#hasNumberOfColumnsGreaterThan(int)} method. * * @author Régis Pouiller - * */ public class AssertOnNumberOfColumns_HasNumberOfColumnsGreaterThan_Test extends AbstractTest { @@ -80,40 +79,40 @@ public void should_fail_because_number_of_columns_is_different() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Change at index 0 of Changes on 'select * from actor' request of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting size (number of columns) to be greater than :%n" - + " <9>%n" - + "but was:%n" - + " <5>")); + + "Expecting size (number of columns) to be greater than :%n" + + " <9>%n" + + "but was:%n" + + " <5>")); } try { assertThat(changes).change().rowAtEndPoint().hasNumberOfColumnsGreaterThan(9); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Row at end point of Change at index 0 of Changes on 'select * from actor' request of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting size (number of columns) to be greater than :%n" - + " <9>%n" - + "but was:%n" - + " <5>")); + + "Expecting size (number of columns) to be greater than :%n" + + " <9>%n" + + "but was:%n" + + " <5>")); } try { assertThat(request).hasNumberOfColumnsGreaterThan(9); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("['select * from actor' request] %n" - + "Expecting size (number of columns) to be greater than :%n" - + " <9>%n" - + "but was:%n" - + " <5>")); + + "Expecting size (number of columns) to be greater than :%n" + + " <9>%n" + + "but was:%n" + + " <5>")); } try { assertThat(request).row().hasNumberOfColumnsGreaterThan(9); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Row at index 0 of 'select * from actor' request] %n" - + "Expecting size (number of columns) to be greater than :%n" - + " <9>%n" - + "but was:%n" - + " <5>")); + + "Expecting size (number of columns) to be greater than :%n" + + " <9>%n" + + "but was:%n" + + " <5>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfColumns_HasNumberOfColumnsLessThanOrEqualTo_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfColumns_HasNumberOfColumnsLessThanOrEqualTo_Test.java index e768bead..df96b2ea 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfColumns_HasNumberOfColumnsLessThanOrEqualTo_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfColumns_HasNumberOfColumnsLessThanOrEqualTo_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeAssert; import org.assertj.db.api.ChangeRowAssert; @@ -24,15 +27,11 @@ import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnNumberOfColumns} class : * {@link org.assertj.db.api.assertions.AssertOnNumberOfColumns#hasNumberOfColumnsLessThanOrEqualTo(int)} method. * * @author Régis Pouiller - * */ public class AssertOnNumberOfColumns_HasNumberOfColumnsLessThanOrEqualTo_Test extends AbstractTest { @@ -80,40 +79,40 @@ public void should_fail_because_number_of_columns_is_less() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Change at index 0 of Changes on 'select * from actor' request of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting size (number of columns) to be less than or equal to :%n" - + " <4>%n" - + "but was:%n" - + " <5>")); + + "Expecting size (number of columns) to be less than or equal to :%n" + + " <4>%n" + + "but was:%n" + + " <5>")); } try { assertThat(changes).change().rowAtEndPoint().hasNumberOfColumnsLessThanOrEqualTo(4); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Row at end point of Change at index 0 of Changes on 'select * from actor' request of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting size (number of columns) to be less than or equal to :%n" - + " <4>%n" - + "but was:%n" - + " <5>")); + + "Expecting size (number of columns) to be less than or equal to :%n" + + " <4>%n" + + "but was:%n" + + " <5>")); } try { assertThat(request).hasNumberOfColumnsLessThanOrEqualTo(4); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("['select * from actor' request] %n" - + "Expecting size (number of columns) to be less than or equal to :%n" - + " <4>%n" - + "but was:%n" - + " <5>")); + + "Expecting size (number of columns) to be less than or equal to :%n" + + " <4>%n" + + "but was:%n" + + " <5>")); } try { assertThat(request).row().hasNumberOfColumnsLessThanOrEqualTo(4); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Row at index 0 of 'select * from actor' request] %n" - + "Expecting size (number of columns) to be less than or equal to :%n" - + " <4>%n" - + "but was:%n" - + " <5>")); + + "Expecting size (number of columns) to be less than or equal to :%n" + + " <4>%n" + + "but was:%n" + + " <5>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfColumns_HasNumberOfColumnsLessThan_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfColumns_HasNumberOfColumnsLessThan_Test.java index 99da5ab3..ace13f09 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfColumns_HasNumberOfColumnsLessThan_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfColumns_HasNumberOfColumnsLessThan_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeAssert; import org.assertj.db.api.ChangeRowAssert; @@ -24,15 +27,11 @@ import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnNumberOfColumns} class : * {@link org.assertj.db.api.assertions.AssertOnNumberOfColumns#hasNumberOfColumnsLessThan(int)} method. * * @author Régis Pouiller - * */ public class AssertOnNumberOfColumns_HasNumberOfColumnsLessThan_Test extends AbstractTest { @@ -80,40 +79,40 @@ public void should_fail_because_number_of_columns_is_greater_or_equal() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Change at index 0 of Changes on 'select * from actor' request of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting size (number of columns) to be less than :%n" - + " <5>%n" - + "but was:%n" - + " <5>")); + + "Expecting size (number of columns) to be less than :%n" + + " <5>%n" + + "but was:%n" + + " <5>")); } try { assertThat(changes).change().rowAtEndPoint().hasNumberOfColumnsLessThan(4); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Row at end point of Change at index 0 of Changes on 'select * from actor' request of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting size (number of columns) to be less than :%n" - + " <4>%n" - + "but was:%n" - + " <5>")); + + "Expecting size (number of columns) to be less than :%n" + + " <4>%n" + + "but was:%n" + + " <5>")); } try { assertThat(request).hasNumberOfColumnsLessThan(5); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("['select * from actor' request] %n" - + "Expecting size (number of columns) to be less than :%n" - + " <5>%n" - + "but was:%n" - + " <5>")); + + "Expecting size (number of columns) to be less than :%n" + + " <5>%n" + + "but was:%n" + + " <5>")); } try { assertThat(request).row().hasNumberOfColumnsLessThan(4); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Row at index 0 of 'select * from actor' request] %n" - + "Expecting size (number of columns) to be less than :%n" - + " <4>%n" - + "but was:%n" - + " <5>")); + + "Expecting size (number of columns) to be less than :%n" + + " <4>%n" + + "but was:%n" + + " <5>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfColumns_HasNumberOfColumns_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfColumns_HasNumberOfColumns_Test.java index 7960a751..2ce8c180 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfColumns_HasNumberOfColumns_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfColumns_HasNumberOfColumns_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeAssert; import org.assertj.db.api.ChangeRowAssert; @@ -24,15 +27,11 @@ import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnNumberOfColumns} class : * {@link org.assertj.db.api.assertions.AssertOnNumberOfColumns#hasNumberOfColumns(int)} method. * * @author Régis Pouiller - * */ public class AssertOnNumberOfColumns_HasNumberOfColumns_Test extends AbstractTest { @@ -80,40 +79,40 @@ public void should_fail_because_number_of_columns_is_different() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Change at index 0 of Changes on 'select * from actor' request of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting size (number of columns) to be equal to :%n" - + " <9>%n" - + "but was:%n" - + " <5>")); + + "Expecting size (number of columns) to be equal to :%n" + + " <9>%n" + + "but was:%n" + + " <5>")); } try { assertThat(changes).change().rowAtEndPoint().hasNumberOfColumns(9); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Row at end point of Change at index 0 of Changes on 'select * from actor' request of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting size (number of columns) to be equal to :%n" - + " <9>%n" - + "but was:%n" - + " <5>")); + + "Expecting size (number of columns) to be equal to :%n" + + " <9>%n" + + "but was:%n" + + " <5>")); } try { assertThat(request).hasNumberOfColumns(9); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("['select * from actor' request] %n" - + "Expecting size (number of columns) to be equal to :%n" - + " <9>%n" - + "but was:%n" - + " <5>")); + + "Expecting size (number of columns) to be equal to :%n" + + " <9>%n" + + "but was:%n" + + " <5>")); } try { assertThat(request).row().hasNumberOfColumns(9); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Row at index 0 of 'select * from actor' request] %n" - + "Expecting size (number of columns) to be equal to :%n" - + " <9>%n" - + "but was:%n" - + " <5>")); + + "Expecting size (number of columns) to be equal to :%n" + + " <9>%n" + + "but was:%n" + + " <5>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfRows_HasNumberOfRowsGreaterThanOrEqualTo_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfRows_HasNumberOfRowsGreaterThanOrEqualTo_Test.java index c73edda9..a4fd5c97 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfRows_HasNumberOfRowsGreaterThanOrEqualTo_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfRows_HasNumberOfRowsGreaterThanOrEqualTo_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.TableAssert; import org.assertj.db.api.TableColumnAssert; @@ -20,15 +23,11 @@ import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnNumberOfRows} class : * {@link org.assertj.db.api.assertions.AssertOnNumberOfRows#hasNumberOfRowsGreaterThanOrEqualTo(int)} method. * * @author Régis Pouiller - * */ public class AssertOnNumberOfRows_HasNumberOfRowsGreaterThanOrEqualTo_Test extends AbstractTest { @@ -57,20 +56,20 @@ public void should_fail_because_number_of_rows_is_less() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("['select * from actor' request] %n" - + "Expecting size (number of rows) to be greater than or equal to :%n" - + " <9>%n" - + "but was:%n" - + " <3>")); + + "Expecting size (number of rows) to be greater than or equal to :%n" + + " <9>%n" + + "but was:%n" + + " <3>")); } try { assertThat(request).column().hasNumberOfRowsGreaterThanOrEqualTo(9); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 0 (column name : ID) of 'select * from actor' request] %n" - + "Expecting size (number of rows) to be greater than or equal to :%n" - + " <9>%n" - + "but was:%n" - + " <3>")); + + "Expecting size (number of rows) to be greater than or equal to :%n" + + " <9>%n" + + "but was:%n" + + " <3>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfRows_HasNumberOfRowsGreaterThan_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfRows_HasNumberOfRowsGreaterThan_Test.java index 66ce06b4..fb6b4563 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfRows_HasNumberOfRowsGreaterThan_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfRows_HasNumberOfRowsGreaterThan_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.TableAssert; import org.assertj.db.api.TableColumnAssert; @@ -20,15 +23,11 @@ import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnNumberOfRows} class : * {@link org.assertj.db.api.assertions.AssertOnNumberOfRows#hasNumberOfRowsGreaterThan(int)} method. * * @author Régis Pouiller - * */ public class AssertOnNumberOfRows_HasNumberOfRowsGreaterThan_Test extends AbstractTest { @@ -57,20 +56,20 @@ public void should_fail_because_number_of_rows_is_less_or_equal() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("['select * from actor' request] %n" - + "Expecting size (number of rows) to be greater than :%n" - + " <9>%n" - + "but was:%n" - + " <3>")); + + "Expecting size (number of rows) to be greater than :%n" + + " <9>%n" + + "but was:%n" + + " <3>")); } try { assertThat(request).column().hasNumberOfRowsGreaterThan(9); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 0 (column name : ID) of 'select * from actor' request] %n" - + "Expecting size (number of rows) to be greater than :%n" - + " <9>%n" - + "but was:%n" - + " <3>")); + + "Expecting size (number of rows) to be greater than :%n" + + " <9>%n" + + "but was:%n" + + " <3>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfRows_HasNumberOfRowsLessThanOrEqualTo_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfRows_HasNumberOfRowsLessThanOrEqualTo_Test.java index a6610b7e..29c51993 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfRows_HasNumberOfRowsLessThanOrEqualTo_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfRows_HasNumberOfRowsLessThanOrEqualTo_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.TableAssert; import org.assertj.db.api.TableColumnAssert; @@ -20,15 +23,11 @@ import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnNumberOfRows} class : * {@link org.assertj.db.api.assertions.AssertOnNumberOfRows#hasNumberOfRowsLessThanOrEqualTo(int)} method. * * @author Régis Pouiller - * */ public class AssertOnNumberOfRows_HasNumberOfRowsLessThanOrEqualTo_Test extends AbstractTest { @@ -57,20 +56,20 @@ public void should_fail_because_number_of_rows_is_greater() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("['select * from actor' request] %n" - + "Expecting size (number of rows) to be less than or equal to :%n" - + " <2>%n" - + "but was:%n" - + " <3>")); + + "Expecting size (number of rows) to be less than or equal to :%n" + + " <2>%n" + + "but was:%n" + + " <3>")); } try { assertThat(request).column().hasNumberOfRowsLessThanOrEqualTo(2); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 0 (column name : ID) of 'select * from actor' request] %n" - + "Expecting size (number of rows) to be less than or equal to :%n" - + " <2>%n" - + "but was:%n" - + " <3>")); + + "Expecting size (number of rows) to be less than or equal to :%n" + + " <2>%n" + + "but was:%n" + + " <3>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfRows_HasNumberOfRowsLessThan_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfRows_HasNumberOfRowsLessThan_Test.java index 3aa2e15a..aae43606 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfRows_HasNumberOfRowsLessThan_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfRows_HasNumberOfRowsLessThan_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.TableAssert; import org.assertj.db.api.TableColumnAssert; @@ -20,15 +23,11 @@ import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnNumberOfRows} class : * {@link org.assertj.db.api.assertions.AssertOnNumberOfRows#hasNumberOfRowsLessThan(int)} method. * * @author Régis Pouiller - * */ public class AssertOnNumberOfRows_HasNumberOfRowsLessThan_Test extends AbstractTest { @@ -57,20 +56,20 @@ public void should_fail_because_number_of_rows_is_greater_or_equal() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("['select * from actor' request] %n" - + "Expecting size (number of rows) to be less than :%n" - + " <2>%n" - + "but was:%n" - + " <3>")); + + "Expecting size (number of rows) to be less than :%n" + + " <2>%n" + + "but was:%n" + + " <3>")); } try { assertThat(request).column().hasNumberOfRowsLessThan(2); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 0 (column name : ID) of 'select * from actor' request] %n" - + "Expecting size (number of rows) to be less than :%n" - + " <2>%n" - + "but was:%n" - + " <3>")); + + "Expecting size (number of rows) to be less than :%n" + + " <2>%n" + + "but was:%n" + + " <3>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfRows_HasNumberOfRows_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfRows_HasNumberOfRows_Test.java index a0467dd9..aec45441 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfRows_HasNumberOfRows_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfRows_HasNumberOfRows_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.TableAssert; import org.assertj.db.api.TableColumnAssert; @@ -20,15 +23,11 @@ import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnNumberOfRows} class : * {@link org.assertj.db.api.assertions.AssertOnNumberOfRows#hasNumberOfRows(int)} method. * * @author Régis Pouiller - * */ public class AssertOnNumberOfRows_HasNumberOfRows_Test extends AbstractTest { @@ -57,20 +56,20 @@ public void should_fail_because_number_of_rows_is_different() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("['select * from actor' request] %n" - + "Expecting size (number of rows) to be equal to :%n" - + " <9>%n" - + "but was:%n" - + " <3>")); + + "Expecting size (number of rows) to be equal to :%n" + + " <9>%n" + + "but was:%n" + + " <3>")); } try { assertThat(request).column().hasNumberOfRows(9); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 0 (column name : ID) of 'select * from actor' request] %n" - + "Expecting size (number of rows) to be equal to :%n" - + " <9>%n" - + "but was:%n" - + " <3>")); + + "Expecting size (number of rows) to be equal to :%n" + + " <9>%n" + + "but was:%n" + + " <3>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfRows_IsEmpty_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfRows_IsEmpty_Test.java index 6b45a8fe..f9752ca0 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfRows_IsEmpty_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnNumberOfRows_IsEmpty_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.TableAssert; import org.assertj.db.api.TableColumnAssert; @@ -21,9 +24,6 @@ import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnNumberOfRows} class : * {@link AssertOnNumberOfRows#isEmpty()} method. @@ -57,20 +57,20 @@ public void should_fail_because_table_is_not_empty() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("['select * from actor' request] %n" - + "Expecting size (number of rows) to be equal to :%n" - + " <0>%n" - + "but was:%n" - + " <3>")); + + "Expecting size (number of rows) to be equal to :%n" + + " <0>%n" + + "but was:%n" + + " <3>")); } try { assertThat(request).column().isEmpty(); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 0 (column name : ID) of 'select * from actor' request] %n" - + "Expecting size (number of rows) to be equal to :%n" - + " <0>%n" - + "but was:%n" - + " <3>")); + + "Expecting size (number of rows) to be equal to :%n" + + " <0>%n" + + "but was:%n" + + " <3>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnPrimaryKey_HasPksNames_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnPrimaryKey_HasPksNames_Test.java index 4cce34d6..06e8a4b2 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnPrimaryKey_HasPksNames_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnPrimaryKey_HasPksNames_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeAssert; import org.assertj.db.common.AbstractTest; @@ -19,15 +22,11 @@ import org.assertj.db.type.Changes; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnPrimaryKey} class : * {@link org.assertj.db.api.assertions.AssertOnPrimaryKey#hasPksNames(String...)} method. * * @author Régis Pouiller - * */ public class AssertOnPrimaryKey_HasPksNames_Test extends AbstractTest { @@ -61,10 +60,10 @@ public void should_fail_because_pks_names_are_different() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Change at index 0 (on table : ACTOR and with primary key : [4]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting :%n" - + " [\"ID2\"]%n" - + "to be the name of the columns of the primary keys but was:%n" - + " [\"ID\"]")); + + "Expecting :%n" + + " [\"ID2\"]%n" + + "to be the name of the columns of the primary keys but was:%n" + + " [\"ID\"]")); } } @@ -83,10 +82,10 @@ public void should_fail_because_number_of_pks_names_are_different() throws Excep fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Change at index 0 (on table : ACTOR and with primary key : [4]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting :%n" - + " [\"ID\", \"ID2\"]%n" - + "to be the name of the columns of the primary keys but was:%n" - + " [\"ID\"]")); + + "Expecting :%n" + + " [\"ID\", \"ID2\"]%n" + + "to be the name of the columns of the primary keys but was:%n" + + " [\"ID\"]")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnPrimaryKey_HasPksValues_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnPrimaryKey_HasPksValues_Test.java index bada2442..c3b19419 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnPrimaryKey_HasPksValues_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnPrimaryKey_HasPksValues_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeAssert; import org.assertj.db.common.AbstractTest; @@ -19,15 +22,11 @@ import org.assertj.db.type.Changes; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnPrimaryKey} class : * {@link org.assertj.db.api.assertions.AssertOnPrimaryKey#hasPksValues(Object...)} method. * * @author Régis Pouiller - * */ public class AssertOnPrimaryKey_HasPksValues_Test extends AbstractTest { @@ -61,10 +60,10 @@ public void should_fail_because_pks_values_are_different() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Change at index 0 (on table : ACTOR and with primary key : [4]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting :%n" - + " [5]%n" - + "to be the values of the columns of the primary keys but was:%n" - + " [4]")); + + "Expecting :%n" + + " [5]%n" + + "to be the values of the columns of the primary keys but was:%n" + + " [4]")); } } @@ -83,10 +82,10 @@ public void should_fail_because_number_of_pks_values_are_different() throws Exce fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Change at index 0 (on table : ACTOR and with primary key : [4]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting :%n" - + " [4, \"ID2\"]%n" - + "to be the values of the columns of the primary keys but was:%n" - + " [4]")); + + "Expecting :%n" + + " [4, \"ID2\"]%n" + + "to be the values of the columns of the primary keys but was:%n" + + " [4]")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnRowCondition_HasValuesSatisfying_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnRowCondition_HasValuesSatisfying_Test.java index 288c9166..5dc3b4a9 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnRowCondition_HasValuesSatisfying_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnRowCondition_HasValuesSatisfying_Test.java @@ -8,10 +8,14 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; + +import java.util.UUID; + import org.assertj.core.api.Assertions; import org.assertj.core.api.Condition; import org.assertj.core.api.HamcrestCondition; @@ -24,16 +28,11 @@ import org.hamcrest.CoreMatchers; import org.junit.Test; -import java.util.UUID; - -import static org.assertj.db.api.Assertions.assertThat; - /** * Tests on {@link AssertOnRowCondition} class : * {@link AssertOnRowCondition#hasValuesSatisfying(Object...)} method. * * @author Julien Roy - * */ public class AssertOnRowCondition_HasValuesSatisfying_Test extends AbstractTest { @@ -50,38 +49,38 @@ public void test_has_values() { ChangeRowAssert changeRowAssert = assertThat(changes).change().rowAtEndPoint(); ChangeRowAssert changeRowAssert2 = changeRowAssert - .hasValuesSatisfying( - 4, - new Condition(v -> v.equals("Murray"), "isMurray"), - new HamcrestCondition<>(CoreMatchers.is("Bill")), - "1950-09-21", - "30B443AE-C0C9-4790-9BEC-CE1380808435" - ) - .hasValuesSatisfying( - 4, - new Condition(v -> v.equals("Murray"), "isMurray"), - new HamcrestCondition<>(CoreMatchers.is("Bill")), - "1950-09-21", - UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435") - ); + .hasValuesSatisfying( + 4, + new Condition(v -> v.equals("Murray"), "isMurray"), + new HamcrestCondition<>(CoreMatchers.is("Bill")), + "1950-09-21", + "30B443AE-C0C9-4790-9BEC-CE1380808435" + ) + .hasValuesSatisfying( + 4, + new Condition(v -> v.equals("Murray"), "isMurray"), + new HamcrestCondition<>(CoreMatchers.is("Bill")), + "1950-09-21", + UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435") + ); Assertions.assertThat(changeRowAssert).isSameAs(changeRowAssert2); TableRowAssert tableRowAssert = assertThat(table).row(); TableRowAssert tableRowAssert2 = tableRowAssert - .hasValuesSatisfying( - 1, - new Condition(v -> v.equals("Weaver"), "isWeaver"), - new HamcrestCondition<>(CoreMatchers.is("Susan Alexandra")), - "1949-10-08", - "30B443AE-C0C9-4790-9BEC-CE1380808435" - ) - .hasValuesSatisfying( - 1, - new Condition(v -> v.equals("Weaver"), "isWeaver"), - new HamcrestCondition<>(CoreMatchers.is("Susan Alexandra")), - "1949-10-08", - UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435") - ); + .hasValuesSatisfying( + 1, + new Condition(v -> v.equals("Weaver"), "isWeaver"), + new HamcrestCondition<>(CoreMatchers.is("Susan Alexandra")), + "1949-10-08", + "30B443AE-C0C9-4790-9BEC-CE1380808435" + ) + .hasValuesSatisfying( + 1, + new Condition(v -> v.equals("Weaver"), "isWeaver"), + new HamcrestCondition<>(CoreMatchers.is("Susan Alexandra")), + "1949-10-08", + UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435") + ); Assertions.assertThat(tableRowAssert).isSameAs(tableRowAssert2); } @@ -98,16 +97,16 @@ public void should_fail_because_values_are_different() { try { assertThat(changes).change().rowAtEndPoint() - .hasValuesSatisfying( - 4, - "Murray", - new Condition(v -> v.equals("Billy"), "isBilly"), - "1950-09-21", - UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435") - ); + .hasValuesSatisfying( + 4, + "Murray", + new Condition(v -> v.equals("Billy"), "isBilly"), + "1950-09-21", + UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435") + ); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format( - "[Row at end point of Change at index 0 (with primary key : [4]) of Changes on ACTOR table of 'sa/jdbc:h2:mem:test' source] %n" + "[Row at end point of Change at index 0 (with primary key : [4]) of Changes on ACTOR table of 'sa/jdbc:h2:mem:test' source] %n" + "Expecting that the value at index 2:%n" + " \"Bill\"%n" + "to satisfy: %n" @@ -115,18 +114,18 @@ public void should_fail_because_values_are_different() { } try { assertThat(table).row().hasValuesSatisfying( - 1, - "Weaver", - new Condition(v -> v.equals("Sigourney"), "isSigourney"), - "1949-10-08", - UUID.fromString("648DFAC8-14AC-47F7-95CF-3475525A3BE3") + 1, + "Weaver", + new Condition(v -> v.equals("Sigourney"), "isSigourney"), + "1949-10-08", + UUID.fromString("648DFAC8-14AC-47F7-95CF-3475525A3BE3") ); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Row at index 0 of ACTOR table] %n" - + "Expecting that the value at index 2:%n" - + " \"Susan Alexandra\"%n" - + "to satisfy: %n" - + " isSigourney")); + + "Expecting that the value at index 2:%n" + + " \"Susan Alexandra\"%n" + + "to satisfy: %n" + + " isSigourney")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnRowEquality_HasValues_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnRowEquality_HasValues_Test.java index a0c35ed7..dc37ea4f 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnRowEquality_HasValues_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnRowEquality_HasValues_Test.java @@ -8,10 +8,14 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; + +import java.util.UUID; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeRowAssert; import org.assertj.db.api.TableRowAssert; @@ -21,16 +25,11 @@ import org.assertj.db.type.Table; import org.junit.Test; -import java.util.UUID; - -import static org.assertj.db.api.Assertions.assertThat; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnRowEquality} class : * {@link org.assertj.db.api.assertions.AssertOnRowEquality#hasValues(Object...)} method. * * @author Régis Pouiller - * */ public class AssertOnRowEquality_HasValues_Test extends AbstractTest { @@ -47,13 +46,13 @@ public void test_has_values() { ChangeRowAssert changeRowAssert = assertThat(changes).change().rowAtEndPoint(); ChangeRowAssert changeRowAssert2 = changeRowAssert.hasValues(4, "Murray", "Bill", "1950-09-21", "30B443AE-C0C9-4790-9BEC-CE1380808435") - .hasValues(4, "Murray", "Bill", "1950-09-21", UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")); + .hasValues(4, "Murray", "Bill", "1950-09-21", UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")); Assertions.assertThat(changeRowAssert).isSameAs(changeRowAssert2); TableRowAssert tableRowAssert = assertThat(table).row(); TableRowAssert tableRowAssert2 = tableRowAssert.hasValues(1, "Weaver", "Susan Alexandra", "1949-10-08", "30B443AE-C0C9-4790-9BEC-CE1380808435") - .hasValues(1, "Weaver", "Susan Alexandra", "1949-10-08", - UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")); + .hasValues(1, "Weaver", "Susan Alexandra", "1949-10-08", + UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")); Assertions.assertThat(tableRowAssert).isSameAs(tableRowAssert2); } @@ -72,19 +71,19 @@ public void should_fail_because_values_are_different() { assertThat(changes).change().rowAtEndPoint().hasValues(4, "Murray", "Billy", "1950-09-21", UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Row at end point of Change at index 0 (with primary key : [4]) of Changes on ACTOR table of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting that the value at index 2:%n" - + " <\"Bill\">%n" - + "to be equal to: %n" - + " <\"Billy\">")); + + "Expecting that the value at index 2:%n" + + " <\"Bill\">%n" + + "to be equal to: %n" + + " <\"Billy\">")); } try { assertThat(table).row().hasValues(1, "Weaver", "Sigourney", "1949-10-08", UUID.fromString("648DFAC8-14AC-47F7-95CF-3475525A3BE3")); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Row at index 0 of ACTOR table] %n" - + "Expecting that the value at index 2:%n" - + " <\"Susan Alexandra\">%n" - + "to be equal to: %n" - + " <\"Sigourney\">")); + + "Expecting that the value at index 2:%n" + + " <\"Susan Alexandra\">%n" + + "to be equal to: %n" + + " <\"Sigourney\">")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnRowNullity_HasOnlyNotNullValues_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnRowNullity_HasOnlyNotNullValues_Test.java index 13c920a5..8d9418be 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnRowNullity_HasOnlyNotNullValues_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnRowNullity_HasOnlyNotNullValues_Test.java @@ -8,23 +8,22 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.TableRowAssert; import org.assertj.db.common.AbstractTest; import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link AssertOnRowNullity} class : * {@link org.assertj.db.api.assertions.AssertOnRowNullity#hasOnlyNotNullValues()} method. - * */ public class AssertOnRowNullity_HasOnlyNotNullValues_Test extends AbstractTest { @@ -47,12 +46,12 @@ public void should_fail_because_row_has_null_value() throws Exception { Table table = new Table(source, "test2"); TableRowAssert tableRowAssert = assertThat(table).row().row(); try { - tableRowAssert.hasOnlyNotNullValues(); + tableRowAssert.hasOnlyNotNullValues(); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Row at index 1 of TEST2 table] %n" - + "Expecting to contain only not null:%n" - + "but contains null at index: 0")); + + "Expecting to contain only not null:%n" + + "but contains null at index: 0")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnRowOfChangeExistence_DoesNotExist_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnRowOfChangeExistence_DoesNotExist_Test.java index b27f0e7c..341399db 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnRowOfChangeExistence_DoesNotExist_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnRowOfChangeExistence_DoesNotExist_Test.java @@ -8,10 +8,12 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeRowAssert; import org.assertj.db.common.AbstractTest; @@ -19,14 +21,11 @@ import org.assertj.db.type.Changes; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnRowOfChangeExistence} class : * {@link org.assertj.db.api.assertions.AssertOnRowOfChangeExistence#doesNotExist()} method. * * @author Régis Pouiller - * */ public class AssertOnRowOfChangeExistence_DoesNotExist_Test extends AbstractTest { @@ -59,7 +58,7 @@ public void should_fail_because_row_exists() throws Exception { assertThat(changes).change().rowAtEndPoint().doesNotExist(); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Row at end point of Change at index 0 (on table : ACTOR and with primary key : [4]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting not exist but exists")); + + "Expecting not exist but exists")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnRowOfChangeExistence_Exists_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnRowOfChangeExistence_Exists_Test.java index 869aeab0..f14aad04 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnRowOfChangeExistence_Exists_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnRowOfChangeExistence_Exists_Test.java @@ -8,10 +8,12 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeRowAssert; import org.assertj.db.common.AbstractTest; @@ -19,14 +21,11 @@ import org.assertj.db.type.Changes; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnRowOfChangeExistence} class : * {@link org.assertj.db.api.assertions.AssertOnRowOfChangeExistence#exists()} method. * * @author Régis Pouiller - * */ public class AssertOnRowOfChangeExistence_Exists_Test extends AbstractTest { @@ -59,7 +58,7 @@ public void should_fail_because_row_does_not_exist() throws Exception { assertThat(changes).change().rowAtStartPoint().exists(); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Row at start point of Change at index 0 (on table : ACTOR and with primary key : [4]) of Changes on tables of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting exist but do not exist")); + + "Expecting exist but do not exist")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfterOrEqualTo_DateTimeValue_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfterOrEqualTo_DateTimeValue_Test.java index a2f0df17..d6320924 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfterOrEqualTo_DateTimeValue_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfterOrEqualTo_DateTimeValue_Test.java @@ -8,10 +8,15 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + +import java.text.ParseException; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeColumnValueAssert; import org.assertj.db.api.TableColumnValueAssert; @@ -22,17 +27,11 @@ import org.assertj.db.type.Table; import org.junit.Test; -import java.text.ParseException; - -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnValueChronology} class : * {@link org.assertj.db.api.assertions.AssertOnValueChronology#isAfterOrEqualTo(org.assertj.db.type.DateTimeValue)} method. * * @author Régis Pouiller - * */ public class AssertOnValueChronology_IsAfterOrEqualTo_DateTimeValue_Test extends AbstractTest { @@ -49,12 +48,12 @@ public void test_is_after_or_equal_to() throws ParseException { ChangeColumnValueAssert changeColumnValueAssert = assertThat(changes).change().column("var10").valueAtEndPoint(); ChangeColumnValueAssert changeColumnValueAssert2 = changeColumnValueAssert.isAfterOrEqualTo( - DateTimeValue.parse("2014-05-24T09:46:30")); + DateTimeValue.parse("2014-05-24T09:46:30")); Assertions.assertThat(changeColumnValueAssert).isSameAs(changeColumnValueAssert2); TableColumnValueAssert tableColumnValueAssert = assertThat(table).column("var10").value(); TableColumnValueAssert tableColumnValueAssert2 = tableColumnValueAssert.isAfterOrEqualTo( - DateTimeValue.parse("2014-05-24T09:46:30")); + DateTimeValue.parse("2014-05-24T09:46:30")); Assertions.assertThat(tableColumnValueAssert).isSameAs(tableColumnValueAssert2); } @@ -71,24 +70,24 @@ public void should_fail_because_value_is_before() throws ParseException { try { assertThat(changes).change().column("var10").valueAtEndPoint().isAfterOrEqualTo( - DateTimeValue.parse("2014-05-24T09:46:31")); + DateTimeValue.parse("2014-05-24T09:46:31")); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 9 (column name : VAR10) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting:%n" - + " <2014-05-24T09:46:30.000000000>%n" - + "to be after or equal to %n" - + " <2014-05-24T09:46:31.000000000>")); + + "Expecting:%n" + + " <2014-05-24T09:46:30.000000000>%n" + + "to be after or equal to %n" + + " <2014-05-24T09:46:31.000000000>")); } try { assertThat(table).column("var10").value().isAfterOrEqualTo(DateTimeValue.parse("2014-05-24T09:46:31")); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at index 0 of Column at index 9 (column name : VAR10) of TEST table] %n" - + "Expecting:%n" - + " <2014-05-24T09:46:30.000000000>%n" - + "to be after or equal to %n" - + " <2014-05-24T09:46:31.000000000>")); + + "Expecting:%n" + + " <2014-05-24T09:46:30.000000000>%n" + + "to be after or equal to %n" + + " <2014-05-24T09:46:31.000000000>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfterOrEqualTo_DateValue_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfterOrEqualTo_DateValue_Test.java index ada50504..41cb9189 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfterOrEqualTo_DateValue_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfterOrEqualTo_DateValue_Test.java @@ -8,10 +8,15 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + +import java.text.ParseException; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeColumnValueAssert; import org.assertj.db.api.TableColumnValueAssert; @@ -22,17 +27,11 @@ import org.assertj.db.type.Table; import org.junit.Test; -import java.text.ParseException; - -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnValueChronology} class : * {@link org.assertj.db.api.assertions.AssertOnValueChronology#isAfterOrEqualTo(org.assertj.db.type.DateValue)} method. * * @author Régis Pouiller - * */ public class AssertOnValueChronology_IsAfterOrEqualTo_DateValue_Test extends AbstractTest { @@ -49,12 +48,12 @@ public void test_is_after_or_equal_to() throws ParseException { ChangeColumnValueAssert changeColumnValueAssert = assertThat(changes).change().column("var10").valueAtEndPoint(); ChangeColumnValueAssert changeColumnValueAssert2 = changeColumnValueAssert.isAfterOrEqualTo( - DateValue.parse("2014-05-24")); + DateValue.parse("2014-05-24")); Assertions.assertThat(changeColumnValueAssert).isSameAs(changeColumnValueAssert2); TableColumnValueAssert tableColumnValueAssert = assertThat(table).column("var10").value(); TableColumnValueAssert tableColumnValueAssert2 = tableColumnValueAssert.isAfterOrEqualTo( - DateValue.parse("2014-05-24")); + DateValue.parse("2014-05-24")); Assertions.assertThat(tableColumnValueAssert).isSameAs(tableColumnValueAssert2); } @@ -74,20 +73,20 @@ public void should_fail_because_value_is_before() throws ParseException { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 9 (column name : VAR10) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting:%n" - + " <2014-05-24T09:46:30.000000000>%n" - + "to be after or equal to %n" - + " <2014-05-25T00:00:00.000000000>")); + + "Expecting:%n" + + " <2014-05-24T09:46:30.000000000>%n" + + "to be after or equal to %n" + + " <2014-05-25T00:00:00.000000000>")); } try { assertThat(table).column("var10").value().isAfterOrEqualTo(DateValue.parse("2014-05-25")); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at index 0 of Column at index 9 (column name : VAR10) of TEST table] %n" - + "Expecting:%n" - + " <2014-05-24T09:46:30.000000000>%n" - + "to be after or equal to %n" - + " <2014-05-25T00:00:00.000000000>")); + + "Expecting:%n" + + " <2014-05-24T09:46:30.000000000>%n" + + "to be after or equal to %n" + + " <2014-05-25T00:00:00.000000000>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfterOrEqualTo_LocalDateTime_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfterOrEqualTo_LocalDateTime_Test.java index 6c5bfe97..c9ccb311 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfterOrEqualTo_LocalDateTime_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfterOrEqualTo_LocalDateTime_Test.java @@ -8,10 +8,15 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + +import java.time.LocalDateTime; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeColumnValueAssert; import org.assertj.db.api.TableColumnValueAssert; @@ -21,11 +26,6 @@ import org.assertj.db.type.Table; import org.junit.Test; -import java.time.LocalDateTime; - -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnValueChronology} class : * {@link org.assertj.db.api.assertions.AssertOnValueChronology#isAfterOrEqualTo(java.time.LocalDateTime)} method. @@ -70,20 +70,20 @@ public void should_fail_because_value_is_before() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 9 (column name : VAR10) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting:%n" - + " <2014-05-24T09:46:30.000000000>%n" - + "to be after or equal to %n" - + " <2014-05-24T09:46:31.000000000>")); + + "Expecting:%n" + + " <2014-05-24T09:46:30.000000000>%n" + + "to be after or equal to %n" + + " <2014-05-24T09:46:31.000000000>")); } try { assertThat(table).column("var10").value().isAfterOrEqualTo(LocalDateTime.of(2014, 5, 24, 9, 46, 31)); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at index 0 of Column at index 9 (column name : VAR10) of TEST table] %n" - + "Expecting:%n" - + " <2014-05-24T09:46:30.000000000>%n" - + "to be after or equal to %n" - + " <2014-05-24T09:46:31.000000000>")); + + "Expecting:%n" + + " <2014-05-24T09:46:30.000000000>%n" + + "to be after or equal to %n" + + " <2014-05-24T09:46:31.000000000>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfterOrEqualTo_LocalDate_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfterOrEqualTo_LocalDate_Test.java index 313de9f9..b4068fe9 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfterOrEqualTo_LocalDate_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfterOrEqualTo_LocalDate_Test.java @@ -8,10 +8,15 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + +import java.time.LocalDate; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeColumnValueAssert; import org.assertj.db.api.TableColumnValueAssert; @@ -21,11 +26,6 @@ import org.assertj.db.type.Table; import org.junit.Test; -import java.time.LocalDate; - -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnValueChronology} class : * {@link org.assertj.db.api.assertions.AssertOnValueChronology#isAfterOrEqualTo(java.time.LocalDate)} method. @@ -70,20 +70,20 @@ public void should_fail_because_value_is_before() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 9 (column name : VAR10) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting:%n" - + " <2014-05-24T09:46:30.000000000>%n" - + "to be after or equal to %n" - + " <2014-05-25T00:00:00.000000000>")); + + "Expecting:%n" + + " <2014-05-24T09:46:30.000000000>%n" + + "to be after or equal to %n" + + " <2014-05-25T00:00:00.000000000>")); } try { assertThat(table).column("var10").value().isAfterOrEqualTo(LocalDate.of(2014, 5, 25)); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at index 0 of Column at index 9 (column name : VAR10) of TEST table] %n" - + "Expecting:%n" - + " <2014-05-24T09:46:30.000000000>%n" - + "to be after or equal to %n" - + " <2014-05-25T00:00:00.000000000>")); + + "Expecting:%n" + + " <2014-05-24T09:46:30.000000000>%n" + + "to be after or equal to %n" + + " <2014-05-25T00:00:00.000000000>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfterOrEqualTo_LocalTime_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfterOrEqualTo_LocalTime_Test.java index a8c6063d..9e27a4fe 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfterOrEqualTo_LocalTime_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfterOrEqualTo_LocalTime_Test.java @@ -8,10 +8,15 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + +import java.time.LocalTime; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeColumnValueAssert; import org.assertj.db.api.TableColumnValueAssert; @@ -21,11 +26,6 @@ import org.assertj.db.type.Table; import org.junit.Test; -import java.time.LocalTime; - -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnValueChronology} class : * {@link org.assertj.db.api.assertions.AssertOnValueChronology#isAfterOrEqualTo(java.time.LocalTime)} method. @@ -70,20 +70,20 @@ public void should_fail_because_value_is_before() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 7 (column name : VAR8) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting:%n" - + " <09:46:30.000000000>%n" - + "to be after or equal to %n" - + " <09:46:31.000000000>")); + + "Expecting:%n" + + " <09:46:30.000000000>%n" + + "to be after or equal to %n" + + " <09:46:31.000000000>")); } try { assertThat(table).column("var8").value().isAfterOrEqualTo(LocalTime.of(9, 46, 31)); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at index 0 of Column at index 7 (column name : VAR8) of TEST table] %n" - + "Expecting:%n" - + " <09:46:30.000000000>%n" - + "to be after or equal to %n" - + " <09:46:31.000000000>")); + + "Expecting:%n" + + " <09:46:30.000000000>%n" + + "to be after or equal to %n" + + " <09:46:31.000000000>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfterOrEqualTo_String_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfterOrEqualTo_String_Test.java index f6ab9d0f..508ebe6c 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfterOrEqualTo_String_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfterOrEqualTo_String_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeColumnValueAssert; import org.assertj.db.api.TableColumnValueAssert; @@ -21,15 +24,11 @@ import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnValueChronology} class : * {@link org.assertj.db.api.assertions.AssertOnValueChronology#isAfterOrEqualTo(org.assertj.db.type.DateTimeValue)} method. * * @author Régis Pouiller - * */ public class AssertOnValueChronology_IsAfterOrEqualTo_String_Test extends AbstractTest { @@ -69,20 +68,20 @@ public void should_fail_because_value_is_before() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 9 (column name : VAR10) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting:%n" - + " <2014-05-24T09:46:30.000000000>%n" - + "to be after or equal to %n" - + " <2014-05-25T00:00:00.000000000>")); + + "Expecting:%n" + + " <2014-05-24T09:46:30.000000000>%n" + + "to be after or equal to %n" + + " <2014-05-25T00:00:00.000000000>")); } try { assertThat(table).column("var10").value().isAfterOrEqualTo("2014-05-25"); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at index 0 of Column at index 9 (column name : VAR10) of TEST table] %n" - + "Expecting:%n" - + " <2014-05-24T09:46:30.000000000>%n" - + "to be after or equal to %n" - + " <2014-05-25T00:00:00.000000000>")); + + "Expecting:%n" + + " <2014-05-24T09:46:30.000000000>%n" + + "to be after or equal to %n" + + " <2014-05-25T00:00:00.000000000>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfterOrEqualTo_TimeValue_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfterOrEqualTo_TimeValue_Test.java index a79c7513..9c754458 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfterOrEqualTo_TimeValue_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfterOrEqualTo_TimeValue_Test.java @@ -8,10 +8,15 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + +import java.text.ParseException; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeColumnValueAssert; import org.assertj.db.api.TableColumnValueAssert; @@ -22,17 +27,11 @@ import org.assertj.db.type.TimeValue; import org.junit.Test; -import java.text.ParseException; - -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnValueChronology} class : * {@link org.assertj.db.api.assertions.AssertOnValueChronology#isAfterOrEqualTo(org.assertj.db.type.TimeValue)} method. * * @author Régis Pouiller - * */ public class AssertOnValueChronology_IsAfterOrEqualTo_TimeValue_Test extends AbstractTest { @@ -49,12 +48,12 @@ public void test_is_after_or_equal_to() throws ParseException { ChangeColumnValueAssert changeColumnValueAssert = assertThat(changes).change().column("var8").valueAtEndPoint(); ChangeColumnValueAssert changeColumnValueAssert2 = changeColumnValueAssert.isAfterOrEqualTo( - TimeValue.parse("09:46:29")); + TimeValue.parse("09:46:29")); Assertions.assertThat(changeColumnValueAssert).isSameAs(changeColumnValueAssert2); TableColumnValueAssert tableColumnValueAssert = assertThat(table).column("var8").value(); TableColumnValueAssert tableColumnValueAssert2 = tableColumnValueAssert.isAfterOrEqualTo( - TimeValue.parse("09:46:29")); + TimeValue.parse("09:46:29")); Assertions.assertThat(tableColumnValueAssert).isSameAs(tableColumnValueAssert2); } @@ -74,20 +73,20 @@ public void should_fail_because_value_is_before() throws ParseException { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 7 (column name : VAR8) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting:%n" - + " <09:46:30.000000000>%n" - + "to be after or equal to %n" - + " <09:46:31.000000000>")); + + "Expecting:%n" + + " <09:46:30.000000000>%n" + + "to be after or equal to %n" + + " <09:46:31.000000000>")); } try { assertThat(table).column("var8").value().isAfterOrEqualTo(TimeValue.parse("09:46:31")); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at index 0 of Column at index 7 (column name : VAR8) of TEST table] %n" - + "Expecting:%n" - + " <09:46:30.000000000>%n" - + "to be after or equal to %n" - + " <09:46:31.000000000>")); + + "Expecting:%n" + + " <09:46:30.000000000>%n" + + "to be after or equal to %n" + + " <09:46:31.000000000>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfter_DateTimeValue_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfter_DateTimeValue_Test.java index 0a3c87cb..fc7dc21b 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfter_DateTimeValue_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfter_DateTimeValue_Test.java @@ -8,10 +8,15 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + +import java.text.ParseException; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeColumnValueAssert; import org.assertj.db.api.TableColumnValueAssert; @@ -22,17 +27,11 @@ import org.assertj.db.type.Table; import org.junit.Test; -import java.text.ParseException; - -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnValueChronology} class : * {@link org.assertj.db.api.assertions.AssertOnValueChronology#isAfter(org.assertj.db.type.DateTimeValue)} method. * * @author Régis Pouiller - * */ public class AssertOnValueChronology_IsAfter_DateTimeValue_Test extends AbstractTest { @@ -72,20 +71,20 @@ public void should_fail_because_value_is_before_or_equal_to() throws ParseExcept fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 9 (column name : VAR10) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting:%n" - + " <2014-05-24T09:46:30.000000000>%n" - + "to be after %n" - + " <2014-05-24T09:46:30.000000000>")); + + "Expecting:%n" + + " <2014-05-24T09:46:30.000000000>%n" + + "to be after %n" + + " <2014-05-24T09:46:30.000000000>")); } try { assertThat(table).column("var10").value().isAfter(DateTimeValue.parse("2014-05-24T09:46:30")); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at index 0 of Column at index 9 (column name : VAR10) of TEST table] %n" - + "Expecting:%n" - + " <2014-05-24T09:46:30.000000000>%n" - + "to be after %n" - + " <2014-05-24T09:46:30.000000000>")); + + "Expecting:%n" + + " <2014-05-24T09:46:30.000000000>%n" + + "to be after %n" + + " <2014-05-24T09:46:30.000000000>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfter_DateValue_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfter_DateValue_Test.java index 9a711688..f7e3d1ba 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfter_DateValue_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfter_DateValue_Test.java @@ -8,10 +8,15 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + +import java.text.ParseException; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeColumnValueAssert; import org.assertj.db.api.TableColumnValueAssert; @@ -22,17 +27,11 @@ import org.assertj.db.type.Table; import org.junit.Test; -import java.text.ParseException; - -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnValueChronology} class : * {@link org.assertj.db.api.assertions.AssertOnValueChronology#isAfter(org.assertj.db.type.DateValue)} method. * * @author Régis Pouiller - * */ public class AssertOnValueChronology_IsAfter_DateValue_Test extends AbstractTest { @@ -49,7 +48,7 @@ public void test_is_after() throws ParseException { ChangeColumnValueAssert changeColumnValueAssert = assertThat(changes).change().column("var10").valueAtEndPoint(); ChangeColumnValueAssert changeColumnValueAssert2 = changeColumnValueAssert.isAfter( - DateValue.parse("2014-05-24")); + DateValue.parse("2014-05-24")); Assertions.assertThat(changeColumnValueAssert).isSameAs(changeColumnValueAssert2); TableColumnValueAssert tableColumnValueAssert = assertThat(table).column("var10").value(); @@ -73,20 +72,20 @@ public void should_fail_because_value_is_before_or_equal_to() throws ParseExcept fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 9 (column name : VAR10) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting:%n" - + " <2014-05-24T09:46:30.000000000>%n" - + "to be after %n" - + " <2014-05-25T00:00:00.000000000>")); + + "Expecting:%n" + + " <2014-05-24T09:46:30.000000000>%n" + + "to be after %n" + + " <2014-05-25T00:00:00.000000000>")); } try { assertThat(table).column("var10").value().isAfter(DateValue.parse("2014-05-25")); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at index 0 of Column at index 9 (column name : VAR10) of TEST table] %n" - + "Expecting:%n" - + " <2014-05-24T09:46:30.000000000>%n" - + "to be after %n" - + " <2014-05-25T00:00:00.000000000>")); + + "Expecting:%n" + + " <2014-05-24T09:46:30.000000000>%n" + + "to be after %n" + + " <2014-05-25T00:00:00.000000000>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfter_LocalDateTime_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfter_LocalDateTime_Test.java index 53d1f349..1d73a65d 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfter_LocalDateTime_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfter_LocalDateTime_Test.java @@ -8,10 +8,15 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + +import java.time.LocalDateTime; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeColumnValueAssert; import org.assertj.db.api.TableColumnValueAssert; @@ -21,11 +26,6 @@ import org.assertj.db.type.Table; import org.junit.Test; -import java.time.LocalDateTime; - -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnValueChronology} class : * {@link org.assertj.db.api.assertions.AssertOnValueChronology#isAfter(java.time.LocalDateTime)} method. @@ -70,20 +70,20 @@ public void should_fail_because_value_is_before_or_equal_to() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 9 (column name : VAR10) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting:%n" - + " <2014-05-24T09:46:30.000000000>%n" - + "to be after %n" - + " <2014-05-24T09:46:30.000000000>")); + + "Expecting:%n" + + " <2014-05-24T09:46:30.000000000>%n" + + "to be after %n" + + " <2014-05-24T09:46:30.000000000>")); } try { assertThat(table).column("var10").value().isAfter(LocalDateTime.of(2014, 5, 24, 9, 46, 30)); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at index 0 of Column at index 9 (column name : VAR10) of TEST table] %n" - + "Expecting:%n" - + " <2014-05-24T09:46:30.000000000>%n" - + "to be after %n" - + " <2014-05-24T09:46:30.000000000>")); + + "Expecting:%n" + + " <2014-05-24T09:46:30.000000000>%n" + + "to be after %n" + + " <2014-05-24T09:46:30.000000000>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfter_LocalDate_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfter_LocalDate_Test.java index b14c2e53..09e9a9f3 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfter_LocalDate_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfter_LocalDate_Test.java @@ -8,10 +8,15 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + +import java.time.LocalDate; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeColumnValueAssert; import org.assertj.db.api.TableColumnValueAssert; @@ -21,11 +26,6 @@ import org.assertj.db.type.Table; import org.junit.Test; -import java.time.LocalDate; - -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnValueChronology} class : * {@link org.assertj.db.api.assertions.AssertOnValueChronology#isAfter(java.time.LocalDate)} method. @@ -70,20 +70,20 @@ public void should_fail_because_value_is_before_or_equal_to() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 9 (column name : VAR10) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting:%n" - + " <2014-05-24T09:46:30.000000000>%n" - + "to be after %n" - + " <2014-05-25T00:00:00.000000000>")); + + "Expecting:%n" + + " <2014-05-24T09:46:30.000000000>%n" + + "to be after %n" + + " <2014-05-25T00:00:00.000000000>")); } try { assertThat(table).column("var10").value().isAfter(LocalDate.of(2014, 5, 25)); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at index 0 of Column at index 9 (column name : VAR10) of TEST table] %n" - + "Expecting:%n" - + " <2014-05-24T09:46:30.000000000>%n" - + "to be after %n" - + " <2014-05-25T00:00:00.000000000>")); + + "Expecting:%n" + + " <2014-05-24T09:46:30.000000000>%n" + + "to be after %n" + + " <2014-05-25T00:00:00.000000000>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfter_LocalTime_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfter_LocalTime_Test.java index 6e434713..54f60a52 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfter_LocalTime_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfter_LocalTime_Test.java @@ -8,10 +8,15 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + +import java.time.LocalTime; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeColumnValueAssert; import org.assertj.db.api.TableColumnValueAssert; @@ -21,11 +26,6 @@ import org.assertj.db.type.Table; import org.junit.Test; -import java.time.LocalTime; - -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnValueChronology} class : * {@link org.assertj.db.api.assertions.AssertOnValueChronology#isAfter(java.time.LocalTime)} method. @@ -70,20 +70,20 @@ public void should_fail_because_value_is_before_or_equal_to() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 7 (column name : VAR8) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting:%n" - + " <09:46:30.000000000>%n" - + "to be after %n" - + " <09:46:30.000000000>")); + + "Expecting:%n" + + " <09:46:30.000000000>%n" + + "to be after %n" + + " <09:46:30.000000000>")); } try { assertThat(table).column("var8").value().isAfter(LocalTime.of(9, 46, 30)); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at index 0 of Column at index 7 (column name : VAR8) of TEST table] %n" - + "Expecting:%n" - + " <09:46:30.000000000>%n" - + "to be after %n" - + " <09:46:30.000000000>")); + + "Expecting:%n" + + " <09:46:30.000000000>%n" + + "to be after %n" + + " <09:46:30.000000000>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfter_String_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfter_String_Test.java index d72baddc..7160cb78 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfter_String_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfter_String_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeColumnValueAssert; import org.assertj.db.api.TableColumnValueAssert; @@ -21,15 +24,11 @@ import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnValueChronology} class : * {@link org.assertj.db.api.assertions.AssertOnValueChronology#isAfter(org.assertj.db.type.DateTimeValue)} method. * * @author Régis Pouiller - * */ public class AssertOnValueChronology_IsAfter_String_Test extends AbstractTest { @@ -69,20 +68,20 @@ public void should_fail_because_value_is_before_or_equal_to() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 9 (column name : VAR10) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting:%n" - + " <2014-05-24T09:46:30.000000000>%n" - + "to be after %n" - + " <2014-05-25T00:00:00.000000000>")); + + "Expecting:%n" + + " <2014-05-24T09:46:30.000000000>%n" + + "to be after %n" + + " <2014-05-25T00:00:00.000000000>")); } try { assertThat(table).column("var10").value().isAfter("2014-05-25"); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at index 0 of Column at index 9 (column name : VAR10) of TEST table] %n" - + "Expecting:%n" - + " <2014-05-24T09:46:30.000000000>%n" - + "to be after %n" - + " <2014-05-25T00:00:00.000000000>")); + + "Expecting:%n" + + " <2014-05-24T09:46:30.000000000>%n" + + "to be after %n" + + " <2014-05-25T00:00:00.000000000>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfter_TimeValue_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfter_TimeValue_Test.java index 953e2c3e..aa3498fe 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfter_TimeValue_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsAfter_TimeValue_Test.java @@ -8,10 +8,15 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + +import java.text.ParseException; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeColumnValueAssert; import org.assertj.db.api.TableColumnValueAssert; @@ -22,17 +27,11 @@ import org.assertj.db.type.TimeValue; import org.junit.Test; -import java.text.ParseException; - -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnValueChronology} class : * {@link org.assertj.db.api.assertions.AssertOnValueChronology#isAfter(org.assertj.db.type.TimeValue)} method. * * @author Régis Pouiller - * */ public class AssertOnValueChronology_IsAfter_TimeValue_Test extends AbstractTest { @@ -72,20 +71,20 @@ public void should_fail_because_value_is_before_or_equal_to() throws ParseExcept fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 7 (column name : VAR8) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting:%n" - + " <09:46:30.000000000>%n" - + "to be after %n" - + " <09:46:30.000000000>")); + + "Expecting:%n" + + " <09:46:30.000000000>%n" + + "to be after %n" + + " <09:46:30.000000000>")); } try { assertThat(table).column("var8").value().isAfter(TimeValue.parse("09:46:30")); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at index 0 of Column at index 7 (column name : VAR8) of TEST table] %n" - + "Expecting:%n" - + " <09:46:30.000000000>%n" - + "to be after %n" - + " <09:46:30.000000000>")); + + "Expecting:%n" + + " <09:46:30.000000000>%n" + + "to be after %n" + + " <09:46:30.000000000>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBeforeOrEqualTo_DateTimeValue_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBeforeOrEqualTo_DateTimeValue_Test.java index eb6fbfbd..a2751337 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBeforeOrEqualTo_DateTimeValue_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBeforeOrEqualTo_DateTimeValue_Test.java @@ -8,10 +8,15 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + +import java.text.ParseException; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeColumnValueAssert; import org.assertj.db.api.TableColumnValueAssert; @@ -22,17 +27,11 @@ import org.assertj.db.type.Table; import org.junit.Test; -import java.text.ParseException; - -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnValueChronology} class : * {@link org.assertj.db.api.assertions.AssertOnValueChronology#isBeforeOrEqualTo(org.assertj.db.type.DateTimeValue)} method. * * @author Régis Pouiller - * */ public class AssertOnValueChronology_IsBeforeOrEqualTo_DateTimeValue_Test extends AbstractTest { @@ -53,7 +52,7 @@ public void test_is_before_or_equal_to() throws ParseException { TableColumnValueAssert tableColumnValueAssert = assertThat(table).column("var10").value(); TableColumnValueAssert tableColumnValueAssert2 = tableColumnValueAssert.isBeforeOrEqualTo( - DateTimeValue.parse("2014-05-24T09:46:30")); + DateTimeValue.parse("2014-05-24T09:46:30")); Assertions.assertThat(tableColumnValueAssert).isSameAs(tableColumnValueAssert2); } @@ -73,20 +72,20 @@ public void should_fail_because_value_is_after() throws ParseException { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 9 (column name : VAR10) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting:%n" - + " <2014-05-24T09:46:30.000000000>%n" - + "to be before or equal to %n" - + " <2014-05-24T09:46:29.000000000>")); + + "Expecting:%n" + + " <2014-05-24T09:46:30.000000000>%n" + + "to be before or equal to %n" + + " <2014-05-24T09:46:29.000000000>")); } try { assertThat(table).column("var10").value().isBeforeOrEqualTo(DateTimeValue.parse("2014-05-24T09:46:29")); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at index 0 of Column at index 9 (column name : VAR10) of TEST table] %n" - + "Expecting:%n" - + " <2014-05-24T09:46:30.000000000>%n" - + "to be before or equal to %n" - + " <2014-05-24T09:46:29.000000000>")); + + "Expecting:%n" + + " <2014-05-24T09:46:30.000000000>%n" + + "to be before or equal to %n" + + " <2014-05-24T09:46:29.000000000>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBeforeOrEqualTo_DateValue_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBeforeOrEqualTo_DateValue_Test.java index 806f3ada..aedf5558 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBeforeOrEqualTo_DateValue_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBeforeOrEqualTo_DateValue_Test.java @@ -8,10 +8,15 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + +import java.text.ParseException; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeColumnValueAssert; import org.assertj.db.api.TableColumnValueAssert; @@ -22,17 +27,11 @@ import org.assertj.db.type.Table; import org.junit.Test; -import java.text.ParseException; - -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnValueChronology} class : * {@link org.assertj.db.api.assertions.AssertOnValueChronology#isBeforeOrEqualTo(org.assertj.db.type.DateValue)} method. * * @author Régis Pouiller - * */ public class AssertOnValueChronology_IsBeforeOrEqualTo_DateValue_Test extends AbstractTest { @@ -49,12 +48,12 @@ public void test_is_before_or_equal_to() throws ParseException { ChangeColumnValueAssert changeColumnValueAssert = assertThat(changes).change().column("var10").valueAtEndPoint(); ChangeColumnValueAssert changeColumnValueAssert2 = changeColumnValueAssert.isBeforeOrEqualTo( - DateValue.parse("2014-05-25")); + DateValue.parse("2014-05-25")); Assertions.assertThat(changeColumnValueAssert).isSameAs(changeColumnValueAssert2); TableColumnValueAssert tableColumnValueAssert = assertThat(table).column("var10").value(); TableColumnValueAssert tableColumnValueAssert2 = tableColumnValueAssert.isBeforeOrEqualTo( - DateValue.parse("2014-05-25")); + DateValue.parse("2014-05-25")); Assertions.assertThat(tableColumnValueAssert).isSameAs(tableColumnValueAssert2); } @@ -74,20 +73,20 @@ public void should_fail_because_value_is_after() throws ParseException { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 9 (column name : VAR10) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting:%n" - + " <2014-05-24T09:46:30.000000000>%n" - + "to be before or equal to %n" - + " <2014-05-24T00:00:00.000000000>")); + + "Expecting:%n" + + " <2014-05-24T09:46:30.000000000>%n" + + "to be before or equal to %n" + + " <2014-05-24T00:00:00.000000000>")); } try { assertThat(table).column("var10").value().isBeforeOrEqualTo(DateValue.parse("2014-05-24")); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at index 0 of Column at index 9 (column name : VAR10) of TEST table] %n" - + "Expecting:%n" - + " <2014-05-24T09:46:30.000000000>%n" - + "to be before or equal to %n" - + " <2014-05-24T00:00:00.000000000>")); + + "Expecting:%n" + + " <2014-05-24T09:46:30.000000000>%n" + + "to be before or equal to %n" + + " <2014-05-24T00:00:00.000000000>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBeforeOrEqualTo_LocalDateTime_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBeforeOrEqualTo_LocalDateTime_Test.java index 6b5423aa..271d1783 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBeforeOrEqualTo_LocalDateTime_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBeforeOrEqualTo_LocalDateTime_Test.java @@ -8,10 +8,15 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + +import java.time.LocalDateTime; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeColumnValueAssert; import org.assertj.db.api.TableColumnValueAssert; @@ -21,11 +26,6 @@ import org.assertj.db.type.Table; import org.junit.Test; -import java.time.LocalDateTime; - -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnValueChronology} class : * {@link org.assertj.db.api.assertions.AssertOnValueChronology#isBeforeOrEqualTo(java.time.LocalDateTime)} method. @@ -70,20 +70,20 @@ public void should_fail_because_value_is_after() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 9 (column name : VAR10) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting:%n" - + " <2014-05-24T09:46:30.000000000>%n" - + "to be before or equal to %n" - + " <2014-05-24T09:46:29.000000000>")); + + "Expecting:%n" + + " <2014-05-24T09:46:30.000000000>%n" + + "to be before or equal to %n" + + " <2014-05-24T09:46:29.000000000>")); } try { assertThat(table).column("var10").value().isBeforeOrEqualTo(LocalDateTime.of(2014, 5, 24, 9, 46, 29)); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at index 0 of Column at index 9 (column name : VAR10) of TEST table] %n" - + "Expecting:%n" - + " <2014-05-24T09:46:30.000000000>%n" - + "to be before or equal to %n" - + " <2014-05-24T09:46:29.000000000>")); + + "Expecting:%n" + + " <2014-05-24T09:46:30.000000000>%n" + + "to be before or equal to %n" + + " <2014-05-24T09:46:29.000000000>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBeforeOrEqualTo_LocalDate_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBeforeOrEqualTo_LocalDate_Test.java index 40330232..fe45307f 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBeforeOrEqualTo_LocalDate_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBeforeOrEqualTo_LocalDate_Test.java @@ -8,10 +8,15 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + +import java.time.LocalDate; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeColumnValueAssert; import org.assertj.db.api.TableColumnValueAssert; @@ -21,11 +26,6 @@ import org.assertj.db.type.Table; import org.junit.Test; -import java.time.LocalDate; - -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnValueChronology} class : * {@link org.assertj.db.api.assertions.AssertOnValueChronology#isBeforeOrEqualTo(java.time.LocalDate)} method. @@ -70,20 +70,20 @@ public void should_fail_because_value_is_after() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 9 (column name : VAR10) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting:%n" - + " <2014-05-24T09:46:30.000000000>%n" - + "to be before or equal to %n" - + " <2014-05-24T00:00:00.000000000>")); + + "Expecting:%n" + + " <2014-05-24T09:46:30.000000000>%n" + + "to be before or equal to %n" + + " <2014-05-24T00:00:00.000000000>")); } try { assertThat(table).column("var10").value().isBeforeOrEqualTo(LocalDate.of(2014, 5, 24)); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at index 0 of Column at index 9 (column name : VAR10) of TEST table] %n" - + "Expecting:%n" - + " <2014-05-24T09:46:30.000000000>%n" - + "to be before or equal to %n" - + " <2014-05-24T00:00:00.000000000>")); + + "Expecting:%n" + + " <2014-05-24T09:46:30.000000000>%n" + + "to be before or equal to %n" + + " <2014-05-24T00:00:00.000000000>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBeforeOrEqualTo_LocalTime_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBeforeOrEqualTo_LocalTime_Test.java index 2ca0df48..3b5f9e22 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBeforeOrEqualTo_LocalTime_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBeforeOrEqualTo_LocalTime_Test.java @@ -8,10 +8,15 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + +import java.time.LocalTime; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeColumnValueAssert; import org.assertj.db.api.TableColumnValueAssert; @@ -21,11 +26,6 @@ import org.assertj.db.type.Table; import org.junit.Test; -import java.time.LocalTime; - -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnValueChronology} class : * {@link org.assertj.db.api.assertions.AssertOnValueChronology#isBeforeOrEqualTo(java.time.LocalTime)} method. @@ -70,20 +70,20 @@ public void should_fail_because_value_is_after() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 7 (column name : VAR8) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting:%n" - + " <09:46:30.000000000>%n" - + "to be before or equal to %n" - + " <09:46:29.000000000>")); + + "Expecting:%n" + + " <09:46:30.000000000>%n" + + "to be before or equal to %n" + + " <09:46:29.000000000>")); } try { assertThat(table).column("var8").value().isBeforeOrEqualTo(LocalTime.of(9, 46, 29)); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at index 0 of Column at index 7 (column name : VAR8) of TEST table] %n" - + "Expecting:%n" - + " <09:46:30.000000000>%n" - + "to be before or equal to %n" - + " <09:46:29.000000000>")); + + "Expecting:%n" + + " <09:46:30.000000000>%n" + + "to be before or equal to %n" + + " <09:46:29.000000000>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBeforeOrEqualTo_String_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBeforeOrEqualTo_String_Test.java index 190cc0c8..c8492dc6 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBeforeOrEqualTo_String_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBeforeOrEqualTo_String_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeColumnValueAssert; import org.assertj.db.api.TableColumnValueAssert; @@ -21,15 +24,11 @@ import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnValueChronology} class : * {@link org.assertj.db.api.assertions.AssertOnValueChronology#isBeforeOrEqualTo(org.assertj.db.type.DateTimeValue)} method. * * @author Régis Pouiller - * */ public class AssertOnValueChronology_IsBeforeOrEqualTo_String_Test extends AbstractTest { @@ -69,20 +68,20 @@ public void should_fail_because_value_is_after() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 9 (column name : VAR10) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting:%n" - + " <2014-05-24T09:46:30.000000000>%n" - + "to be before or equal to %n" - + " <2014-05-24T00:00:00.000000000>")); + + "Expecting:%n" + + " <2014-05-24T09:46:30.000000000>%n" + + "to be before or equal to %n" + + " <2014-05-24T00:00:00.000000000>")); } try { assertThat(table).column("var10").value().isBeforeOrEqualTo("2014-05-24"); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at index 0 of Column at index 9 (column name : VAR10) of TEST table] %n" - + "Expecting:%n" - + " <2014-05-24T09:46:30.000000000>%n" - + "to be before or equal to %n" - + " <2014-05-24T00:00:00.000000000>")); + + "Expecting:%n" + + " <2014-05-24T09:46:30.000000000>%n" + + "to be before or equal to %n" + + " <2014-05-24T00:00:00.000000000>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBeforeOrEqualTo_TimeValue_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBeforeOrEqualTo_TimeValue_Test.java index baa7476b..1d3e2d44 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBeforeOrEqualTo_TimeValue_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBeforeOrEqualTo_TimeValue_Test.java @@ -8,10 +8,15 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + +import java.text.ParseException; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeColumnValueAssert; import org.assertj.db.api.TableColumnValueAssert; @@ -22,17 +27,11 @@ import org.assertj.db.type.TimeValue; import org.junit.Test; -import java.text.ParseException; - -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnValueChronology} class : * {@link org.assertj.db.api.assertions.AssertOnValueChronology#isBeforeOrEqualTo(org.assertj.db.type.TimeValue)} method. * * @author Régis Pouiller - * */ public class AssertOnValueChronology_IsBeforeOrEqualTo_TimeValue_Test extends AbstractTest { @@ -49,12 +48,12 @@ public void test_is_before_or_equal_to() throws ParseException { ChangeColumnValueAssert changeColumnValueAssert = assertThat(changes).change().column("var8").valueAtEndPoint(); ChangeColumnValueAssert changeColumnValueAssert2 = changeColumnValueAssert.isBeforeOrEqualTo( - TimeValue.parse("09:46:30")); + TimeValue.parse("09:46:30")); Assertions.assertThat(changeColumnValueAssert).isSameAs(changeColumnValueAssert2); TableColumnValueAssert tableColumnValueAssert = assertThat(table).column("var8").value(); TableColumnValueAssert tableColumnValueAssert2 = tableColumnValueAssert.isBeforeOrEqualTo( - TimeValue.parse("09:46:30")); + TimeValue.parse("09:46:30")); Assertions.assertThat(tableColumnValueAssert).isSameAs(tableColumnValueAssert2); } @@ -74,20 +73,20 @@ public void should_fail_because_value_is_after() throws ParseException { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 7 (column name : VAR8) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting:%n" - + " <09:46:30.000000000>%n" - + "to be before or equal to %n" - + " <09:46:29.000000000>")); + + "Expecting:%n" + + " <09:46:30.000000000>%n" + + "to be before or equal to %n" + + " <09:46:29.000000000>")); } try { assertThat(table).column("var8").value().isBeforeOrEqualTo(TimeValue.parse("09:46:29")); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at index 0 of Column at index 7 (column name : VAR8) of TEST table] %n" - + "Expecting:%n" - + " <09:46:30.000000000>%n" - + "to be before or equal to %n" - + " <09:46:29.000000000>")); + + "Expecting:%n" + + " <09:46:30.000000000>%n" + + "to be before or equal to %n" + + " <09:46:29.000000000>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBefore_DateTimeValue_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBefore_DateTimeValue_Test.java index 4c174a85..840d67a3 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBefore_DateTimeValue_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBefore_DateTimeValue_Test.java @@ -8,10 +8,15 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + +import java.text.ParseException; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeColumnValueAssert; import org.assertj.db.api.TableColumnValueAssert; @@ -22,17 +27,11 @@ import org.assertj.db.type.Table; import org.junit.Test; -import java.text.ParseException; - -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnValueChronology} class : * {@link org.assertj.db.api.assertions.AssertOnValueChronology#isBefore(org.assertj.db.type.DateTimeValue)} method. * * @author Régis Pouiller - * */ public class AssertOnValueChronology_IsBefore_DateTimeValue_Test extends AbstractTest { @@ -49,12 +48,12 @@ public void test_is_before() throws ParseException { ChangeColumnValueAssert changeColumnValueAssert = assertThat(changes).change().column("var10").valueAtEndPoint(); ChangeColumnValueAssert changeColumnValueAssert2 = changeColumnValueAssert.isBefore( - DateTimeValue.parse("2014-05-24T09:46:31")); + DateTimeValue.parse("2014-05-24T09:46:31")); Assertions.assertThat(changeColumnValueAssert).isSameAs(changeColumnValueAssert2); TableColumnValueAssert tableColumnValueAssert = assertThat(table).column("var10").value(); TableColumnValueAssert tableColumnValueAssert2 = tableColumnValueAssert.isBefore( - DateTimeValue.parse("2014-05-24T09:46:31")); + DateTimeValue.parse("2014-05-24T09:46:31")); Assertions.assertThat(tableColumnValueAssert).isSameAs(tableColumnValueAssert2); } @@ -71,24 +70,24 @@ public void should_fail_because_value_is_after_or_equal_to() throws ParseExcepti try { assertThat(changes).change().column("var10").valueAtEndPoint().isBefore( - DateTimeValue.parse("2014-05-24T09:46:30")); + DateTimeValue.parse("2014-05-24T09:46:30")); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 9 (column name : VAR10) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting:%n" - + " <2014-05-24T09:46:30.000000000>%n" - + "to be before %n" - + " <2014-05-24T09:46:30.000000000>")); + + "Expecting:%n" + + " <2014-05-24T09:46:30.000000000>%n" + + "to be before %n" + + " <2014-05-24T09:46:30.000000000>")); } try { assertThat(table).column("var10").value().isBefore(DateTimeValue.parse("2014-05-24T09:46:30")); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at index 0 of Column at index 9 (column name : VAR10) of TEST table] %n" - + "Expecting:%n" - + " <2014-05-24T09:46:30.000000000>%n" - + "to be before %n" - + " <2014-05-24T09:46:30.000000000>")); + + "Expecting:%n" + + " <2014-05-24T09:46:30.000000000>%n" + + "to be before %n" + + " <2014-05-24T09:46:30.000000000>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBefore_DateValue_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBefore_DateValue_Test.java index 70616737..57812d72 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBefore_DateValue_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBefore_DateValue_Test.java @@ -8,10 +8,15 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + +import java.text.ParseException; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeColumnValueAssert; import org.assertj.db.api.TableColumnValueAssert; @@ -22,17 +27,11 @@ import org.assertj.db.type.Table; import org.junit.Test; -import java.text.ParseException; - -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnValueChronology} class : * {@link org.assertj.db.api.assertions.AssertOnValueChronology#isBefore(org.assertj.db.type.DateValue)} method. * * @author Régis Pouiller - * */ public class AssertOnValueChronology_IsBefore_DateValue_Test extends AbstractTest { @@ -49,7 +48,7 @@ public void test_is_before() throws ParseException { ChangeColumnValueAssert changeColumnValueAssert = assertThat(changes).change().column("var10").valueAtEndPoint(); ChangeColumnValueAssert changeColumnValueAssert2 = changeColumnValueAssert.isBefore( - DateValue.parse("2014-05-25")); + DateValue.parse("2014-05-25")); Assertions.assertThat(changeColumnValueAssert).isSameAs(changeColumnValueAssert2); TableColumnValueAssert tableColumnValueAssert = assertThat(table).column("var10").value(); @@ -73,20 +72,20 @@ public void should_fail_because_value_is_after_or_equal_to() throws ParseExcepti fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 9 (column name : VAR10) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting:%n" - + " <2014-05-24T09:46:30.000000000>%n" - + "to be before %n" - + " <2014-05-24T00:00:00.000000000>")); + + "Expecting:%n" + + " <2014-05-24T09:46:30.000000000>%n" + + "to be before %n" + + " <2014-05-24T00:00:00.000000000>")); } try { assertThat(table).column("var10").value().isBefore(DateValue.parse("2014-05-24")); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at index 0 of Column at index 9 (column name : VAR10) of TEST table] %n" - + "Expecting:%n" - + " <2014-05-24T09:46:30.000000000>%n" - + "to be before %n" - + " <2014-05-24T00:00:00.000000000>")); + + "Expecting:%n" + + " <2014-05-24T09:46:30.000000000>%n" + + "to be before %n" + + " <2014-05-24T00:00:00.000000000>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBefore_LocalDateTime_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBefore_LocalDateTime_Test.java index d59a97e2..ee80bc61 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBefore_LocalDateTime_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBefore_LocalDateTime_Test.java @@ -8,10 +8,15 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + +import java.time.LocalDateTime; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeColumnValueAssert; import org.assertj.db.api.TableColumnValueAssert; @@ -21,11 +26,6 @@ import org.assertj.db.type.Table; import org.junit.Test; -import java.time.LocalDateTime; - -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnValueChronology} class : * {@link org.assertj.db.api.assertions.AssertOnValueChronology#isBefore(java.time.LocalDateTime)} method. @@ -70,20 +70,20 @@ public void should_fail_because_value_is_after_or_equal_to() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 9 (column name : VAR10) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting:%n" - + " <2014-05-24T09:46:30.000000000>%n" - + "to be before %n" - + " <2014-05-24T09:46:30.000000000>")); + + "Expecting:%n" + + " <2014-05-24T09:46:30.000000000>%n" + + "to be before %n" + + " <2014-05-24T09:46:30.000000000>")); } try { assertThat(table).column("var10").value().isBefore(LocalDateTime.of(2014, 5, 24, 9, 46, 30)); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at index 0 of Column at index 9 (column name : VAR10) of TEST table] %n" - + "Expecting:%n" - + " <2014-05-24T09:46:30.000000000>%n" - + "to be before %n" - + " <2014-05-24T09:46:30.000000000>")); + + "Expecting:%n" + + " <2014-05-24T09:46:30.000000000>%n" + + "to be before %n" + + " <2014-05-24T09:46:30.000000000>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBefore_LocalDate_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBefore_LocalDate_Test.java index 4623b434..fcc5fd82 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBefore_LocalDate_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBefore_LocalDate_Test.java @@ -8,10 +8,15 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + +import java.time.LocalDate; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeColumnValueAssert; import org.assertj.db.api.TableColumnValueAssert; @@ -21,11 +26,6 @@ import org.assertj.db.type.Table; import org.junit.Test; -import java.time.LocalDate; - -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnValueChronology} class : * {@link org.assertj.db.api.assertions.AssertOnValueChronology#isBefore(java.time.LocalDate)} method. @@ -70,20 +70,20 @@ public void should_fail_because_value_is_after_or_equal_to() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 9 (column name : VAR10) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting:%n" - + " <2014-05-24T09:46:30.000000000>%n" - + "to be before %n" - + " <2014-05-24T00:00:00.000000000>")); + + "Expecting:%n" + + " <2014-05-24T09:46:30.000000000>%n" + + "to be before %n" + + " <2014-05-24T00:00:00.000000000>")); } try { assertThat(table).column("var10").value().isBefore(LocalDate.of(2014, 5, 24)); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at index 0 of Column at index 9 (column name : VAR10) of TEST table] %n" - + "Expecting:%n" - + " <2014-05-24T09:46:30.000000000>%n" - + "to be before %n" - + " <2014-05-24T00:00:00.000000000>")); + + "Expecting:%n" + + " <2014-05-24T09:46:30.000000000>%n" + + "to be before %n" + + " <2014-05-24T00:00:00.000000000>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBefore_LocalTime_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBefore_LocalTime_Test.java index f2214d2c..5f4bfa40 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBefore_LocalTime_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBefore_LocalTime_Test.java @@ -8,10 +8,15 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + +import java.time.LocalTime; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeColumnValueAssert; import org.assertj.db.api.TableColumnValueAssert; @@ -21,11 +26,6 @@ import org.assertj.db.type.Table; import org.junit.Test; -import java.time.LocalTime; - -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnValueChronology} class : * {@link org.assertj.db.api.assertions.AssertOnValueChronology#isBefore(java.time.LocalTime)} method. @@ -70,20 +70,20 @@ public void should_fail_because_value_is_after_or_equal_to() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 7 (column name : VAR8) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting:%n" - + " <09:46:30.000000000>%n" - + "to be before %n" - + " <09:46:30.000000000>")); + + "Expecting:%n" + + " <09:46:30.000000000>%n" + + "to be before %n" + + " <09:46:30.000000000>")); } try { assertThat(table).column("var8").value().isBefore(LocalTime.of(9, 46, 30)); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at index 0 of Column at index 7 (column name : VAR8) of TEST table] %n" - + "Expecting:%n" - + " <09:46:30.000000000>%n" - + "to be before %n" - + " <09:46:30.000000000>")); + + "Expecting:%n" + + " <09:46:30.000000000>%n" + + "to be before %n" + + " <09:46:30.000000000>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBefore_String_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBefore_String_Test.java index c18e7840..70e34457 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBefore_String_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBefore_String_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeColumnValueAssert; import org.assertj.db.api.TableColumnValueAssert; @@ -21,15 +24,11 @@ import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnValueChronology} class : * {@link org.assertj.db.api.assertions.AssertOnValueChronology#isBefore(org.assertj.db.type.DateTimeValue)} method. * * @author Régis Pouiller - * */ public class AssertOnValueChronology_IsBefore_String_Test extends AbstractTest { @@ -69,20 +68,20 @@ public void should_fail_because_value_is_after_or_equal_to() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 9 (column name : VAR10) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting:%n" - + " <2014-05-24T09:46:30.000000000>%n" - + "to be before %n" - + " <2014-05-24T00:00:00.000000000>")); + + "Expecting:%n" + + " <2014-05-24T09:46:30.000000000>%n" + + "to be before %n" + + " <2014-05-24T00:00:00.000000000>")); } try { assertThat(table).column("var10").value().isBefore("2014-05-24"); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at index 0 of Column at index 9 (column name : VAR10) of TEST table] %n" - + "Expecting:%n" - + " <2014-05-24T09:46:30.000000000>%n" - + "to be before %n" - + " <2014-05-24T00:00:00.000000000>")); + + "Expecting:%n" + + " <2014-05-24T09:46:30.000000000>%n" + + "to be before %n" + + " <2014-05-24T00:00:00.000000000>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBefore_TimeValue_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBefore_TimeValue_Test.java index f4b103b7..1a00d7d5 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBefore_TimeValue_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueChronology_IsBefore_TimeValue_Test.java @@ -8,10 +8,15 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + +import java.text.ParseException; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeColumnValueAssert; import org.assertj.db.api.TableColumnValueAssert; @@ -22,17 +27,11 @@ import org.assertj.db.type.TimeValue; import org.junit.Test; -import java.text.ParseException; - -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnValueChronology} class : * {@link org.assertj.db.api.assertions.AssertOnValueChronology#isBefore(org.assertj.db.type.TimeValue)} method. * * @author Régis Pouiller - * */ public class AssertOnValueChronology_IsBefore_TimeValue_Test extends AbstractTest { @@ -72,20 +71,20 @@ public void should_fail_because_value_is_after_or_equal_to() throws ParseExcepti fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 7 (column name : VAR8) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting:%n" - + " <09:46:30.000000000>%n" - + "to be before %n" - + " <09:46:30.000000000>")); + + "Expecting:%n" + + " <09:46:30.000000000>%n" + + "to be before %n" + + " <09:46:30.000000000>")); } try { assertThat(table).column("var8").value().isBefore(TimeValue.parse("09:46:30")); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at index 0 of Column at index 7 (column name : VAR8) of TEST table] %n" - + "Expecting:%n" - + " <09:46:30.000000000>%n" - + "to be before %n" - + " <09:46:30.000000000>")); + + "Expecting:%n" + + " <09:46:30.000000000>%n" + + "to be before %n" + + " <09:46:30.000000000>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueClass_IsOfClass_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueClass_IsOfClass_Test.java index 88835d2a..f5d61c90 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueClass_IsOfClass_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueClass_IsOfClass_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeColumnValueAssert; import org.assertj.db.api.TableColumnValueAssert; @@ -21,15 +24,11 @@ import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnValueType} class : * {@link org.assertj.db.api.assertions.AssertOnValueClass#isOfClass(Class)} method. * * @author Régis Pouiller - * */ public class AssertOnValueClass_IsOfClass_Test extends AbstractTest { @@ -69,24 +68,24 @@ public void should_fail_because_value_is_not_of_type() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 0 (column name : VAR1) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting:%n" - + " <1>%n" - + "to be of class%n" - + " %n" - + "but was of class%n" - + " ")); + + "Expecting:%n" + + " <1>%n" + + "to be of class%n" + + " %n" + + "but was of class%n" + + " ")); } try { assertThat(table).column("var1").value().isOfClass(Boolean.class); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at index 0 of Column at index 0 (column name : VAR1) of TEST table] %n" - + "Expecting:%n" - + " <1>%n" - + "to be of class%n" - + " %n" - + "but was of class%n" - + " ")); + + "Expecting:%n" + + " <1>%n" + + "to be of class%n" + + " %n" + + "but was of class%n" + + " ")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueCloseness_IsCloseTo_DateTimeValue_DateTimeValue_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueCloseness_IsCloseTo_DateTimeValue_DateTimeValue_Test.java index 39bd7de3..c1e89d53 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueCloseness_IsCloseTo_DateTimeValue_DateTimeValue_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueCloseness_IsCloseTo_DateTimeValue_DateTimeValue_Test.java @@ -8,27 +8,30 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeColumnValueAssert; import org.assertj.db.api.TableColumnValueAssert; import org.assertj.db.common.AbstractTest; import org.assertj.db.common.NeedReload; -import org.assertj.db.type.*; +import org.assertj.db.type.Changes; +import org.assertj.db.type.DateTimeValue; +import org.assertj.db.type.DateValue; +import org.assertj.db.type.Table; +import org.assertj.db.type.TimeValue; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnValueCloseness} class : * {@link org.assertj.db.api.assertions.AssertOnValueCloseness#isCloseTo(org.assertj.db.type.DateTimeValue, org.assertj.db.type.DateTimeValue)} method. * * @author Régis Pouiller - * */ public class AssertOnValueCloseness_IsCloseTo_DateTimeValue_DateTimeValue_Test extends AbstractTest { @@ -45,13 +48,13 @@ public void test_is_close_to() { ChangeColumnValueAssert changeColumnValueAssert = assertThat(changes).change().column("var10").valueAtEndPoint(); ChangeColumnValueAssert changeColumnValueAssert2 = changeColumnValueAssert.isCloseTo( - DateTimeValue.of(DateValue.of(2014, 5, 24), TimeValue - .of(9, 46, 30)), DateTimeValue.of(DateValue.of(0, 0, 0))); + DateTimeValue.of(DateValue.of(2014, 5, 24), TimeValue + .of(9, 46, 30)), DateTimeValue.of(DateValue.of(0, 0, 0))); Assertions.assertThat(changeColumnValueAssert).isSameAs(changeColumnValueAssert2); TableColumnValueAssert tableColumnValueAssert = assertThat(table).column("var10").value(); TableColumnValueAssert tableColumnValueAssert2 = tableColumnValueAssert.isCloseTo( - DateTimeValue.of(DateValue.of(2014, 5, 24), TimeValue.of(9, 46, 30)), DateTimeValue.of(DateValue.of(0, 0, 0))); + DateTimeValue.of(DateValue.of(2014, 5, 24), TimeValue.of(9, 46, 30)), DateTimeValue.of(DateValue.of(0, 0, 0))); Assertions.assertThat(tableColumnValueAssert).isSameAs(tableColumnValueAssert2); } @@ -68,27 +71,27 @@ public void should_fail_because_value_is_not_close_to() { try { assertThat(changes).change().column("var10").valueAtEndPoint().isCloseTo( - DateTimeValue.of(DateValue.of(2014, 5, 24), TimeValue.of(9, 46, 31)), DateTimeValue.of(DateValue.of(0, 0, 0))); + DateTimeValue.of(DateValue.of(2014, 5, 24), TimeValue.of(9, 46, 31)), DateTimeValue.of(DateValue.of(0, 0, 0))); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 9 (column name : VAR10) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting:%n" - + " <2014-05-24T09:46:30.000000000>%n" - + "to be close to: %n" - + " <2014-05-24T09:46:31.000000000> %n" - + " with tolerance < 0-00-00T00:00:00.000000000>")); + + "Expecting:%n" + + " <2014-05-24T09:46:30.000000000>%n" + + "to be close to: %n" + + " <2014-05-24T09:46:31.000000000> %n" + + " with tolerance < 0-00-00T00:00:00.000000000>")); } try { assertThat(table).column("var10").value().isCloseTo( - DateTimeValue.of(DateValue.of(2014, 5, 24), TimeValue.of(9, 46, 31)), DateTimeValue.of(DateValue.of(0, 0, 0))); + DateTimeValue.of(DateValue.of(2014, 5, 24), TimeValue.of(9, 46, 31)), DateTimeValue.of(DateValue.of(0, 0, 0))); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at index 0 of Column at index 9 (column name : VAR10) of TEST table] %n" - + "Expecting:%n" - + " <2014-05-24T09:46:30.000000000>%n" - + "to be close to: %n" - + " <2014-05-24T09:46:31.000000000> %n" - + " with tolerance < 0-00-00T00:00:00.000000000>")); + + "Expecting:%n" + + " <2014-05-24T09:46:30.000000000>%n" + + "to be close to: %n" + + " <2014-05-24T09:46:31.000000000> %n" + + " with tolerance < 0-00-00T00:00:00.000000000>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueCloseness_IsCloseTo_DateTimeValue_DateValue_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueCloseness_IsCloseTo_DateTimeValue_DateValue_Test.java index 37888123..dd91b910 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueCloseness_IsCloseTo_DateTimeValue_DateValue_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueCloseness_IsCloseTo_DateTimeValue_DateValue_Test.java @@ -8,27 +8,30 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeColumnValueAssert; import org.assertj.db.api.TableColumnValueAssert; import org.assertj.db.common.AbstractTest; import org.assertj.db.common.NeedReload; -import org.assertj.db.type.*; +import org.assertj.db.type.Changes; +import org.assertj.db.type.DateTimeValue; +import org.assertj.db.type.DateValue; +import org.assertj.db.type.Table; +import org.assertj.db.type.TimeValue; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnValueCloseness} class : * {@link org.assertj.db.api.assertions.AssertOnValueCloseness#isCloseTo(org.assertj.db.type.DateTimeValue, org.assertj.db.type.DateValue)} method. * * @author Régis Pouiller - * */ public class AssertOnValueCloseness_IsCloseTo_DateTimeValue_DateValue_Test extends AbstractTest { @@ -45,13 +48,13 @@ public void test_is_close_to() { ChangeColumnValueAssert changeColumnValueAssert = assertThat(changes).change().column("var10").valueAtEndPoint(); ChangeColumnValueAssert changeColumnValueAssert2 = changeColumnValueAssert.isCloseTo( - DateTimeValue.of(DateValue.of(2014, 5, 24), TimeValue - .of(9, 46, 30)), DateValue.of(0, 0, 0)); + DateTimeValue.of(DateValue.of(2014, 5, 24), TimeValue + .of(9, 46, 30)), DateValue.of(0, 0, 0)); Assertions.assertThat(changeColumnValueAssert).isSameAs(changeColumnValueAssert2); TableColumnValueAssert tableColumnValueAssert = assertThat(table).column("var10").value(); TableColumnValueAssert tableColumnValueAssert2 = tableColumnValueAssert.isCloseTo( - DateTimeValue.of(DateValue.of(2014, 5, 24), TimeValue.of(9, 46, 30)), DateValue.of(0, 0, 0)); + DateTimeValue.of(DateValue.of(2014, 5, 24), TimeValue.of(9, 46, 30)), DateValue.of(0, 0, 0)); Assertions.assertThat(tableColumnValueAssert).isSameAs(tableColumnValueAssert2); } @@ -68,27 +71,27 @@ public void should_fail_because_value_is_not_close_to() { try { assertThat(changes).change().column("var10").valueAtEndPoint().isCloseTo( - DateTimeValue.of(DateValue.of(2014, 5, 24), TimeValue.of(9, 46, 31)), DateValue.of(0, 0, 0)); + DateTimeValue.of(DateValue.of(2014, 5, 24), TimeValue.of(9, 46, 31)), DateValue.of(0, 0, 0)); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 9 (column name : VAR10) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting:%n" - + " <2014-05-24T09:46:30.000000000>%n" - + "to be close to: %n" - + " <2014-05-24T09:46:31.000000000> %n" - + " with tolerance < 0-00-00>")); + + "Expecting:%n" + + " <2014-05-24T09:46:30.000000000>%n" + + "to be close to: %n" + + " <2014-05-24T09:46:31.000000000> %n" + + " with tolerance < 0-00-00>")); } try { assertThat(table).column("var10").value().isCloseTo( - DateTimeValue.of(DateValue.of(2014, 5, 24), TimeValue.of(9, 46, 31)), DateValue.of(0, 0, 0)); + DateTimeValue.of(DateValue.of(2014, 5, 24), TimeValue.of(9, 46, 31)), DateValue.of(0, 0, 0)); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at index 0 of Column at index 9 (column name : VAR10) of TEST table] %n" - + "Expecting:%n" - + " <2014-05-24T09:46:30.000000000>%n" - + "to be close to: %n" - + " <2014-05-24T09:46:31.000000000> %n" - + " with tolerance < 0-00-00>")); + + "Expecting:%n" + + " <2014-05-24T09:46:30.000000000>%n" + + "to be close to: %n" + + " <2014-05-24T09:46:31.000000000> %n" + + " with tolerance < 0-00-00>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueCloseness_IsCloseTo_DateTimeValue_TimeValue_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueCloseness_IsCloseTo_DateTimeValue_TimeValue_Test.java index 57b8aacd..6a12db9d 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueCloseness_IsCloseTo_DateTimeValue_TimeValue_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueCloseness_IsCloseTo_DateTimeValue_TimeValue_Test.java @@ -8,27 +8,30 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeColumnValueAssert; import org.assertj.db.api.TableColumnValueAssert; import org.assertj.db.common.AbstractTest; import org.assertj.db.common.NeedReload; -import org.assertj.db.type.*; +import org.assertj.db.type.Changes; +import org.assertj.db.type.DateTimeValue; +import org.assertj.db.type.DateValue; +import org.assertj.db.type.Table; +import org.assertj.db.type.TimeValue; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnValueCloseness} class : * {@link org.assertj.db.api.assertions.AssertOnValueCloseness#isCloseTo(org.assertj.db.type.DateTimeValue, org.assertj.db.type.TimeValue)} method. * * @author Régis Pouiller - * */ public class AssertOnValueCloseness_IsCloseTo_DateTimeValue_TimeValue_Test extends AbstractTest { @@ -45,13 +48,13 @@ public void test_is_close_to() { ChangeColumnValueAssert changeColumnValueAssert = assertThat(changes).change().column("var10").valueAtEndPoint(); ChangeColumnValueAssert changeColumnValueAssert2 = changeColumnValueAssert.isCloseTo( - DateTimeValue.of(DateValue.of(2014, 5, 24), TimeValue - .of(9, 46, 30)), TimeValue.of(0, 0, 0)); + DateTimeValue.of(DateValue.of(2014, 5, 24), TimeValue + .of(9, 46, 30)), TimeValue.of(0, 0, 0)); Assertions.assertThat(changeColumnValueAssert).isSameAs(changeColumnValueAssert2); TableColumnValueAssert tableColumnValueAssert = assertThat(table).column("var10").value(); TableColumnValueAssert tableColumnValueAssert2 = tableColumnValueAssert.isCloseTo( - DateTimeValue.of(DateValue.of(2014, 5, 24), TimeValue.of(9, 46, 30)), TimeValue.of(0, 0, 0)); + DateTimeValue.of(DateValue.of(2014, 5, 24), TimeValue.of(9, 46, 30)), TimeValue.of(0, 0, 0)); Assertions.assertThat(tableColumnValueAssert).isSameAs(tableColumnValueAssert2); } @@ -68,27 +71,27 @@ public void should_fail_because_value_is_not_close_to() { try { assertThat(changes).change().column("var10").valueAtEndPoint().isCloseTo( - DateTimeValue.of(DateValue.of(2014, 5, 24), TimeValue.of(9, 46, 31)), TimeValue.of(0, 0, 0, 1)); + DateTimeValue.of(DateValue.of(2014, 5, 24), TimeValue.of(9, 46, 31)), TimeValue.of(0, 0, 0, 1)); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 9 (column name : VAR10) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting:%n" - + " <2014-05-24T09:46:30.000000000>%n" - + "to be close to: %n" - + " <2014-05-24T09:46:31.000000000> %n" - + " with tolerance <00:00:00.000000001>")); + + "Expecting:%n" + + " <2014-05-24T09:46:30.000000000>%n" + + "to be close to: %n" + + " <2014-05-24T09:46:31.000000000> %n" + + " with tolerance <00:00:00.000000001>")); } try { assertThat(table).column("var10").value().isCloseTo( - DateTimeValue.of(DateValue.of(2014, 5, 24), TimeValue.of(9, 46, 31)), TimeValue.of(0, 0, 0, 100)); + DateTimeValue.of(DateValue.of(2014, 5, 24), TimeValue.of(9, 46, 31)), TimeValue.of(0, 0, 0, 100)); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at index 0 of Column at index 9 (column name : VAR10) of TEST table] %n" - + "Expecting:%n" - + " <2014-05-24T09:46:30.000000000>%n" - + "to be close to: %n" - + " <2014-05-24T09:46:31.000000000> %n" - + " with tolerance <00:00:00.000000100>")); + + "Expecting:%n" + + " <2014-05-24T09:46:30.000000000>%n" + + "to be close to: %n" + + " <2014-05-24T09:46:31.000000000> %n" + + " with tolerance <00:00:00.000000100>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueCloseness_IsCloseTo_DateValue_DateTimeValue_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueCloseness_IsCloseTo_DateValue_DateTimeValue_Test.java index 1c60ffc5..eab13dea 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueCloseness_IsCloseTo_DateValue_DateTimeValue_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueCloseness_IsCloseTo_DateValue_DateTimeValue_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeColumnValueAssert; import org.assertj.db.api.TableColumnValueAssert; @@ -23,15 +26,11 @@ import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnValueCloseness} class : * {@link org.assertj.db.api.assertions.AssertOnValueCloseness#isCloseTo(org.assertj.db.type.DateValue, org.assertj.db.type.DateTimeValue)} method. * * @author Régis Pouiller - * */ public class AssertOnValueCloseness_IsCloseTo_DateValue_DateTimeValue_Test extends AbstractTest { @@ -48,7 +47,7 @@ public void test_is_close_to() { ChangeColumnValueAssert changeColumnValueAssert = assertThat(changes).change().column("var9").valueAtEndPoint(); ChangeColumnValueAssert changeColumnValueAssert2 = changeColumnValueAssert.isCloseTo(DateValue.of(2014, 5, 24), DateTimeValue - .of(DateValue.of(0, 0, 0))); + .of(DateValue.of(0, 0, 0))); Assertions.assertThat(changeColumnValueAssert).isSameAs(changeColumnValueAssert2); TableColumnValueAssert tableColumnValueAssert = assertThat(table).column("var9").value(); @@ -72,22 +71,22 @@ public void should_fail_because_value_is_not_close_to() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 8 (column name : VAR9) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting:%n" - + " <2014-05-24>%n" - + "to be close to: %n" - + " <2014-05-23> %n" - + " with tolerance < 0-00-00T00:00:00.000000000>")); + + "Expecting:%n" + + " <2014-05-24>%n" + + "to be close to: %n" + + " <2014-05-23> %n" + + " with tolerance < 0-00-00T00:00:00.000000000>")); } try { assertThat(table).column("var9").value().isCloseTo(DateValue.of(2014, 5, 23), DateTimeValue.of(DateValue.of(0, 0, 0))); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at index 0 of Column at index 8 (column name : VAR9) of TEST table] %n" - + "Expecting:%n" - + " <2014-05-24>%n" - + "to be close to: %n" - + " <2014-05-23> %n" - + " with tolerance < 0-00-00T00:00:00.000000000>")); + + "Expecting:%n" + + " <2014-05-24>%n" + + "to be close to: %n" + + " <2014-05-23> %n" + + " with tolerance < 0-00-00T00:00:00.000000000>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueCloseness_IsCloseTo_DateValue_DateValue_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueCloseness_IsCloseTo_DateValue_DateValue_Test.java index 675a59c6..f7c95a9d 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueCloseness_IsCloseTo_DateValue_DateValue_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueCloseness_IsCloseTo_DateValue_DateValue_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeColumnValueAssert; import org.assertj.db.api.TableColumnValueAssert; @@ -22,15 +25,11 @@ import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnValueCloseness} class : * {@link org.assertj.db.api.assertions.AssertOnValueCloseness#isCloseTo(org.assertj.db.type.DateValue, org.assertj.db.type.DateValue)} method. * * @author Régis Pouiller - * */ public class AssertOnValueCloseness_IsCloseTo_DateValue_DateValue_Test extends AbstractTest { @@ -70,22 +69,22 @@ public void should_fail_because_value_is_not_close_to() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 8 (column name : VAR9) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting:%n" - + " <2014-05-24>%n" - + "to be close to: %n" - + " <2014-05-23> %n" - + " with tolerance < 0-00-00>")); + + "Expecting:%n" + + " <2014-05-24>%n" + + "to be close to: %n" + + " <2014-05-23> %n" + + " with tolerance < 0-00-00>")); } try { assertThat(table).column("var9").value().isCloseTo(DateValue.of(2014, 5, 23), DateValue.of(0, 0, 0)); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at index 0 of Column at index 8 (column name : VAR9) of TEST table] %n" - + "Expecting:%n" - + " <2014-05-24>%n" - + "to be close to: %n" - + " <2014-05-23> %n" - + " with tolerance < 0-00-00>")); + + "Expecting:%n" + + " <2014-05-24>%n" + + "to be close to: %n" + + " <2014-05-23> %n" + + " with tolerance < 0-00-00>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueCloseness_IsCloseTo_DateValue_TimeValue_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueCloseness_IsCloseTo_DateValue_TimeValue_Test.java index a829dac2..12fadb2b 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueCloseness_IsCloseTo_DateValue_TimeValue_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueCloseness_IsCloseTo_DateValue_TimeValue_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeColumnValueAssert; import org.assertj.db.api.TableColumnValueAssert; @@ -23,15 +26,11 @@ import org.assertj.db.type.TimeValue; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnValueCloseness} class : * {@link org.assertj.db.api.assertions.AssertOnValueCloseness#isCloseTo(org.assertj.db.type.DateValue, org.assertj.db.type.TimeValue)} method. * * @author Régis Pouiller - * */ public class AssertOnValueCloseness_IsCloseTo_DateValue_TimeValue_Test extends AbstractTest { @@ -68,26 +67,26 @@ public void should_fail_because_value_is_not_close_to() { try { assertThat(changes).change().column("var9").valueAtEndPoint().isCloseTo(DateValue.of(2014, 5, 23), TimeValue - .of(0, 1, 0)); + .of(0, 1, 0)); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 8 (column name : VAR9) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting:%n" - + " <2014-05-24>%n" - + "to be close to: %n" - + " <2014-05-23> %n" - + " with tolerance <00:01:00.000000000>")); + + "Expecting:%n" + + " <2014-05-24>%n" + + "to be close to: %n" + + " <2014-05-23> %n" + + " with tolerance <00:01:00.000000000>")); } try { assertThat(table).column("var9").value().isCloseTo(DateValue.of(2014, 5, 23), TimeValue.of(1, 0, 0)); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at index 0 of Column at index 8 (column name : VAR9) of TEST table] %n" - + "Expecting:%n" - + " <2014-05-24>%n" - + "to be close to: %n" - + " <2014-05-23> %n" - + " with tolerance <01:00:00.000000000>")); + + "Expecting:%n" + + " <2014-05-24>%n" + + "to be close to: %n" + + " <2014-05-23> %n" + + " with tolerance <01:00:00.000000000>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueCloseness_IsCloseTo_Number_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueCloseness_IsCloseTo_Number_Test.java index 8f9fea10..03f64d2e 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueCloseness_IsCloseTo_Number_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueCloseness_IsCloseTo_Number_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeColumnValueAssert; import org.assertj.db.api.TableColumnValueAssert; @@ -21,15 +24,11 @@ import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnValueCloseness} class : * {@link org.assertj.db.api.assertions.AssertOnValueCloseness#isCloseTo(Number, Number)} method. * * @author Régis Pouiller - * */ public class AssertOnValueCloseness_IsCloseTo_Number_Test extends AbstractTest { @@ -69,22 +68,22 @@ public void should_fail_because_value_is_not_close_to() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 2 (column name : VAR3) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting:%n" - + " <2>%n" - + "to be close to: %n" - + " <3> %n" - + " with tolerance <0.5>")); + + "Expecting:%n" + + " <2>%n" + + "to be close to: %n" + + " <3> %n" + + " with tolerance <0.5>")); } try { assertThat(table).column("var3").value().isCloseTo(3, 0.99); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at index 0 of Column at index 2 (column name : VAR3) of TEST table] %n" - + "Expecting:%n" - + " <2>%n" - + "to be close to: %n" - + " <3> %n" - + " with tolerance <0.99>")); + + "Expecting:%n" + + " <2>%n" + + "to be close to: %n" + + " <3> %n" + + " with tolerance <0.99>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueCloseness_IsCloseTo_TimeValue_TimeValue_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueCloseness_IsCloseTo_TimeValue_TimeValue_Test.java index 1ba6eff1..a0b5a6f9 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueCloseness_IsCloseTo_TimeValue_TimeValue_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueCloseness_IsCloseTo_TimeValue_TimeValue_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeColumnValueAssert; import org.assertj.db.api.TableColumnValueAssert; @@ -22,15 +25,11 @@ import org.assertj.db.type.TimeValue; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnValueCloseness} class : * {@link org.assertj.db.api.assertions.AssertOnValueCloseness#isCloseTo(org.assertj.db.type.TimeValue, org.assertj.db.type.TimeValue)} method. * * @author Régis Pouiller - * */ public class AssertOnValueCloseness_IsCloseTo_TimeValue_TimeValue_Test extends AbstractTest { @@ -70,24 +69,24 @@ public void should_fail_because_value_is_not_close_to() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format( - "[Value at end point of Column at index 7 (column name : VAR8) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting:%n" - + " <09:46:30.000000000>%n" - + "to be close to: %n" - + " <09:46:31.000000000> %n" - + " with tolerance <00:00:00.000000001>")); + "[Value at end point of Column at index 7 (column name : VAR8) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n" + + "Expecting:%n" + + " <09:46:30.000000000>%n" + + "to be close to: %n" + + " <09:46:31.000000000> %n" + + " with tolerance <00:00:00.000000001>")); } try { assertThat(table).column("var8").value().isCloseTo(TimeValue.of(9, 46, 31), TimeValue.of(0, 0, 0, 1)); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo( - String.format("[Value at index 0 of Column at index 7 (column name : VAR8) of TEST table] %n" - + "Expecting:%n" - + " <09:46:30.000000000>%n" - + "to be close to: %n" - + " <09:46:31.000000000> %n" - + " with tolerance <00:00:00.000000001>")); + String.format("[Value at index 0 of Column at index 7 (column name : VAR8) of TEST table] %n" + + "Expecting:%n" + + " <09:46:30.000000000>%n" + + "to be close to: %n" + + " <09:46:31.000000000> %n" + + " with tolerance <00:00:00.000000001>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueComparison_IsGreaterThanOrEqualTo_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueComparison_IsGreaterThanOrEqualTo_Test.java index 4f406fe9..89a284ed 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueComparison_IsGreaterThanOrEqualTo_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueComparison_IsGreaterThanOrEqualTo_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeColumnValueAssert; import org.assertj.db.api.TableColumnValueAssert; @@ -21,15 +24,11 @@ import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnValueComparison} class : * {@link org.assertj.db.api.assertions.AssertOnValueComparison#isGreaterThanOrEqualTo(Number)} method. * * @author Régis Pouiller - * */ public class AssertOnValueComparison_IsGreaterThanOrEqualTo_Test extends AbstractTest { @@ -70,20 +69,20 @@ public void should_fail_because_value_is_less_than() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 2 (column name : VAR3) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting:%n" - + " <2>%n" - + "to be greater than or equal to %n" - + " <3>")); + + "Expecting:%n" + + " <2>%n" + + "to be greater than or equal to %n" + + " <3>")); } try { assertThat(table).column("var3").value().isGreaterThanOrEqualTo(3); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at index 0 of Column at index 2 (column name : VAR3) of TEST table] %n" - + "Expecting:%n" - + " <2>%n" - + "to be greater than or equal to %n" - + " <3>")); + + "Expecting:%n" + + " <2>%n" + + "to be greater than or equal to %n" + + " <3>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueComparison_IsGreaterThan_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueComparison_IsGreaterThan_Test.java index 4416d411..6e6812d8 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueComparison_IsGreaterThan_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueComparison_IsGreaterThan_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeColumnValueAssert; import org.assertj.db.api.TableColumnValueAssert; @@ -21,15 +24,11 @@ import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnValueComparison} class : * {@link org.assertj.db.api.assertions.AssertOnValueComparison#isGreaterThan(Number)} method. * * @author Régis Pouiller - * */ public class AssertOnValueComparison_IsGreaterThan_Test extends AbstractTest { @@ -70,20 +69,20 @@ public void should_fail_because_value_is_greater_than_or_equal_to() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 2 (column name : VAR3) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting:%n" - + " <2>%n" - + "to be greater than %n" - + " <2>")); + + "Expecting:%n" + + " <2>%n" + + "to be greater than %n" + + " <2>")); } try { assertThat(table).column("var3").value().isGreaterThan(2); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at index 0 of Column at index 2 (column name : VAR3) of TEST table] %n" - + "Expecting:%n" - + " <2>%n" - + "to be greater than %n" - + " <2>")); + + "Expecting:%n" + + " <2>%n" + + "to be greater than %n" + + " <2>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueComparison_IsLessThanOrEqualTo_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueComparison_IsLessThanOrEqualTo_Test.java index 73cc4b2b..0f67f5e8 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueComparison_IsLessThanOrEqualTo_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueComparison_IsLessThanOrEqualTo_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeColumnValueAssert; import org.assertj.db.api.TableColumnValueAssert; @@ -21,15 +24,11 @@ import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnValueComparison} class : * {@link org.assertj.db.api.assertions.AssertOnValueComparison#isLessThanOrEqualTo(Number)} method. * * @author Régis Pouiller - * */ public class AssertOnValueComparison_IsLessThanOrEqualTo_Test extends AbstractTest { @@ -70,20 +69,20 @@ public void should_fail_because_value_is_greater_than() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 2 (column name : VAR3) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting:%n" - + " <2>%n" - + "to be less than or equal to %n" - + " <1>")); + + "Expecting:%n" + + " <2>%n" + + "to be less than or equal to %n" + + " <1>")); } try { assertThat(table).column("var3").value().isLessThanOrEqualTo(1); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at index 0 of Column at index 2 (column name : VAR3) of TEST table] %n" - + "Expecting:%n" - + " <2>%n" - + "to be less than or equal to %n" - + " <1>")); + + "Expecting:%n" + + " <2>%n" + + "to be less than or equal to %n" + + " <1>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueComparison_IsLessThan_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueComparison_IsLessThan_Test.java index 801949f3..de5bff08 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueComparison_IsLessThan_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueComparison_IsLessThan_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeColumnValueAssert; import org.assertj.db.api.TableColumnValueAssert; @@ -21,15 +24,11 @@ import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnValueComparison} class : * {@link org.assertj.db.api.assertions.AssertOnValueComparison#isLessThan(Number)} method. * * @author Régis Pouiller - * */ public class AssertOnValueComparison_IsLessThan_Test extends AbstractTest { @@ -70,20 +69,20 @@ public void should_fail_because_value_is_greater_than_or_equal_to() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 2 (column name : VAR3) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting:%n" - + " <2>%n" - + "to be less than %n" - + " <2>")); + + "Expecting:%n" + + " <2>%n" + + "to be less than %n" + + " <2>")); } try { assertThat(table).column("var3").value().isLessThan(2); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at index 0 of Column at index 2 (column name : VAR3) of TEST table] %n" - + "Expecting:%n" - + " <2>%n" - + "to be less than %n" - + " <2>")); + + "Expecting:%n" + + " <2>%n" + + "to be less than %n" + + " <2>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueCondition_DoesNotHave_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueCondition_DoesNotHave_Test.java index 54ffae35..031300dd 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueCondition_DoesNotHave_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueCondition_DoesNotHave_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.core.api.Condition; import org.assertj.db.api.ChangeColumnValueAssert; @@ -22,15 +25,11 @@ import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link AssertOnValueCondition} class : * {@link AssertOnValueCondition#doesNotHave(Condition)} method. * * @author Julien Roy - * */ public class AssertOnValueCondition_DoesNotHave_Test extends AbstractTest { @@ -77,21 +76,21 @@ public void should_fail_because_value_not_match_with_condition() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format( - "[Value at end point of Column at index 2 (column name : VAR3) of Change at index 0 (with primary key : [1000]) of " + "[Value at end point of Column at index 2 (column name : VAR3) of Change at index 0 (with primary key : [1000]) of " + "Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting:%n" + + "Expecting actual:%n" + " 0%n" - + "not to be isZero")); + + "not to be isZero")); } try { assertThat(table).column("var3").value(3).doesNotHave(zero); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()) - .isEqualTo(String.format("[Value at index 3 of Column at index 2 (column name : VAR3) of TEST table] %n" - + "Expecting:%n" - + " 0%n" - + "not to be isZero")); + .isEqualTo(String.format("[Value at index 3 of Column at index 2 (column name : VAR3) of TEST table] %n" + + "Expecting actual:%n" + + " 0%n" + + "not to be isZero")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueCondition_Has_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueCondition_Has_Test.java index f1017d87..12e4e905 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueCondition_Has_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueCondition_Has_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.core.api.Condition; import org.assertj.db.api.ChangeColumnValueAssert; @@ -22,15 +25,11 @@ import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link AssertOnValueCondition} class : * {@link AssertOnValueCondition#has(Condition)} method. * * @author Julien Roy - * */ public class AssertOnValueCondition_Has_Test extends AbstractTest { @@ -77,9 +76,9 @@ public void should_fail_because_value_not_match_with_condition() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format( - "[Value at end point of Column at index 2 (column name : VAR3) of Change at index 0 (with primary key : [1]) of " + "[Value at end point of Column at index 2 (column name : VAR3) of Change at index 0 (with primary key : [1]) of " + "Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting:%n" + + "Expecting actual:%n" + " 2%n" + "to be isZero")); } @@ -88,10 +87,10 @@ public void should_fail_because_value_not_match_with_condition() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()) - .isEqualTo(String.format("[Value at index 0 of Column at index 2 (column name : VAR3) of TEST table] %n" - + "Expecting:%n" - + " 2%n" - + "to be isZero")); + .isEqualTo(String.format("[Value at index 0 of Column at index 2 (column name : VAR3) of TEST table] %n" + + "Expecting actual:%n" + + " 2%n" + + "to be isZero")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueCondition_IsNot_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueCondition_IsNot_Test.java index 22e28e4f..340eb1a3 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueCondition_IsNot_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueCondition_IsNot_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.core.api.Condition; import org.assertj.db.api.ChangeColumnValueAssert; @@ -22,15 +25,11 @@ import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link AssertOnValueCondition} class : * {@link AssertOnValueCondition#isNot(Condition)} method. * * @author Julien Roy - * */ public class AssertOnValueCondition_IsNot_Test extends AbstractTest { @@ -77,21 +76,21 @@ public void should_fail_because_value_not_match_with_condition() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format( - "[Value at end point of Column at index 2 (column name : VAR3) of Change at index 0 (with primary key : [1000]) of " + "[Value at end point of Column at index 2 (column name : VAR3) of Change at index 0 (with primary key : [1000]) of " + "Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting:%n" + + "Expecting actual:%n" + " 0%n" - + "not to be isZero")); + + "not to be isZero")); } try { assertThat(table).column("var3").value(3).isNot(zero); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()) - .isEqualTo(String.format("[Value at index 3 of Column at index 2 (column name : VAR3) of TEST table] %n" - + "Expecting:%n" - + " 0%n" - + "not to be isZero")); + .isEqualTo(String.format("[Value at index 3 of Column at index 2 (column name : VAR3) of TEST table] %n" + + "Expecting actual:%n" + + " 0%n" + + "not to be isZero")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueCondition_Is_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueCondition_Is_Test.java index 28b0187e..2f4786e1 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueCondition_Is_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueCondition_Is_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.core.api.Condition; import org.assertj.db.api.ChangeColumnValueAssert; @@ -22,15 +25,11 @@ import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link AssertOnValueCondition} class : * {@link AssertOnValueCondition#is(Condition)} method. * * @author Julien Roy - * */ public class AssertOnValueCondition_Is_Test extends AbstractTest { @@ -77,9 +76,9 @@ public void should_fail_because_value_not_match_with_condition() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format( - "[Value at end point of Column at index 2 (column name : VAR3) of Change at index 0 (with primary key : [1]) of " + "[Value at end point of Column at index 2 (column name : VAR3) of Change at index 0 (with primary key : [1]) of " + "Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting:%n" + + "Expecting actual:%n" + " 2%n" + "to be isZero")); } @@ -88,10 +87,10 @@ public void should_fail_because_value_not_match_with_condition() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()) - .isEqualTo(String.format("[Value at index 0 of Column at index 2 (column name : VAR3) of TEST table] %n" - + "Expecting:%n" - + " 2%n" - + "to be isZero")); + .isEqualTo(String.format("[Value at index 0 of Column at index 2 (column name : VAR3) of TEST table] %n" + + "Expecting actual:%n" + + " 2%n" + + "to be isZero")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueCondition_Satisfies_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueCondition_Satisfies_Test.java index 15ad5731..b7a31cb5 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueCondition_Satisfies_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueCondition_Satisfies_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.core.api.Condition; import org.assertj.db.api.ChangeColumnValueAssert; @@ -22,15 +25,11 @@ import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link AssertOnValueCondition} class : * {@link AssertOnValueCondition#satisfies(Condition)} method. * * @author Julien Roy - * */ public class AssertOnValueCondition_Satisfies_Test extends AbstractTest { @@ -77,9 +76,9 @@ public void should_fail_because_value_not_match_with_condition() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format( - "[Value at end point of Column at index 2 (column name : VAR3) of Change at index 0 (with primary key : [1]) of " + "[Value at end point of Column at index 2 (column name : VAR3) of Change at index 0 (with primary key : [1]) of " + "Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting:%n" + + "Expecting actual:%n" + " 2%n" + "to satisfy:%n" + " isZero")); @@ -89,11 +88,11 @@ public void should_fail_because_value_not_match_with_condition() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()) - .isEqualTo(String.format("[Value at index 0 of Column at index 2 (column name : VAR3) of TEST table] %n" - + "Expecting:%n" - + " 2%n" - + "to satisfy:%n" - + " isZero")); + .isEqualTo(String.format("[Value at index 0 of Column at index 2 (column name : VAR3) of TEST table] %n" + + "Expecting actual:%n" + + " 2%n" + + "to satisfy:%n" + + " isZero")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_Boolean_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_Boolean_Test.java index 68d694ed..7d1659c1 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_Boolean_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_Boolean_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeColumnValueAssert; import org.assertj.db.api.TableColumnValueAssert; @@ -21,15 +24,11 @@ import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnValueEquality} class : * {@link org.assertj.db.api.assertions.AssertOnValueEquality#isEqualTo(Boolean)} method. * * @author Régis Pouiller - * */ public class AssertOnValueEquality_IsEqualTo_Boolean_Test extends AbstractTest { @@ -69,20 +68,20 @@ public void should_fail_because_value_is_not_equal_to() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 1 (column name : VAR2) of Change at index 0 (with primary key : [10]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting:%n" - + " %n" - + "to be equal to: %n" - + " ")); + + "Expecting:%n" + + " %n" + + "to be equal to: %n" + + " ")); } try { assertThat(table).column("var2").value(1).isEqualTo(true); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at index 1 of Column at index 1 (column name : VAR2) of TEST table] %n" - + "Expecting:%n" - + " %n" - + "to be equal to: %n" - + " ")); + + "Expecting:%n" + + " %n" + + "to be equal to: %n" + + " ")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_Bytes_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_Bytes_Test.java index 047dec26..271edcd9 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_Bytes_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_Bytes_Test.java @@ -8,10 +8,14 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.assertj.db.api.Assertions.bytesContentFromClassPathOf; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeColumnValueAssert; import org.assertj.db.api.TableColumnValueAssert; @@ -21,16 +25,11 @@ import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.assertj.db.api.Assertions.bytesContentFromClassPathOf; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnValueEquality} class : * {@link org.assertj.db.api.assertions.AssertOnValueEquality#isEqualTo(byte[])} method. * * @author Régis Pouiller - * */ public class AssertOnValueEquality_IsEqualTo_Bytes_Test extends AbstractTest { @@ -72,14 +71,14 @@ public void should_fail_because_value_is_not_equal_to() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 10 (column name : VAR11) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting to be equal to the expected value but was not equal")); + + "Expecting to be equal to the expected value but was not equal")); } try { assertThat(table).column("var11").value().isEqualTo(new byte[0]); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at index 0 of Column at index 10 (column name : VAR11) of TEST table] %n" - + "Expecting to be equal to the expected value but was not equal")); + + "Expecting to be equal to the expected value but was not equal")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_Character_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_Character_Test.java index fddb471f..11003d17 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_Character_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_Character_Test.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; @@ -29,7 +29,6 @@ * {@link org.assertj.db.api.assertions.AssertOnValueEquality#isEqualTo(Character)} method. * * @author Régis Pouiller - * */ public class AssertOnValueEquality_IsEqualTo_Character_Test extends AbstractTest { @@ -69,20 +68,20 @@ public void should_fail_because_value_is_not_equal_to() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 15 (column name : VAR16) of Change at index 0 (with primary key : [10]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting:%n" - + " <\"e\">%n" - + "to be equal to: %n" - + " <'t'>")); + + "Expecting:%n" + + " <\"e\">%n" + + "to be equal to: %n" + + " <'t'>")); } try { assertThat(table).column("var16").value(1).isEqualTo('t'); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at index 1 of Column at index 15 (column name : VAR16) of TEST table] %n" - + "Expecting:%n" - + " <\"e\">%n" - + "to be equal to: %n" - + " <'t'>")); + + "Expecting:%n" + + " <\"e\">%n" + + "to be equal to: %n" + + " <'t'>")); } } -} \ No newline at end of file +} diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_DateTimeValue_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_DateTimeValue_Test.java index 226874c8..5c50f530 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_DateTimeValue_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_DateTimeValue_Test.java @@ -8,27 +8,30 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeColumnValueAssert; import org.assertj.db.api.TableColumnValueAssert; import org.assertj.db.common.AbstractTest; import org.assertj.db.common.NeedReload; -import org.assertj.db.type.*; +import org.assertj.db.type.Changes; +import org.assertj.db.type.DateTimeValue; +import org.assertj.db.type.DateValue; +import org.assertj.db.type.Table; +import org.assertj.db.type.TimeValue; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnValueEquality} class : * {@link org.assertj.db.api.assertions.AssertOnValueEquality#isEqualTo(org.assertj.db.type.DateTimeValue)} method. * * @author Régis Pouiller - * */ public class AssertOnValueEquality_IsEqualTo_DateTimeValue_Test extends AbstractTest { @@ -45,7 +48,7 @@ public void test_is_equal_to() { ChangeColumnValueAssert changeColumnValueAssert = assertThat(changes).change().column("var10").valueAtEndPoint(); ChangeColumnValueAssert changeColumnValueAssert2 = changeColumnValueAssert.isEqualTo(DateTimeValue.of(DateValue.of(2014, 5, 24), TimeValue - .of(9, 46, 30))); + .of(9, 46, 30))); Assertions.assertThat(changeColumnValueAssert).isSameAs(changeColumnValueAssert2); TableColumnValueAssert tableColumnValueAssert = assertThat(table).column("var10").value(); @@ -66,24 +69,24 @@ public void should_fail_because_value_is_not_equal_to() { try { assertThat(changes).change().column("var10").valueAtEndPoint().isEqualTo( - DateTimeValue.of(DateValue.of(2014, 5, 24), TimeValue.of(9, 46, 31))); + DateTimeValue.of(DateValue.of(2014, 5, 24), TimeValue.of(9, 46, 31))); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 9 (column name : VAR10) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting:%n" - + " <2014-05-24T09:46:30.000000000>%n" - + "to be equal to: %n" - + " <2014-05-24T09:46:31.000000000>")); + + "Expecting:%n" + + " <2014-05-24T09:46:30.000000000>%n" + + "to be equal to: %n" + + " <2014-05-24T09:46:31.000000000>")); } try { assertThat(table).column("var10").value().isEqualTo(DateTimeValue.of(DateValue.of(2014, 5, 24), TimeValue.of(9, 46, 31))); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at index 0 of Column at index 9 (column name : VAR10) of TEST table] %n" - + "Expecting:%n" - + " <2014-05-24T09:46:30.000000000>%n" - + "to be equal to: %n" - + " <2014-05-24T09:46:31.000000000>")); + + "Expecting:%n" + + " <2014-05-24T09:46:30.000000000>%n" + + "to be equal to: %n" + + " <2014-05-24T09:46:31.000000000>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_DateValue_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_DateValue_Test.java index fdf92f15..26636b2c 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_DateValue_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_DateValue_Test.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; @@ -30,7 +30,6 @@ * {@link org.assertj.db.api.assertions.AssertOnValueEquality#isEqualTo(org.assertj.db.type.DateValue)} method. * * @author Régis Pouiller - * */ public class AssertOnValueEquality_IsEqualTo_DateValue_Test extends AbstractTest { @@ -70,20 +69,20 @@ public void should_fail_because_value_is_not_equal_to() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 8 (column name : VAR9) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting:%n" - + " <2014-05-24>%n" - + "to be equal to: %n" - + " <2014-05-23>")); + + "Expecting:%n" + + " <2014-05-24>%n" + + "to be equal to: %n" + + " <2014-05-23>")); } try { assertThat(table).column("var9").value().isEqualTo(DateValue.of(2014, 5, 23)); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at index 0 of Column at index 8 (column name : VAR9) of TEST table] %n" - + "Expecting:%n" - + " <2014-05-24>%n" - + "to be equal to: %n" - + " <2014-05-23>")); + + "Expecting:%n" + + " <2014-05-24>%n" + + "to be equal to: %n" + + " <2014-05-23>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_LocalDateTime_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_LocalDateTime_Test.java index d5cd2ca9..a9d99854 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_LocalDateTime_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_LocalDateTime_Test.java @@ -8,10 +8,15 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + +import java.time.LocalDateTime; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeColumnValueAssert; import org.assertj.db.api.TableColumnValueAssert; @@ -21,11 +26,6 @@ import org.assertj.db.type.Table; import org.junit.Test; -import java.time.LocalDateTime; - -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnValueEquality} class : * {@link org.assertj.db.api.assertions.AssertOnValueEquality#isEqualTo(java.time.LocalDateTime)} method. @@ -70,20 +70,20 @@ public void should_fail_because_value_is_not_equal_to() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 9 (column name : VAR10) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting:%n" - + " <2014-05-24T09:46:30.000000000>%n" - + "to be equal to: %n" - + " <2014-05-24T09:46:31.000000000>")); + + "Expecting:%n" + + " <2014-05-24T09:46:30.000000000>%n" + + "to be equal to: %n" + + " <2014-05-24T09:46:31.000000000>")); } try { assertThat(table).column("var10").value().isEqualTo(LocalDateTime.of(2014, 5, 24, 9, 46, 31)); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at index 0 of Column at index 9 (column name : VAR10) of TEST table] %n" - + "Expecting:%n" - + " <2014-05-24T09:46:30.000000000>%n" - + "to be equal to: %n" - + " <2014-05-24T09:46:31.000000000>")); + + "Expecting:%n" + + " <2014-05-24T09:46:30.000000000>%n" + + "to be equal to: %n" + + " <2014-05-24T09:46:31.000000000>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_LocalDate_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_LocalDate_Test.java index 6d8af46c..9782936f 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_LocalDate_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_LocalDate_Test.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; @@ -70,20 +70,20 @@ public void should_fail_because_value_is_not_equal_to() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 8 (column name : VAR9) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting:%n" - + " <2014-05-24>%n" - + "to be equal to: %n" - + " <2014-05-23>")); + + "Expecting:%n" + + " <2014-05-24>%n" + + "to be equal to: %n" + + " <2014-05-23>")); } try { assertThat(table).column("var9").value().isEqualTo(LocalDate.of(2014, 5, 23)); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at index 0 of Column at index 8 (column name : VAR9) of TEST table] %n" - + "Expecting:%n" - + " <2014-05-24>%n" - + "to be equal to: %n" - + " <2014-05-23>")); + + "Expecting:%n" + + " <2014-05-24>%n" + + "to be equal to: %n" + + " <2014-05-23>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_LocalTime_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_LocalTime_Test.java index ee485dbc..f5e6fff4 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_LocalTime_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_LocalTime_Test.java @@ -8,10 +8,15 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + +import java.time.LocalTime; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeColumnValueAssert; import org.assertj.db.api.TableColumnValueAssert; @@ -21,11 +26,6 @@ import org.assertj.db.type.Table; import org.junit.Test; -import java.time.LocalTime; - -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnValueEquality} class : * {@link org.assertj.db.api.assertions.AssertOnValueEquality#isEqualTo(java.time.LocalTime)} method. @@ -70,20 +70,20 @@ public void should_fail_because_value_is_not_equal_to() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 7 (column name : VAR8) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting:%n" - + " <09:46:30.000000000>%n" - + "to be equal to: %n" - + " <09:46:31.000000000>")); + + "Expecting:%n" + + " <09:46:30.000000000>%n" + + "to be equal to: %n" + + " <09:46:31.000000000>")); } try { assertThat(table).column("var8").value().isEqualTo(LocalTime.of(9, 46, 31)); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at index 0 of Column at index 7 (column name : VAR8) of TEST table] %n" - + "Expecting:%n" - + " <09:46:30.000000000>%n" - + "to be equal to: %n" - + " <09:46:31.000000000>")); + + "Expecting:%n" + + " <09:46:30.000000000>%n" + + "to be equal to: %n" + + " <09:46:31.000000000>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_Number_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_Number_Test.java index 82b6133e..1c1c9a07 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_Number_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_Number_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeColumnValueAssert; import org.assertj.db.api.TableColumnValueAssert; @@ -21,15 +24,11 @@ import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnValueEquality} class : * {@link org.assertj.db.api.assertions.AssertOnValueEquality#isEqualTo(Number)} method. * * @author Régis Pouiller - * */ public class AssertOnValueEquality_IsEqualTo_Number_Test extends AbstractTest { @@ -69,20 +68,20 @@ public void should_fail_because_value_is_not_equal_to() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 2 (column name : VAR3) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting:%n" - + " <2>%n" - + "to be equal to: %n" - + " <3>")); + + "Expecting:%n" + + " <2>%n" + + "to be equal to: %n" + + " <3>")); } try { assertThat(table).column("var3").value().isEqualTo(3); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at index 0 of Column at index 2 (column name : VAR3) of TEST table] %n" - + "Expecting:%n" - + " <2>%n" - + "to be equal to: %n" - + " <3>")); + + "Expecting:%n" + + " <2>%n" + + "to be equal to: %n" + + " <3>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_Object_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_Object_Test.java index 47e156db..e1f881cd 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_Object_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_Object_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeColumnValueAssert; import org.assertj.db.api.TableColumnValueAssert; @@ -21,15 +24,11 @@ import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnValueEquality} class : * {@link org.assertj.db.api.assertions.AssertOnValueEquality#isEqualTo(Object)} method. * * @author Régis Pouiller - * */ public class AssertOnValueEquality_IsEqualTo_Object_Test extends AbstractTest { @@ -69,20 +68,20 @@ public void should_fail_because_value_is_not_null() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 2 (column name : VAR3) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting:%n" - + " <2>%n" - + "to be equal to: %n" - + " ")); + + "Expecting:%n" + + " <2>%n" + + "to be equal to: %n" + + " ")); } try { assertThat(table).column("var3").value().isEqualTo((Object) null); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at index 0 of Column at index 2 (column name : VAR3) of TEST table] %n" - + "Expecting:%n" - + " <2>%n" - + "to be equal to: %n" - + " ")); + + "Expecting:%n" + + " <2>%n" + + "to be equal to: %n" + + " ")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_String_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_String_Test.java index 1ef66bb2..9ad380f7 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_String_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_String_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeColumnValueAssert; import org.assertj.db.api.TableColumnValueAssert; @@ -21,15 +24,11 @@ import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnValueEquality} class : * {@link org.assertj.db.api.assertions.AssertOnValueEquality#isEqualTo(String)} method. * * @author Régis Pouiller - * */ public class AssertOnValueEquality_IsEqualTo_String_Test extends AbstractTest { @@ -69,20 +68,20 @@ public void should_fail_because_value_is_not_equal_to() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 11 (column name : VAR12) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting:%n" - + " <\"text\">%n" - + "to be equal to: %n" - + " <\"-\">")); + + "Expecting:%n" + + " <\"text\">%n" + + "to be equal to: %n" + + " <\"-\">")); } try { assertThat(table).column("var12").value().isEqualTo("-"); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at index 0 of Column at index 11 (column name : VAR12) of TEST table] %n" - + "Expecting:%n" - + " <\"text\">%n" - + "to be equal to: %n" - + " <\"-\">")); + + "Expecting:%n" + + " <\"text\">%n" + + "to be equal to: %n" + + " <\"-\">")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_TimeValue_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_TimeValue_Test.java index 17b3eb43..95ac1ff5 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_TimeValue_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_TimeValue_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeColumnValueAssert; import org.assertj.db.api.TableColumnValueAssert; @@ -22,15 +25,11 @@ import org.assertj.db.type.TimeValue; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnValueEquality} class : * {@link org.assertj.db.api.assertions.AssertOnValueEquality#isEqualTo(org.assertj.db.type.TimeValue)} method. * * @author Régis Pouiller - * */ public class AssertOnValueEquality_IsEqualTo_TimeValue_Test extends AbstractTest { @@ -70,20 +69,20 @@ public void should_fail_because_value_is_not_equal_to() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 7 (column name : VAR8) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting:%n" - + " <09:46:30.000000000>%n" - + "to be equal to: %n" - + " <09:46:31.000000000>")); + + "Expecting:%n" + + " <09:46:30.000000000>%n" + + "to be equal to: %n" + + " <09:46:31.000000000>")); } try { assertThat(table).column("var8").value().isEqualTo(TimeValue.of(9, 46, 31)); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at index 0 of Column at index 7 (column name : VAR8) of TEST table] %n" - + "Expecting:%n" - + " <09:46:30.000000000>%n" - + "to be equal to: %n" - + " <09:46:31.000000000>")); + + "Expecting:%n" + + " <09:46:30.000000000>%n" + + "to be equal to: %n" + + " <09:46:31.000000000>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_UUID_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_UUID_Test.java index 63104ff2..37b1b79d 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_UUID_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_UUID_Test.java @@ -8,10 +8,15 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + +import java.util.UUID; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeColumnValueAssert; import org.assertj.db.api.TableColumnValueAssert; @@ -21,11 +26,6 @@ import org.assertj.db.type.Table; import org.junit.Test; -import java.util.UUID; - -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnValueEquality} class : * {@link org.assertj.db.api.assertions.AssertOnValueEquality#isEqualTo(UUID)} method. @@ -47,12 +47,12 @@ public void test_is_equal_to() { ChangeColumnValueAssert changeColumnValueAssert = assertThat(changes).change().column("var15").valueAtEndPoint(); ChangeColumnValueAssert changeColumnValueAssert2 = changeColumnValueAssert - .isEqualTo(UUID.fromString("2b0d1bdd-909e-4362-ba10-c930ba82718d")); + .isEqualTo(UUID.fromString("2b0d1bdd-909e-4362-ba10-c930ba82718d")); Assertions.assertThat(changeColumnValueAssert).isSameAs(changeColumnValueAssert2); TableColumnValueAssert tableColumnValueAssert = assertThat(table).column("var15").value(); TableColumnValueAssert tableColumnValueAssert2 = tableColumnValueAssert - .isEqualTo(UUID.fromString("2b0d1bdd-909e-4362-ba10-c930ba82718d")); + .isEqualTo(UUID.fromString("2b0d1bdd-909e-4362-ba10-c930ba82718d")); Assertions.assertThat(tableColumnValueAssert).isSameAs(tableColumnValueAssert2); } @@ -69,11 +69,11 @@ public void should_fail_because_value_is_not_equal_to() { try { assertThat(changes).change().column("var15").valueAtEndPoint() - .isEqualTo(UUID.fromString("0e2a1269-eff0-4233-b87b-b53e8b6f164d")); + .isEqualTo(UUID.fromString("0e2a1269-eff0-4233-b87b-b53e8b6f164d")); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format( - "[Value at end point of Column at index 14 (column name : VAR15) of Change at index 0 (with primary key : [10]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n" + "[Value at end point of Column at index 14 (column name : VAR15) of Change at index 0 (with primary key : [10]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n" + "Expecting:%n" + " <2b0d1bdd-909e-4362-ba10-c930ba82718d>%n" + "to be equal to: %n" @@ -84,11 +84,11 @@ public void should_fail_because_value_is_not_equal_to() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo( - String.format("[Value at index 1 of Column at index 14 (column name : VAR15) of TEST table] %n" - + "Expecting:%n" - + " <2b0d1bdd-909e-4362-ba10-c930ba82718d>%n" - + "to be equal to: %n" - + " <0e2a1269-eff0-4233-b87b-b53e8b6f164d>")); + String.format("[Value at index 1 of Column at index 14 (column name : VAR15) of TEST table] %n" + + "Expecting:%n" + + " <2b0d1bdd-909e-4362-ba10-c930ba82718d>%n" + + "to be equal to: %n" + + " <0e2a1269-eff0-4233-b87b-b53e8b6f164d>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsFalse_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsFalse_Test.java index c8d9613b..4141fadb 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsFalse_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsFalse_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeColumnValueAssert; import org.assertj.db.api.TableColumnValueAssert; @@ -21,15 +24,11 @@ import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnValueEquality} class : * {@link org.assertj.db.api.assertions.AssertOnValueEquality#isFalse()} method. * * @author Régis Pouiller - * */ public class AssertOnValueEquality_IsFalse_Test extends AbstractTest { @@ -69,20 +68,20 @@ public void should_fail_because_value_is_true() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 1 (column name : VAR2) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting:%n" - + " %n" - + "to be equal to: %n" - + " ")); + + "Expecting:%n" + + " %n" + + "to be equal to: %n" + + " ")); } try { assertThat(table).column("var2").value().isFalse(); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at index 0 of Column at index 1 (column name : VAR2) of TEST table] %n" - + "Expecting:%n" - + " %n" - + "to be equal to: %n" - + " ")); + + "Expecting:%n" + + " %n" + + "to be equal to: %n" + + " ")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsTrue_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsTrue_Test.java index dde2a456..d3749bf5 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsTrue_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsTrue_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeColumnValueAssert; import org.assertj.db.api.TableColumnValueAssert; @@ -21,15 +24,11 @@ import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnValueEquality} class : * {@link org.assertj.db.api.assertions.AssertOnValueEquality#isTrue()} method. * * @author Régis Pouiller - * */ public class AssertOnValueEquality_IsTrue_Test extends AbstractTest { @@ -69,20 +68,20 @@ public void should_fail_because_value_is_false() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 1 (column name : VAR2) of Change at index 0 (with primary key : [10]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting:%n" - + " %n" - + "to be equal to: %n" - + " ")); + + "Expecting:%n" + + " %n" + + "to be equal to: %n" + + " ")); } try { assertThat(table).column("var2").value(2).isTrue(); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at index 2 of Column at index 1 (column name : VAR2) of TEST table] %n" - + "Expecting:%n" - + " %n" - + "to be equal to: %n" - + " ")); + + "Expecting:%n" + + " %n" + + "to be equal to: %n" + + " ")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsZero_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsZero_Test.java index 61a6a5f9..cedb3d5e 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsZero_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsZero_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeColumnValueAssert; import org.assertj.db.api.TableColumnValueAssert; @@ -21,15 +24,11 @@ import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnValueEquality} class : * {@link org.assertj.db.api.assertions.AssertOnValueEquality#isZero()} method. * * @author Régis Pouiller - * */ public class AssertOnValueEquality_IsZero_Test extends AbstractTest { @@ -69,20 +68,20 @@ public void should_fail_because_value_is_not_zero() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 2 (column name : VAR3) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting:%n" - + " <2>%n" - + "to be equal to: %n" - + " <0>")); + + "Expecting:%n" + + " <2>%n" + + "to be equal to: %n" + + " <0>")); } try { assertThat(table).column("var3").value().isZero(); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at index 0 of Column at index 2 (column name : VAR3) of TEST table] %n" - + "Expecting:%n" - + " <2>%n" - + "to be equal to: %n" - + " <0>")); + + "Expecting:%n" + + " <2>%n" + + "to be equal to: %n" + + " <0>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_Boolean_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_Boolean_Test.java index f2b6088c..9e944944 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_Boolean_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_Boolean_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeColumnValueAssert; import org.assertj.db.api.TableColumnValueAssert; @@ -21,15 +24,11 @@ import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnValueInequality} class : * {@link org.assertj.db.api.assertions.AssertOnValueInequality#isNotEqualTo(Boolean)} method. * * @author Régis Pouiller - * */ public class AssertOnValueInequality_IsNotEqualTo_Boolean_Test extends AbstractTest { @@ -69,20 +68,20 @@ public void should_fail_because_value_is_equal_to() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 1 (column name : VAR2) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting:%n" - + " %n" - + "not to be equal to: %n" - + " ")); + + "Expecting:%n" + + " %n" + + "not to be equal to: %n" + + " ")); } try { assertThat(table).column("var2").value().isNotEqualTo(true); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at index 0 of Column at index 1 (column name : VAR2) of TEST table] %n" - + "Expecting:%n" - + " %n" - + "not to be equal to: %n" - + " ")); + + "Expecting:%n" + + " %n" + + "not to be equal to: %n" + + " ")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_Bytes_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_Bytes_Test.java index 6e920535..cc72a6d0 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_Bytes_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_Bytes_Test.java @@ -8,10 +8,14 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.assertj.db.api.Assertions.bytesContentFromClassPathOf; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeColumnValueAssert; import org.assertj.db.api.TableColumnValueAssert; @@ -21,16 +25,11 @@ import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.assertj.db.api.Assertions.bytesContentFromClassPathOf; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnValueInequality} class : * {@link org.assertj.db.api.assertions.AssertOnValueInequality#isNotEqualTo(byte[])} method. * * @author Régis Pouiller - * */ public class AssertOnValueInequality_IsNotEqualTo_Bytes_Test extends AbstractTest { @@ -72,14 +71,14 @@ public void should_fail_because_value_is_equal_to() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 10 (column name : VAR11) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting to be not equal to the value but was equal")); + + "Expecting to be not equal to the value but was equal")); } try { assertThat(table).column("var11").value().isNotEqualTo(bytesH2); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at index 0 of Column at index 10 (column name : VAR11) of TEST table] %n" - + "Expecting to be not equal to the value but was equal")); + + "Expecting to be not equal to the value but was equal")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_Character_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_Character_Test.java index ab99a921..6f967c46 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_Character_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_Character_Test.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; @@ -29,7 +29,6 @@ * {@link org.assertj.db.api.assertions.AssertOnValueInequality#isNotEqualTo(Character)} method. * * @author Régis Pouiller - * */ public class AssertOnValueInequality_IsNotEqualTo_Character_Test extends AbstractTest { @@ -69,20 +68,20 @@ public void should_fail_because_value_is_equal_to() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 15 (column name : VAR16) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting:%n" - + " <\"T\">%n" - + "not to be equal to: %n" - + " <'T'>")); + + "Expecting:%n" + + " <\"T\">%n" + + "not to be equal to: %n" + + " <'T'>")); } try { assertThat(table).column("var16").value().isNotEqualTo('T'); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at index 0 of Column at index 15 (column name : VAR16) of TEST table] %n" - + "Expecting:%n" - + " <\"T\">%n" - + "not to be equal to: %n" - + " <'T'>")); + + "Expecting:%n" + + " <\"T\">%n" + + "not to be equal to: %n" + + " <'T'>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_DateTimeValue_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_DateTimeValue_Test.java index bf7e2ecb..abda9f4c 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_DateTimeValue_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_DateTimeValue_Test.java @@ -8,27 +8,30 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeColumnValueAssert; import org.assertj.db.api.TableColumnValueAssert; import org.assertj.db.common.AbstractTest; import org.assertj.db.common.NeedReload; -import org.assertj.db.type.*; +import org.assertj.db.type.Changes; +import org.assertj.db.type.DateTimeValue; +import org.assertj.db.type.DateValue; +import org.assertj.db.type.Table; +import org.assertj.db.type.TimeValue; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnValueInequality} class : * {@link org.assertj.db.api.assertions.AssertOnValueInequality#isNotEqualTo(org.assertj.db.type.DateTimeValue)} method. * * @author Régis Pouiller - * */ public class AssertOnValueInequality_IsNotEqualTo_DateTimeValue_Test extends AbstractTest { @@ -45,12 +48,12 @@ public void test_is_not_equal_to() { ChangeColumnValueAssert changeColumnValueAssert = assertThat(changes).change().column("var10").valueAtEndPoint(); ChangeColumnValueAssert changeColumnValueAssert2 = changeColumnValueAssert.isNotEqualTo(DateTimeValue.of(DateValue.of(2014, 5, 24), TimeValue - .of(9, 46, 31))); + .of(9, 46, 31))); Assertions.assertThat(changeColumnValueAssert).isSameAs(changeColumnValueAssert2); TableColumnValueAssert tableColumnValueAssert = assertThat(table).column("var10").value(); TableColumnValueAssert tableColumnValueAssert2 = tableColumnValueAssert.isNotEqualTo(DateTimeValue.of(DateValue.of(2014, 5, 24), TimeValue - .of(9, 46, 31))); + .of(9, 46, 31))); Assertions.assertThat(tableColumnValueAssert).isSameAs(tableColumnValueAssert2); } @@ -67,25 +70,25 @@ public void should_fail_because_value_is_equal_to() { try { assertThat(changes).change().column("var10").valueAtEndPoint().isNotEqualTo(DateTimeValue.of(DateValue.of(2014, 5, 24), TimeValue - .of(9, 46, 30))); + .of(9, 46, 30))); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 9 (column name : VAR10) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting:%n" - + " <2014-05-24T09:46:30.000000000>%n" - + "not to be equal to: %n" - + " <2014-05-24T09:46:30.000000000>")); + + "Expecting:%n" + + " <2014-05-24T09:46:30.000000000>%n" + + "not to be equal to: %n" + + " <2014-05-24T09:46:30.000000000>")); } try { assertThat(table).column("var10").value().isNotEqualTo(DateTimeValue.of(DateValue.of(2014, 5, 24), TimeValue - .of(9, 46, 30))); + .of(9, 46, 30))); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at index 0 of Column at index 9 (column name : VAR10) of TEST table] %n" - + "Expecting:%n" - + " <2014-05-24T09:46:30.000000000>%n" - + "not to be equal to: %n" - + " <2014-05-24T09:46:30.000000000>")); + + "Expecting:%n" + + " <2014-05-24T09:46:30.000000000>%n" + + "not to be equal to: %n" + + " <2014-05-24T09:46:30.000000000>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_DateValue_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_DateValue_Test.java index 09bc364d..aee43532 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_DateValue_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_DateValue_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeColumnValueAssert; import org.assertj.db.api.TableColumnValueAssert; @@ -22,15 +25,11 @@ import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnValueInequality} class : * {@link org.assertj.db.api.assertions.AssertOnValueInequality#isNotEqualTo(org.assertj.db.type.DateValue)} method. * * @author Régis Pouiller - * */ public class AssertOnValueInequality_IsNotEqualTo_DateValue_Test extends AbstractTest { @@ -70,20 +69,20 @@ public void should_fail_because_value_is_equal_to() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 8 (column name : VAR9) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting:%n" - + " <2014-05-24>%n" - + "not to be equal to: %n" - + " <2014-05-24>")); + + "Expecting:%n" + + " <2014-05-24>%n" + + "not to be equal to: %n" + + " <2014-05-24>")); } try { assertThat(table).column("var9").value().isNotEqualTo(DateValue.of(2014, 5, 24)); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at index 0 of Column at index 8 (column name : VAR9) of TEST table] %n" - + "Expecting:%n" - + " <2014-05-24>%n" - + "not to be equal to: %n" - + " <2014-05-24>")); + + "Expecting:%n" + + " <2014-05-24>%n" + + "not to be equal to: %n" + + " <2014-05-24>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_LocalDateTime_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_LocalDateTime_Test.java index c32b1efe..dd5f978a 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_LocalDateTime_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_LocalDateTime_Test.java @@ -8,10 +8,15 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + +import java.time.LocalDateTime; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeColumnValueAssert; import org.assertj.db.api.TableColumnValueAssert; @@ -21,11 +26,6 @@ import org.assertj.db.type.Table; import org.junit.Test; -import java.time.LocalDateTime; - -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnValueInequality} class : * {@link org.assertj.db.api.assertions.AssertOnValueInequality#isNotEqualTo(java.time.LocalDateTime)} method. @@ -70,20 +70,20 @@ public void should_fail_because_value_is_equal_to() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 9 (column name : VAR10) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting:%n" - + " <2014-05-24T09:46:30.000000000>%n" - + "not to be equal to: %n" - + " <2014-05-24T09:46:30.000000000>")); + + "Expecting:%n" + + " <2014-05-24T09:46:30.000000000>%n" + + "not to be equal to: %n" + + " <2014-05-24T09:46:30.000000000>")); } try { assertThat(table).column("var10").value().isNotEqualTo(LocalDateTime.of(2014, 5, 24, 9, 46, 30)); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at index 0 of Column at index 9 (column name : VAR10) of TEST table] %n" - + "Expecting:%n" - + " <2014-05-24T09:46:30.000000000>%n" - + "not to be equal to: %n" - + " <2014-05-24T09:46:30.000000000>")); + + "Expecting:%n" + + " <2014-05-24T09:46:30.000000000>%n" + + "not to be equal to: %n" + + " <2014-05-24T09:46:30.000000000>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_LocalDate_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_LocalDate_Test.java index 33e677ad..e8b2ad2b 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_LocalDate_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_LocalDate_Test.java @@ -8,10 +8,15 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + +import java.time.LocalDate; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeColumnValueAssert; import org.assertj.db.api.TableColumnValueAssert; @@ -21,11 +26,6 @@ import org.assertj.db.type.Table; import org.junit.Test; -import java.time.LocalDate; - -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnValueInequality} class : * {@link org.assertj.db.api.assertions.AssertOnValueInequality#isNotEqualTo(java.time.LocalDate)} method. @@ -70,20 +70,20 @@ public void should_fail_because_value_is_equal_to() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 8 (column name : VAR9) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting:%n" - + " <2014-05-24>%n" - + "not to be equal to: %n" - + " <2014-05-24>")); + + "Expecting:%n" + + " <2014-05-24>%n" + + "not to be equal to: %n" + + " <2014-05-24>")); } try { assertThat(table).column("var9").value().isNotEqualTo(LocalDate.of(2014, 5, 24)); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at index 0 of Column at index 8 (column name : VAR9) of TEST table] %n" - + "Expecting:%n" - + " <2014-05-24>%n" - + "not to be equal to: %n" - + " <2014-05-24>")); + + "Expecting:%n" + + " <2014-05-24>%n" + + "not to be equal to: %n" + + " <2014-05-24>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_LocalTime_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_LocalTime_Test.java index 2c143ef0..742cfbd4 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_LocalTime_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_LocalTime_Test.java @@ -8,10 +8,15 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + +import java.time.LocalTime; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeColumnValueAssert; import org.assertj.db.api.TableColumnValueAssert; @@ -21,11 +26,6 @@ import org.assertj.db.type.Table; import org.junit.Test; -import java.time.LocalTime; - -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnValueInequality} class : * {@link org.assertj.db.api.assertions.AssertOnValueInequality#isNotEqualTo(java.time.LocalTime)} method. @@ -70,20 +70,20 @@ public void should_fail_because_value_is_equal_to() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 7 (column name : VAR8) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting:%n" - + " <09:46:30.000000000>%n" - + "not to be equal to: %n" - + " <09:46:30.000000000>")); + + "Expecting:%n" + + " <09:46:30.000000000>%n" + + "not to be equal to: %n" + + " <09:46:30.000000000>")); } try { assertThat(table).column("var8").value().isNotEqualTo(LocalTime.of(9, 46, 30)); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at index 0 of Column at index 7 (column name : VAR8) of TEST table] %n" - + "Expecting:%n" - + " <09:46:30.000000000>%n" - + "not to be equal to: %n" - + " <09:46:30.000000000>")); + + "Expecting:%n" + + " <09:46:30.000000000>%n" + + "not to be equal to: %n" + + " <09:46:30.000000000>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_Number_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_Number_Test.java index 39d441d2..17c12660 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_Number_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_Number_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeColumnValueAssert; import org.assertj.db.api.TableColumnValueAssert; @@ -21,15 +24,11 @@ import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnValueInequality} class : * {@link org.assertj.db.api.assertions.AssertOnValueInequality#isNotEqualTo(Number)} method. * * @author Régis Pouiller - * */ public class AssertOnValueInequality_IsNotEqualTo_Number_Test extends AbstractTest { @@ -69,20 +68,20 @@ public void should_fail_because_value_is_equal_to() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 2 (column name : VAR3) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting:%n" - + " <2>%n" - + "not to be equal to: %n" - + " <2>")); + + "Expecting:%n" + + " <2>%n" + + "not to be equal to: %n" + + " <2>")); } try { assertThat(table).column("var3").value().isNotEqualTo(2); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at index 0 of Column at index 2 (column name : VAR3) of TEST table] %n" - + "Expecting:%n" - + " <2>%n" - + "not to be equal to: %n" - + " <2>")); + + "Expecting:%n" + + " <2>%n" + + "not to be equal to: %n" + + " <2>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_Object_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_Object_Test.java index d3060a22..b925765c 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_Object_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_Object_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeColumnValueAssert; import org.assertj.db.api.TableColumnValueAssert; @@ -21,15 +24,11 @@ import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnValueInequality} class : * {@link org.assertj.db.api.assertions.AssertOnValueInequality#isNotEqualTo(Object)} method. * * @author Régis Pouiller - * */ public class AssertOnValueInequality_IsNotEqualTo_Object_Test extends AbstractTest { @@ -69,20 +68,20 @@ public void should_fail_because_value_is_equal_to() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 2 (column name : VAR3) of Change at index 0 of Changes on TEST2 table of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting:%n" - + " %n" - + "not to be equal to: %n" - + " ")); + + "Expecting:%n" + + " %n" + + "not to be equal to: %n" + + " ")); } try { assertThat(table).column("var3").value(1).isNotEqualTo((Object) null); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at index 1 of Column at index 2 (column name : VAR3) of TEST2 table] %n" - + "Expecting:%n" - + " %n" - + "not to be equal to: %n" - + " ")); + + "Expecting:%n" + + " %n" + + "not to be equal to: %n" + + " ")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_String_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_String_Test.java index ac931b44..c491f36a 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_String_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_String_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeColumnValueAssert; import org.assertj.db.api.TableColumnValueAssert; @@ -21,15 +24,11 @@ import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnValueInequality} class : * {@link org.assertj.db.api.assertions.AssertOnValueInequality#isNotEqualTo(String)} method. * * @author Régis Pouiller - * */ public class AssertOnValueInequality_IsNotEqualTo_String_Test extends AbstractTest { @@ -69,20 +68,20 @@ public void should_fail_because_value_is_equal_to() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 11 (column name : VAR12) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting:%n" - + " <\"text\">%n" - + "not to be equal to: %n" - + " <\"text\">")); + + "Expecting:%n" + + " <\"text\">%n" + + "not to be equal to: %n" + + " <\"text\">")); } try { assertThat(table).column("var12").value().isNotEqualTo("text"); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at index 0 of Column at index 11 (column name : VAR12) of TEST table] %n" - + "Expecting:%n" - + " <\"text\">%n" - + "not to be equal to: %n" - + " <\"text\">")); + + "Expecting:%n" + + " <\"text\">%n" + + "not to be equal to: %n" + + " <\"text\">")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_TimeValue_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_TimeValue_Test.java index 863298f2..7fdc6825 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_TimeValue_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_TimeValue_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeColumnValueAssert; import org.assertj.db.api.TableColumnValueAssert; @@ -22,15 +25,11 @@ import org.assertj.db.type.TimeValue; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnValueInequality} class : * {@link org.assertj.db.api.assertions.AssertOnValueInequality#isNotEqualTo(org.assertj.db.type.TimeValue)} method. * * @author Régis Pouiller - * */ public class AssertOnValueInequality_IsNotEqualTo_TimeValue_Test extends AbstractTest { @@ -70,20 +69,20 @@ public void should_fail_because_value_is_equal_to() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 7 (column name : VAR8) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting:%n" - + " <09:46:30.000000000>%n" - + "not to be equal to: %n" - + " <09:46:30.000000000>")); + + "Expecting:%n" + + " <09:46:30.000000000>%n" + + "not to be equal to: %n" + + " <09:46:30.000000000>")); } try { assertThat(table).column("var8").value().isNotEqualTo(TimeValue.of(9, 46, 30)); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at index 0 of Column at index 7 (column name : VAR8) of TEST table] %n" - + "Expecting:%n" - + " <09:46:30.000000000>%n" - + "not to be equal to: %n" - + " <09:46:30.000000000>")); + + "Expecting:%n" + + " <09:46:30.000000000>%n" + + "not to be equal to: %n" + + " <09:46:30.000000000>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_UUID_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_UUID_Test.java index 1ab686f2..9774ce14 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_UUID_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotEqualTo_UUID_Test.java @@ -8,10 +8,15 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + +import java.util.UUID; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeColumnValueAssert; import org.assertj.db.api.TableColumnValueAssert; @@ -21,11 +26,6 @@ import org.assertj.db.type.Table; import org.junit.Test; -import java.util.UUID; - -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnValueInequality} class : * {@link org.assertj.db.api.assertions.AssertOnValueInequality#isNotEqualTo(UUID)} method. @@ -47,12 +47,12 @@ public void test_is_not_equal_to() { ChangeColumnValueAssert changeColumnValueAssert = assertThat(changes).change().column("var15").valueAtEndPoint(); ChangeColumnValueAssert changeColumnValueAssert2 = changeColumnValueAssert - .isNotEqualTo(UUID.fromString("0e2a1269-eff0-4233-b87b-b53e8b6f164d")); + .isNotEqualTo(UUID.fromString("0e2a1269-eff0-4233-b87b-b53e8b6f164d")); Assertions.assertThat(changeColumnValueAssert).isSameAs(changeColumnValueAssert2); TableColumnValueAssert tableColumnValueAssert = assertThat(table).column("var15").value(2); TableColumnValueAssert tableColumnValueAssert2 = tableColumnValueAssert - .isNotEqualTo(UUID.fromString("0e2a1269-eff0-4233-b87b-b53e8b6f164d")); + .isNotEqualTo(UUID.fromString("0e2a1269-eff0-4233-b87b-b53e8b6f164d")); Assertions.assertThat(tableColumnValueAssert).isSameAs(tableColumnValueAssert2); } @@ -69,11 +69,11 @@ public void should_fail_because_value_is_equal_to() { try { assertThat(changes).change().column("var15").valueAtEndPoint() - .isNotEqualTo(UUID.fromString("f96ec595-ce91-47cc-9152-ccc8ac48aad6")); + .isNotEqualTo(UUID.fromString("f96ec595-ce91-47cc-9152-ccc8ac48aad6")); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format( - "[Value at end point of Column at index 14 (column name : VAR15) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n" + "[Value at end point of Column at index 14 (column name : VAR15) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n" + "Expecting:%n" + " %n" + "not to be equal to: %n" @@ -84,11 +84,11 @@ public void should_fail_because_value_is_equal_to() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo( - String.format("[Value at index 0 of Column at index 14 (column name : VAR15) of TEST table] %n" - + "Expecting:%n" - + " %n" - + "not to be equal to: %n" - + " ")); + String.format("[Value at index 0 of Column at index 14 (column name : VAR15) of TEST table] %n" + + "Expecting:%n" + + " %n" + + "not to be equal to: %n" + + " ")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotZero_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotZero_Test.java index 594f2e5b..316670d0 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotZero_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueInequality_IsNotZero_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeColumnValueAssert; import org.assertj.db.api.TableColumnValueAssert; @@ -21,15 +24,11 @@ import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnValueInequality} class : * {@link org.assertj.db.api.assertions.AssertOnValueInequality#isNotZero()} method. * * @author Régis Pouiller - * */ public class AssertOnValueInequality_IsNotZero_Test extends AbstractTest { @@ -69,20 +68,20 @@ public void should_fail_because_value_is_zero() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 2 (column name : VAR3) of Change at index 0 (with primary key : [1000]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting:%n" - + " <0>%n" - + "not to be equal to: %n" - + " <0>")); + + "Expecting:%n" + + " <0>%n" + + "not to be equal to: %n" + + " <0>")); } try { assertThat(table).column("var3").value(3).isNotZero(); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at index 3 of Column at index 2 (column name : VAR3) of TEST table] %n" - + "Expecting:%n" - + " <0>%n" - + "not to be equal to: %n" - + " <0>")); + + "Expecting:%n" + + " <0>%n" + + "not to be equal to: %n" + + " <0>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueNullity_IsNotNull_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueNullity_IsNotNull_Test.java index f2987f49..2d878b8f 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueNullity_IsNotNull_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueNullity_IsNotNull_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeColumnValueAssert; import org.assertj.db.api.TableColumnValueAssert; @@ -21,15 +24,11 @@ import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnValueNullity} class : * {@link org.assertj.db.api.assertions.AssertOnValueNullity#isNotNull()} method. * * @author Régis Pouiller - * */ public class AssertOnValueNullity_IsNotNull_Test extends AbstractTest { @@ -69,14 +68,14 @@ public void should_fail_because_value_is_null() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 2 (column name : VAR3) of Change at index 0 of Changes on TEST2 table of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting actual not to be null")); + + "Expecting actual not to be null")); } try { assertThat(table).column("var3").value(1).isNotNull(); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at index 1 of Column at index 2 (column name : VAR3) of TEST2 table] %n" - + "Expecting actual not to be null")); + + "Expecting actual not to be null")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueNullity_IsNull_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueNullity_IsNull_Test.java index 4561c6df..b786ed8c 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueNullity_IsNull_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueNullity_IsNull_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeColumnValueAssert; import org.assertj.db.api.TableColumnValueAssert; @@ -21,15 +24,11 @@ import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnValueNullity} class : * {@link org.assertj.db.api.assertions.AssertOnValueNullity#isNull()} method. * * @author Régis Pouiller - * */ public class AssertOnValueNullity_IsNull_Test extends AbstractTest { diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueType_IsBoolean_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueType_IsBoolean_Test.java index c9f8fa55..4d583307 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueType_IsBoolean_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueType_IsBoolean_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeColumnValueAssert; import org.assertj.db.api.TableColumnValueAssert; @@ -21,15 +24,11 @@ import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnValueType} class : * {@link org.assertj.db.api.assertions.AssertOnValueType#isBoolean()} method. * * @author Régis Pouiller - * */ public class AssertOnValueType_IsBoolean_Test extends AbstractTest { @@ -69,24 +68,24 @@ public void should_fail_because_value_is_not_a_boolean() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 0 (column name : VAR1) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting:%n" - + " <1>%n" - + "to be of type%n" - + " %n" - + "but was of type%n" - + " ")); + + "Expecting:%n" + + " <1>%n" + + "to be of type%n" + + " %n" + + "but was of type%n" + + " ")); } try { assertThat(table).column("var1").value().isBoolean(); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at index 0 of Column at index 0 (column name : VAR1) of TEST table] %n" - + "Expecting:%n" - + " <1>%n" - + "to be of type%n" - + " %n" - + "but was of type%n" - + " ")); + + "Expecting:%n" + + " <1>%n" + + "to be of type%n" + + " %n" + + "but was of type%n" + + " ")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueType_IsBytes_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueType_IsBytes_Test.java index 42a3c0b8..f1551b72 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueType_IsBytes_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueType_IsBytes_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeColumnValueAssert; import org.assertj.db.api.TableColumnValueAssert; @@ -21,15 +24,11 @@ import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnValueType} class : * {@link org.assertj.db.api.assertions.AssertOnValueType#isBytes()} method. * * @author Régis Pouiller - * */ public class AssertOnValueType_IsBytes_Test extends AbstractTest { @@ -69,24 +68,24 @@ public void should_fail_because_value_is_not_bytes() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 0 (column name : VAR1) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting:%n" - + " <1>%n" - + "to be of type%n" - + " %n" - + "but was of type%n" - + " ")); + + "Expecting:%n" + + " <1>%n" + + "to be of type%n" + + " %n" + + "but was of type%n" + + " ")); } try { assertThat(table).column("var1").value().isBytes(); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at index 0 of Column at index 0 (column name : VAR1) of TEST table] %n" - + "Expecting:%n" - + " <1>%n" - + "to be of type%n" - + " %n" - + "but was of type%n" - + " ")); + + "Expecting:%n" + + " <1>%n" + + "to be of type%n" + + " %n" + + "but was of type%n" + + " ")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueType_IsDateTime_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueType_IsDateTime_Test.java index 4c53e54c..f9ddc273 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueType_IsDateTime_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueType_IsDateTime_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeColumnValueAssert; import org.assertj.db.api.TableColumnValueAssert; @@ -21,15 +24,11 @@ import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnValueType} class : * {@link org.assertj.db.api.assertions.AssertOnValueType#isDateTime()} method. * * @author Régis Pouiller - * */ public class AssertOnValueType_IsDateTime_Test extends AbstractTest { @@ -69,24 +68,24 @@ public void should_fail_because_value_is_not_a_date_time() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 0 (column name : VAR1) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting:%n" - + " <1>%n" - + "to be of type%n" - + " %n" - + "but was of type%n" - + " ")); + + "Expecting:%n" + + " <1>%n" + + "to be of type%n" + + " %n" + + "but was of type%n" + + " ")); } try { assertThat(table).column("var1").value().isDateTime(); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at index 0 of Column at index 0 (column name : VAR1) of TEST table] %n" - + "Expecting:%n" - + " <1>%n" - + "to be of type%n" - + " %n" - + "but was of type%n" - + " ")); + + "Expecting:%n" + + " <1>%n" + + "to be of type%n" + + " %n" + + "but was of type%n" + + " ")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueType_IsDate_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueType_IsDate_Test.java index 6a698437..84296047 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueType_IsDate_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueType_IsDate_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeColumnValueAssert; import org.assertj.db.api.TableColumnValueAssert; @@ -21,15 +24,11 @@ import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnValueType} class : * {@link org.assertj.db.api.assertions.AssertOnValueType#isDate()} method. * * @author Régis Pouiller - * */ public class AssertOnValueType_IsDate_Test extends AbstractTest { @@ -69,24 +68,24 @@ public void should_fail_because_value_is_not_a_date() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 0 (column name : VAR1) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting:%n" - + " <1>%n" - + "to be of type%n" - + " %n" - + "but was of type%n" - + " ")); + + "Expecting:%n" + + " <1>%n" + + "to be of type%n" + + " %n" + + "but was of type%n" + + " ")); } try { assertThat(table).column("var1").value().isDate(); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at index 0 of Column at index 0 (column name : VAR1) of TEST table] %n" - + "Expecting:%n" - + " <1>%n" - + "to be of type%n" - + " %n" - + "but was of type%n" - + " ")); + + "Expecting:%n" + + " <1>%n" + + "to be of type%n" + + " %n" + + "but was of type%n" + + " ")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueType_IsNumber_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueType_IsNumber_Test.java index 35c7f635..7f8789d9 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueType_IsNumber_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueType_IsNumber_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeColumnValueAssert; import org.assertj.db.api.TableColumnValueAssert; @@ -21,15 +24,11 @@ import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnValueType} class : * {@link org.assertj.db.api.assertions.AssertOnValueType#isNumber()} method. * * @author Régis Pouiller - * */ public class AssertOnValueType_IsNumber_Test extends AbstractTest { @@ -69,24 +68,24 @@ public void should_fail_because_value_is_not_a_number() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 1 (column name : VAR2) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting:%n" - + " %n" - + "to be of type%n" - + " %n" - + "but was of type%n" - + " ")); + + "Expecting:%n" + + " %n" + + "to be of type%n" + + " %n" + + "but was of type%n" + + " ")); } try { assertThat(table).column("var2").value().isNumber(); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at index 0 of Column at index 1 (column name : VAR2) of TEST table] %n" - + "Expecting:%n" - + " %n" - + "to be of type%n" - + " %n" - + "but was of type%n" - + " ")); + + "Expecting:%n" + + " %n" + + "to be of type%n" + + " %n" + + "but was of type%n" + + " ")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueType_IsOfAnyTypeIn_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueType_IsOfAnyTypeIn_Test.java index a7e9d733..1f67c697 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueType_IsOfAnyTypeIn_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueType_IsOfAnyTypeIn_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeColumnValueAssert; import org.assertj.db.api.TableColumnValueAssert; @@ -22,15 +25,11 @@ import org.assertj.db.type.ValueType; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnValueType} class : * {@link org.assertj.db.api.assertions.AssertOnValueType#isOfAnyTypeIn(org.assertj.db.type.ValueType...)} method. * * @author Régis Pouiller - * */ public class AssertOnValueType_IsOfAnyTypeIn_Test extends AbstractTest { @@ -70,24 +69,24 @@ public void should_fail_because_value_is_not_of_any_of_types() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 0 (column name : VAR1) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting:%n" - + " <1>%n" - + "to be of type%n" - + " <[BOOLEAN]>%n" - + "but was of type%n" - + " ")); + + "Expecting:%n" + + " <1>%n" + + "to be of type%n" + + " <[BOOLEAN]>%n" + + "but was of type%n" + + " ")); } try { assertThat(table).column("var1").value().isOfAnyTypeIn(ValueType.BOOLEAN); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at index 0 of Column at index 0 (column name : VAR1) of TEST table] %n" - + "Expecting:%n" - + " <1>%n" - + "to be of type%n" - + " <[BOOLEAN]>%n" - + "but was of type%n" - + " ")); + + "Expecting:%n" + + " <1>%n" + + "to be of type%n" + + " <[BOOLEAN]>%n" + + "but was of type%n" + + " ")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueType_IsOfType_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueType_IsOfType_Test.java index 127c1644..d59e7677 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueType_IsOfType_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueType_IsOfType_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeColumnValueAssert; import org.assertj.db.api.TableColumnValueAssert; @@ -22,15 +25,11 @@ import org.assertj.db.type.ValueType; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnValueType} class : * {@link org.assertj.db.api.assertions.AssertOnValueType#isOfType(org.assertj.db.type.ValueType)} method. * * @author Régis Pouiller - * */ public class AssertOnValueType_IsOfType_Test extends AbstractTest { @@ -70,24 +69,24 @@ public void should_fail_because_value_is_not_of_type() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 0 (column name : VAR1) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting:%n" - + " <1>%n" - + "to be of type%n" - + " %n" - + "but was of type%n" - + " ")); + + "Expecting:%n" + + " <1>%n" + + "to be of type%n" + + " %n" + + "but was of type%n" + + " ")); } try { assertThat(table).column("var1").value().isOfType(ValueType.BOOLEAN); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at index 0 of Column at index 0 (column name : VAR1) of TEST table] %n" - + "Expecting:%n" - + " <1>%n" - + "to be of type%n" - + " %n" - + "but was of type%n" - + " ")); + + "Expecting:%n" + + " <1>%n" + + "to be of type%n" + + " %n" + + "but was of type%n" + + " ")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueType_IsText_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueType_IsText_Test.java index 77669c61..bd67720a 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueType_IsText_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueType_IsText_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeColumnValueAssert; import org.assertj.db.api.TableColumnValueAssert; @@ -21,15 +24,11 @@ import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnValueType} class : * {@link org.assertj.db.api.assertions.AssertOnValueType#isText()} method. * * @author Régis Pouiller - * */ public class AssertOnValueType_IsText_Test extends AbstractTest { @@ -69,24 +68,24 @@ public void should_fail_because_value_is_not_a_text() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 0 (column name : VAR1) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting:%n" - + " <1>%n" - + "to be of type%n" - + " %n" - + "but was of type%n" - + " ")); + + "Expecting:%n" + + " <1>%n" + + "to be of type%n" + + " %n" + + "but was of type%n" + + " ")); } try { assertThat(table).column("var1").value().isText(); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at index 0 of Column at index 0 (column name : VAR1) of TEST table] %n" - + "Expecting:%n" - + " <1>%n" - + "to be of type%n" - + " %n" - + "but was of type%n" - + " ")); + + "Expecting:%n" + + " <1>%n" + + "to be of type%n" + + " %n" + + "but was of type%n" + + " ")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/AssertOnValueType_IsTime_Test.java b/src/test/java/org/assertj/db/api/assertions/AssertOnValueType_IsTime_Test.java index cf9f3877..f2f09360 100644 --- a/src/test/java/org/assertj/db/api/assertions/AssertOnValueType_IsTime_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/AssertOnValueType_IsTime_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeColumnValueAssert; import org.assertj.db.api.TableColumnValueAssert; @@ -21,15 +24,11 @@ import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.AssertOnValueType} class : * {@link org.assertj.db.api.assertions.AssertOnValueType#isTime()} method. * * @author Régis Pouiller - * */ public class AssertOnValueType_IsTime_Test extends AbstractTest { @@ -69,24 +68,24 @@ public void should_fail_because_value_is_not_a_time() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at end point of Column at index 0 (column name : VAR1) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:test' source] %n" - + "Expecting:%n" - + " <1>%n" - + "to be of type%n" - + "
    ")); + + "Expecting:%n" + + "to be on data type%n" + + " %n" + + "but was on data type%n" + + "
    ")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnDataType_IsOnRequest_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnDataType_IsOnRequest_Test.java index a7c02123..348b2183 100644 --- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnDataType_IsOnRequest_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnDataType_IsOnRequest_Test.java @@ -8,26 +8,29 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions.impl; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.core.api.WritableAssertionInfo; import org.assertj.db.api.TableAssert; import org.assertj.db.common.AbstractTest; -import org.assertj.db.type.*; +import org.assertj.db.type.Change; +import org.assertj.db.type.ChangeType; +import org.assertj.db.type.DataType; +import org.assertj.db.type.Row; +import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link AssertionsOnDataType} class : * {@link AssertionsOnDataType#isOnRequest(org.assertj.db.api.AbstractAssert, org.assertj.core.api.WritableAssertionInfo, org.assertj.db.type.Change)} method. * * @author Régis Pouiller - * */ public class AssertionsOnDataType_IsOnRequest_Test extends AbstractTest { @@ -63,11 +66,11 @@ public void should_fail_because_data_type_is_different() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[description] %n" - + "Expecting:%n" - + "to be on data type%n" - + " %n" - + "but was on data type%n" - + "
    ")); + + "Expecting:%n" + + "to be on data type%n" + + " %n" + + "but was on data type%n" + + "
    ")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnDataType_IsOnTable_Name_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnDataType_IsOnTable_Name_Test.java index 5a171097..b10688b3 100644 --- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnDataType_IsOnTable_Name_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnDataType_IsOnTable_Name_Test.java @@ -8,28 +8,31 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions.impl; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.core.api.WritableAssertionInfo; import org.assertj.db.api.AbstractAssert; import org.assertj.db.api.TableAssert; import org.assertj.db.common.AbstractTest; -import org.assertj.db.type.*; +import org.assertj.db.type.Change; +import org.assertj.db.type.ChangeType; +import org.assertj.db.type.DataType; +import org.assertj.db.type.Row; +import org.assertj.db.type.Table; import org.assertj.db.type.lettercase.LetterCase; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link AssertionsOnDataType} class : * {@link AssertionsOnDataType#isOnTable(AbstractAssert, WritableAssertionInfo, Change, LetterCase, String)} method. * * @author Régis Pouiller - * */ public class AssertionsOnDataType_IsOnTable_Name_Test extends AbstractTest { @@ -65,11 +68,11 @@ public void should_fail_because_data_type_is_different() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[description] %n" - + "Expecting:%n" - + "to be on data type%n" - + "
    %n" - + "but was on data type%n" - + " ")); + + "Expecting:%n" + + "to be on data type%n" + + "
    %n" + + "but was on data type%n" + + " ")); } } @@ -90,10 +93,10 @@ public void should_fail_because_table_name_is_different() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[description] %n" - + "Expecting to be on the table:%n" - + " <\"test2\">%n" - + "but was on the table:%n" - + " <\"test\">")); + + "Expecting to be on the table:%n" + + " <\"test2\">%n" + + "but was on the table:%n" + + " <\"test\">")); } } diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnDataType_IsOnTable_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnDataType_IsOnTable_Test.java index 24be1ec3..063fef24 100644 --- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnDataType_IsOnTable_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnDataType_IsOnTable_Test.java @@ -8,26 +8,29 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions.impl; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.core.api.WritableAssertionInfo; import org.assertj.db.api.TableAssert; import org.assertj.db.common.AbstractTest; -import org.assertj.db.type.*; +import org.assertj.db.type.Change; +import org.assertj.db.type.ChangeType; +import org.assertj.db.type.DataType; +import org.assertj.db.type.Row; +import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link AssertionsOnDataType} class : * {@link AssertionsOnDataType#isOnTable(org.assertj.db.api.AbstractAssert, org.assertj.core.api.WritableAssertionInfo, org.assertj.db.type.Change)} method. * * @author Régis Pouiller - * */ public class AssertionsOnDataType_IsOnTable_Test extends AbstractTest { @@ -63,11 +66,11 @@ public void should_fail_because_data_type_is_different() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[description] %n" - + "Expecting:%n" - + "to be on data type%n" - + "
    %n" - + "but was on data type%n" - + " ")); + + "Expecting:%n" + + "to be on data type%n" + + "
    %n" + + "but was on data type%n" + + " ")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnModifiedColumn_IsModified_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnModifiedColumn_IsModified_Test.java index 6e9a062a..24b35aec 100644 --- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnModifiedColumn_IsModified_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnModifiedColumn_IsModified_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions.impl; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.core.api.WritableAssertionInfo; import org.assertj.db.api.TableAssert; @@ -19,15 +22,11 @@ import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link AssertionsOnModifiedColumn} class : * {@link AssertionsOnModifiedColumn#isModified(org.assertj.db.api.AbstractAssert, org.assertj.core.api.WritableAssertionInfo, Object, Object)} method. * * @author Régis Pouiller - * */ public class AssertionsOnModifiedColumn_IsModified_Test extends AbstractTest { @@ -40,12 +39,12 @@ public void test_is_modified() throws Exception { Table table = new Table(); TableAssert tableAssert = assertThat(table); TableAssert tableAssert2 = AssertionsOnModifiedColumn.isModified(tableAssert, info, getValue(null, null), getValue( - null, "test")); + null, "test")); Assertions.assertThat(tableAssert2).isSameAs(tableAssert); tableAssert2 = AssertionsOnModifiedColumn.isModified(tableAssert, info, getValue(null, "test"), getValue(null, null)); Assertions.assertThat(tableAssert2).isSameAs(tableAssert); tableAssert2 = AssertionsOnModifiedColumn.isModified(tableAssert, info, getValue(null, "test"), getValue(null, - "test1")); + "test1")); Assertions.assertThat(tableAssert2).isSameAs(tableAssert); } @@ -63,20 +62,20 @@ public void should_fail_because_column_is_not_modified() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[description] %n" - + "Expecting :%n" - + " %n" - + "is modified but is still:%n" - + " ")); + + "Expecting :%n" + + " %n" + + "is modified but is still:%n" + + " ")); } try { AssertionsOnModifiedColumn.isModified(tableAssert, info, getValue(null, "test"), getValue(null, "test")); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[description] %n" - + "Expecting :%n" - + " <\"test\">%n" - + "is modified but is still:%n" - + " <\"test\">")); + + "Expecting :%n" + + " <\"test\">%n" + + "is modified but is still:%n" + + " <\"test\">")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnModifiedColumn_IsNotModified_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnModifiedColumn_IsNotModified_Test.java index 118a6ea0..9f000fbd 100644 --- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnModifiedColumn_IsNotModified_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnModifiedColumn_IsNotModified_Test.java @@ -8,10 +8,13 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions.impl; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.core.api.WritableAssertionInfo; import org.assertj.db.api.TableAssert; @@ -19,15 +22,11 @@ import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link AssertionsOnModifiedColumn} class : * {@link AssertionsOnModifiedColumn#isNotModified(org.assertj.db.api.AbstractAssert, org.assertj.core.api.WritableAssertionInfo, org.assertj.db.type.Value, org.assertj.db.type.Value)} method. * * @author Régis Pouiller - * */ public class AssertionsOnModifiedColumn_IsNotModified_Test extends AbstractTest { @@ -40,10 +39,10 @@ public void test_is_not_modified() throws Exception { Table table = new Table(); TableAssert tableAssert = assertThat(table); TableAssert tableAssert2 = AssertionsOnModifiedColumn.isNotModified(tableAssert, info, getValue(null, null), getValue( - null, null)); + null, null)); Assertions.assertThat(tableAssert2).isSameAs(tableAssert); tableAssert2 = AssertionsOnModifiedColumn.isNotModified(tableAssert, info, getValue(null, "test"), getValue(null, - "test")); + "test")); Assertions.assertThat(tableAssert2).isSameAs(tableAssert); } @@ -61,30 +60,30 @@ public void should_fail_because_column_is_modified() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[description] %n" - + "Expecting :%n" - + " %n" - + "is not modified but is :%n" - + " <\"test\">")); + + "Expecting :%n" + + " %n" + + "is not modified but is :%n" + + " <\"test\">")); } try { AssertionsOnModifiedColumn.isNotModified(tableAssert, info, getValue(null, "test"), getValue(null, null)); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[description] %n" - + "Expecting :%n" - + " <\"test\">%n" - + "is not modified but is :%n" - + " ")); + + "Expecting :%n" + + " <\"test\">%n" + + "is not modified but is :%n" + + " ")); } try { AssertionsOnModifiedColumn.isNotModified(tableAssert, info, getValue(null, "test"), getValue(null, "test1")); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[description] %n" - + "Expecting :%n" - + " <\"test\">%n" - + "is not modified but is :%n" - + " <\"test1\">")); + + "Expecting :%n" + + " <\"test\">%n" + + "is not modified but is :%n" + + " <\"test1\">")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnModifiedColumns_HasModifiedColumns_Integer_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnModifiedColumns_HasModifiedColumns_Integer_Test.java index abb2f680..5124f1af 100644 --- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnModifiedColumns_HasModifiedColumns_Integer_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnModifiedColumns_HasModifiedColumns_Integer_Test.java @@ -8,29 +8,32 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions.impl; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + +import java.sql.Date; +import java.util.Arrays; + import org.assertj.core.api.Assertions; import org.assertj.core.api.WritableAssertionInfo; import org.assertj.db.api.TableAssert; import org.assertj.db.common.AbstractTest; -import org.assertj.db.type.*; +import org.assertj.db.type.Change; +import org.assertj.db.type.ChangeType; +import org.assertj.db.type.DataType; +import org.assertj.db.type.Row; +import org.assertj.db.type.Table; import org.junit.Test; -import java.sql.Date; -import java.util.Arrays; - -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link AssertionsOnModifiedColumns} class : * {@link AssertionsOnModifiedColumns#hasModifiedColumns(org.assertj.db.api.AbstractAssert, org.assertj.core.api.WritableAssertionInfo, org.assertj.db.type.Change, Integer...)} method. * * @author Régis Pouiller - * */ public class AssertionsOnModifiedColumns_HasModifiedColumns_Integer_Test extends AbstractTest { @@ -43,13 +46,13 @@ public void test_has_modified_columns() throws Exception { Table table = new Table(); TableAssert tableAssert = assertThat(table); Row rowAtStartPoint = getRow(null, - Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), - Arrays.asList(getValue(null, 1), getValue(null, "Weaver"), getValue(null, "Sigourney"), - getValue(null, Date.valueOf("1949-10-08")))); + Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), + Arrays.asList(getValue(null, 1), getValue(null, "Weaver"), getValue(null, "Sigourney"), + getValue(null, Date.valueOf("1949-10-08")))); Row rowAtEndPoint = getRow(null, - Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), - Arrays.asList(getValue(null, 1), getValue(null, "Weaverr"), getValue(null, "Sigourneyy"), - getValue(null, Date.valueOf("1949-10-08")))); + Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), + Arrays.asList(getValue(null, 1), getValue(null, "Weaverr"), getValue(null, "Sigourneyy"), + getValue(null, Date.valueOf("1949-10-08")))); Change change = getChange(DataType.TABLE, "test", ChangeType.MODIFICATION, rowAtStartPoint, rowAtEndPoint); TableAssert tableAssert2 = AssertionsOnModifiedColumns.hasModifiedColumns(tableAssert, info, change, 1, 2); Assertions.assertThat(tableAssert2).isSameAs(tableAssert); @@ -67,23 +70,23 @@ public void should_fail_because_modified_columns_are_different() throws Exceptio Table table = new Table(); TableAssert tableAssert = assertThat(table); Row rowAtStartPoint = getRow(null, - Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), - Arrays.asList(getValue(null, 1), getValue(null, "Weaver"), getValue(null, "Sigourney"), - getValue(null, Date.valueOf("1949-10-08")))); + Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), + Arrays.asList(getValue(null, 1), getValue(null, "Weaver"), getValue(null, "Sigourney"), + getValue(null, Date.valueOf("1949-10-08")))); Row rowAtEndPoint = getRow(null, - Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), - Arrays.asList(getValue(null, 1), getValue(null, "Weaverr"), getValue(null, "Sigourneyy"), - getValue(null, Date.valueOf("1949-10-08")))); + Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), + Arrays.asList(getValue(null, 1), getValue(null, "Weaverr"), getValue(null, "Sigourneyy"), + getValue(null, Date.valueOf("1949-10-08")))); Change change = getChange(DataType.TABLE, "test", ChangeType.MODIFICATION, rowAtStartPoint, rowAtEndPoint); try { AssertionsOnModifiedColumns.hasModifiedColumns(tableAssert, info, change, 2, 3); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[description] %n" - + "Expecting :%n" - + " [2, 3]%n" - + "as indexes of modified columns but was:%n" - + " [1, 2]")); + + "Expecting :%n" + + " [2, 3]%n" + + "as indexes of modified columns but was:%n" + + " [1, 2]")); } } @@ -97,13 +100,13 @@ public void should_fail_because_expected_index_must_be_not_null() throws Excepti Table table = new Table(); TableAssert tableAssert = assertThat(table); Row rowAtStartPoint = getRow(null, - Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), - Arrays.asList(getValue(null, 1), getValue(null, "Weaver"), getValue(null, "Sigourney"), - getValue(null, Date.valueOf("1949-10-08")))); + Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), + Arrays.asList(getValue(null, 1), getValue(null, "Weaver"), getValue(null, "Sigourney"), + getValue(null, Date.valueOf("1949-10-08")))); Row rowAtEndPoint = getRow(null, - Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), - Arrays.asList(getValue(null, 1), getValue(null, "Weaverr"), getValue(null, "Sigourneyy"), - getValue(null, Date.valueOf("1949-10-08")))); + Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), + Arrays.asList(getValue(null, 1), getValue(null, "Weaverr"), getValue(null, "Sigourneyy"), + getValue(null, Date.valueOf("1949-10-08")))); Change change = getChange(DataType.TABLE, "test", ChangeType.MODIFICATION, rowAtStartPoint, rowAtEndPoint); try { AssertionsOnModifiedColumns.hasModifiedColumns(tableAssert, info, change, 1, null); @@ -123,13 +126,13 @@ public void should_fail_because_expected_indexes_must_be_not_null() throws Excep Table table = new Table(); TableAssert tableAssert = assertThat(table); Row rowAtStartPoint = getRow(null, - Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), - Arrays.asList(getValue(null, 1), getValue(null, "Weaver"), getValue(null, "Sigourney"), - getValue(null, Date.valueOf("1949-10-08")))); + Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), + Arrays.asList(getValue(null, 1), getValue(null, "Weaver"), getValue(null, "Sigourney"), + getValue(null, Date.valueOf("1949-10-08")))); Row rowAtEndPoint = getRow(null, - Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), - Arrays.asList(getValue(null, 1), getValue(null, "Weaverr"), getValue(null, "Sigourneyy"), - getValue(null, Date.valueOf("1949-10-08")))); + Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), + Arrays.asList(getValue(null, 1), getValue(null, "Weaverr"), getValue(null, "Sigourneyy"), + getValue(null, Date.valueOf("1949-10-08")))); Change change = getChange(DataType.TABLE, "test", ChangeType.MODIFICATION, rowAtStartPoint, rowAtEndPoint); try { AssertionsOnModifiedColumns.hasModifiedColumns(tableAssert, info, change, (Integer[]) null); diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnModifiedColumns_HasModifiedColumns_String_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnModifiedColumns_HasModifiedColumns_String_Test.java index 689c1f19..8c9f3154 100644 --- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnModifiedColumns_HasModifiedColumns_String_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnModifiedColumns_HasModifiedColumns_String_Test.java @@ -8,32 +8,35 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions.impl; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + +import java.sql.Date; +import java.util.Arrays; + import org.assertj.core.api.Assertions; import org.assertj.core.api.WritableAssertionInfo; import org.assertj.db.api.TableAssert; import org.assertj.db.common.AbstractTest; -import org.assertj.db.type.*; +import org.assertj.db.type.Change; +import org.assertj.db.type.ChangeType; +import org.assertj.db.type.DataType; +import org.assertj.db.type.Row; +import org.assertj.db.type.Table; import org.assertj.db.type.lettercase.CaseComparisons; import org.assertj.db.type.lettercase.CaseConversions; import org.assertj.db.type.lettercase.LetterCase; import org.junit.Test; -import java.sql.Date; -import java.util.Arrays; - -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link AssertionsOnModifiedColumns} class : * {@link AssertionsOnModifiedColumns#hasModifiedColumns(org.assertj.db.api.AbstractAssert, org.assertj.core.api.WritableAssertionInfo, org.assertj.db.type.Change, LetterCase, String...)} method. * * @author Régis Pouiller - * */ public class AssertionsOnModifiedColumns_HasModifiedColumns_String_Test extends AbstractTest { @@ -46,13 +49,13 @@ public void test_has_modified_columns() throws Exception { Table table = new Table(); TableAssert tableAssert = assertThat(table); Row rowAtStartPoint = getRow(null, - Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), - Arrays.asList(getValue(null, 1), getValue(null, "Weaver"), getValue(null, "Sigourney"), - getValue(null, Date.valueOf("1949-10-08")))); + Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), + Arrays.asList(getValue(null, 1), getValue(null, "Weaver"), getValue(null, "Sigourney"), + getValue(null, Date.valueOf("1949-10-08")))); Row rowAtEndPoint = getRow(null, - Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), - Arrays.asList(getValue(null, 1), getValue(null, "Weaverr"), getValue(null, "Sigourneyy"), - getValue(null, Date.valueOf("1949-10-08")))); + Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), + Arrays.asList(getValue(null, 1), getValue(null, "Weaverr"), getValue(null, "Sigourneyy"), + getValue(null, Date.valueOf("1949-10-08")))); Change change = getChange(DataType.TABLE, "test", ChangeType.MODIFICATION, rowAtStartPoint, rowAtEndPoint); TableAssert tableAssert2 = AssertionsOnModifiedColumns.hasModifiedColumns(tableAssert, info, change, LetterCase.COLUMN_DEFAULT, "NAME", "FIRSTNAME"); Assertions.assertThat(tableAssert2).isSameAs(tableAssert); @@ -72,68 +75,68 @@ public void should_fail_because_column_names_are_different() throws Exception { Table table = new Table(); TableAssert tableAssert = assertThat(table); Row rowAtStartPoint = getRow(null, - Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), - Arrays.asList(getValue(null, 1), getValue(null, "Weaver"), getValue(null, "Sigourney"), - getValue(null, Date.valueOf("1949-10-08")))); + Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), + Arrays.asList(getValue(null, 1), getValue(null, "Weaver"), getValue(null, "Sigourney"), + getValue(null, Date.valueOf("1949-10-08")))); Row rowAtEndPoint = getRow(null, - Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), - Arrays.asList(getValue(null, 1), getValue(null, "Weaverr"), getValue(null, "Sigourneyy"), - getValue(null, Date.valueOf("1949-10-08")))); + Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), + Arrays.asList(getValue(null, 1), getValue(null, "Weaverr"), getValue(null, "Sigourneyy"), + getValue(null, Date.valueOf("1949-10-08")))); Change change = getChange(DataType.TABLE, "test", ChangeType.MODIFICATION, rowAtStartPoint, rowAtEndPoint); try { AssertionsOnModifiedColumns.hasModifiedColumns(tableAssert, info, change, LetterCase.COLUMN_DEFAULT, "NAME", "BIRTH"); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[description] %n" - + "Expecting :%n" - + " [\"NAME\", \"BIRTH\"]%n" - + "as modified columns but was:%n" - + " [\"FIRSTNAME\", \"NAME\"]")); + + "Expecting :%n" + + " [\"NAME\", \"BIRTH\"]%n" + + "as modified columns but was:%n" + + " [\"FIRSTNAME\", \"NAME\"]")); } try { AssertionsOnModifiedColumns.hasModifiedColumns(tableAssert, info, change, LetterCase.getLetterCase( - CaseConversions.NO, - CaseComparisons.STRICT), "NAME", "FirstNAME"); + CaseConversions.NO, + CaseComparisons.STRICT), "NAME", "FirstNAME"); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[description] %n" - + "Expecting :%n" - + " [\"NAME\", \"FirstNAME\"]%n" - + "as modified columns but was:%n" - + " [\"FIRSTNAME\", \"NAME\"]")); + + "Expecting :%n" + + " [\"NAME\", \"FirstNAME\"]%n" + + "as modified columns but was:%n" + + " [\"FIRSTNAME\", \"NAME\"]")); } try { AssertionsOnModifiedColumns.hasModifiedColumns(tableAssert, info, change, LetterCase.getLetterCase(CaseConversions.NO, - CaseComparisons.STRICT), "FirstNAME", "NAME"); + CaseComparisons.STRICT), "FirstNAME", "NAME"); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[description] %n" - + "Expecting :%n" - + " [\"FirstNAME\", \"NAME\"]%n" - + "as modified columns but was:%n" - + " [\"FIRSTNAME\", \"NAME\"]")); + + "Expecting :%n" + + " [\"FirstNAME\", \"NAME\"]%n" + + "as modified columns but was:%n" + + " [\"FIRSTNAME\", \"NAME\"]")); } try { AssertionsOnModifiedColumns.hasModifiedColumns(tableAssert, info, change, LetterCase.getLetterCase(CaseConversions.NO, - CaseComparisons.STRICT), "FIRSTNAME", "NAME", "ZANE"); + CaseComparisons.STRICT), "FIRSTNAME", "NAME", "ZANE"); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[description] %n" - + "Expecting :%n" - + " [\"FIRSTNAME\", \"NAME\", \"ZANE\"]%n" - + "as modified columns but was:%n" - + " [\"FIRSTNAME\", \"NAME\"]")); + + "Expecting :%n" + + " [\"FIRSTNAME\", \"NAME\", \"ZANE\"]%n" + + "as modified columns but was:%n" + + " [\"FIRSTNAME\", \"NAME\"]")); } try { AssertionsOnModifiedColumns.hasModifiedColumns(tableAssert, info, change, LetterCase.getLetterCase(CaseConversions.NO, - CaseComparisons.STRICT), "FIRSTNAME"); + CaseComparisons.STRICT), "FIRSTNAME"); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[description] %n" - + "Expecting :%n" - + " [\"FIRSTNAME\"]%n" - + "as modified columns but was:%n" - + " [\"FIRSTNAME\", \"NAME\"]")); + + "Expecting :%n" + + " [\"FIRSTNAME\"]%n" + + "as modified columns but was:%n" + + " [\"FIRSTNAME\", \"NAME\"]")); } } @@ -147,23 +150,23 @@ public void should_fail_because_number_of_modified_columns_is_different() throws Table table = new Table(); TableAssert tableAssert = assertThat(table); Row rowAtStartPoint = getRow(null, - Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), - Arrays.asList(getValue(null, 1), getValue(null, "Weaver"), getValue(null, "Sigourney"), - getValue(null, Date.valueOf("1949-10-08")))); + Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), + Arrays.asList(getValue(null, 1), getValue(null, "Weaver"), getValue(null, "Sigourney"), + getValue(null, Date.valueOf("1949-10-08")))); Row rowAtEndPoint = getRow(null, - Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), - Arrays.asList(getValue(null, 1), getValue(null, "Weaverr"), getValue(null, "Sigourneyy"), - getValue(null, Date.valueOf("1949-10-08")))); + Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), + Arrays.asList(getValue(null, 1), getValue(null, "Weaverr"), getValue(null, "Sigourneyy"), + getValue(null, Date.valueOf("1949-10-08")))); Change change = getChange(DataType.TABLE, "test", ChangeType.MODIFICATION, rowAtStartPoint, rowAtEndPoint); try { AssertionsOnModifiedColumns.hasModifiedColumns(tableAssert, info, change, LetterCase.COLUMN_DEFAULT, "NAME", "FIRSTNAME", "BIRTH"); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[description] %n" - + "Expecting :%n" - + " [\"NAME\", \"FIRSTNAME\", \"BIRTH\"]%n" - + "as modified columns but was:%n" - + " [\"FIRSTNAME\", \"NAME\"]")); + + "Expecting :%n" + + " [\"NAME\", \"FIRSTNAME\", \"BIRTH\"]%n" + + "as modified columns but was:%n" + + " [\"FIRSTNAME\", \"NAME\"]")); } } @@ -177,13 +180,13 @@ public void should_fail_because_expected_name_must_be_not_null() throws Exceptio Table table = new Table(); TableAssert tableAssert = assertThat(table); Row rowAtStartPoint = getRow(null, - Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), - Arrays.asList(getValue(null, 1), getValue(null, "Weaver"), getValue(null, "Sigourney"), - getValue(null, Date.valueOf("1949-10-08")))); + Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), + Arrays.asList(getValue(null, 1), getValue(null, "Weaver"), getValue(null, "Sigourney"), + getValue(null, Date.valueOf("1949-10-08")))); Row rowAtEndPoint = getRow(null, - Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), - Arrays.asList(getValue(null, 1), getValue(null, "Weaverr"), getValue(null, "Sigourneyy"), - getValue(null, Date.valueOf("1949-10-08")))); + Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), + Arrays.asList(getValue(null, 1), getValue(null, "Weaverr"), getValue(null, "Sigourneyy"), + getValue(null, Date.valueOf("1949-10-08")))); Change change = getChange(DataType.TABLE, "test", ChangeType.MODIFICATION, rowAtStartPoint, rowAtEndPoint); try { AssertionsOnModifiedColumns.hasModifiedColumns(tableAssert, info, change, LetterCase.COLUMN_DEFAULT, "NAME", null); @@ -203,13 +206,13 @@ public void should_fail_because_expected_names_must_be_not_null() throws Excepti Table table = new Table(); TableAssert tableAssert = assertThat(table); Row rowAtStartPoint = getRow(null, - Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), - Arrays.asList(getValue(null, 1), getValue(null, "Weaver"), getValue(null, "Sigourney"), - getValue(null, Date.valueOf("1949-10-08")))); + Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), + Arrays.asList(getValue(null, 1), getValue(null, "Weaver"), getValue(null, "Sigourney"), + getValue(null, Date.valueOf("1949-10-08")))); Row rowAtEndPoint = getRow(null, - Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), - Arrays.asList(getValue(null, 1), getValue(null, "Weaverr"), getValue(null, "Sigourneyy"), - getValue(null, Date.valueOf("1949-10-08")))); + Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), + Arrays.asList(getValue(null, 1), getValue(null, "Weaverr"), getValue(null, "Sigourneyy"), + getValue(null, Date.valueOf("1949-10-08")))); Change change = getChange(DataType.TABLE, "test", ChangeType.MODIFICATION, rowAtStartPoint, rowAtEndPoint); try { AssertionsOnModifiedColumns.hasModifiedColumns(tableAssert, info, change, LetterCase.COLUMN_DEFAULT, (String[]) null); diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnModifiedColumns_HasNumberOfModifiedColumnsGreaterThanOrEqualTo_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnModifiedColumns_HasNumberOfModifiedColumnsGreaterThanOrEqualTo_Test.java index e56f8509..6c8ce672 100644 --- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnModifiedColumns_HasNumberOfModifiedColumnsGreaterThanOrEqualTo_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnModifiedColumns_HasNumberOfModifiedColumnsGreaterThanOrEqualTo_Test.java @@ -8,29 +8,32 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions.impl; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + +import java.sql.Date; +import java.util.Arrays; + import org.assertj.core.api.Assertions; import org.assertj.core.api.WritableAssertionInfo; import org.assertj.db.api.TableAssert; import org.assertj.db.common.AbstractTest; -import org.assertj.db.type.*; +import org.assertj.db.type.Change; +import org.assertj.db.type.ChangeType; +import org.assertj.db.type.DataType; +import org.assertj.db.type.Row; +import org.assertj.db.type.Table; import org.junit.Test; -import java.sql.Date; -import java.util.Arrays; - -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link AssertionsOnModifiedColumns} class : * {@link AssertionsOnModifiedColumns#hasNumberOfModifiedColumnsGreaterThanOrEqualTo(org.assertj.db.api.AbstractAssert, org.assertj.core.api.WritableAssertionInfo, org.assertj.db.type.Change, int)} method. * * @author Régis Pouiller - * */ public class AssertionsOnModifiedColumns_HasNumberOfModifiedColumnsGreaterThanOrEqualTo_Test extends AbstractTest { @@ -43,17 +46,17 @@ public void test_has_number_of_modified_columns_greater_than_or_equal_to() throw Table table = new Table(); TableAssert tableAssert = assertThat(table); Row rowAtStartPoint = getRow(null, - Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), - Arrays.asList(getValue(null, 1), getValue(null, "Weaver"), getValue(null, "Sigourney"), - getValue(null, Date.valueOf("1949-10-08")))); + Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), + Arrays.asList(getValue(null, 1), getValue(null, "Weaver"), getValue(null, "Sigourney"), + getValue(null, Date.valueOf("1949-10-08")))); Row rowAtEndPoint = getRow(null, - Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), - Arrays.asList(getValue(null, 1), getValue(null, "Weaverr"), getValue(null, "Sigourneyy"), - getValue(null, Date.valueOf("1949-10-08")))); + Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), + Arrays.asList(getValue(null, 1), getValue(null, "Weaverr"), getValue(null, "Sigourneyy"), + getValue(null, Date.valueOf("1949-10-08")))); Change change = getChange(DataType.TABLE, "test", ChangeType.MODIFICATION, rowAtStartPoint, rowAtEndPoint); TableAssert tableAssert2 = AssertionsOnModifiedColumns.hasNumberOfModifiedColumnsGreaterThanOrEqualTo(tableAssert, - info, change, - 2); + info, change, + 2); Assertions.assertThat(tableAssert2).isSameAs(tableAssert); } @@ -67,23 +70,23 @@ public void should_fail_because_number_of_modified_columns_is_less() throws Exce Table table = new Table(); TableAssert tableAssert = assertThat(table); Row rowAtStartPoint = getRow(null, - Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), - Arrays.asList(getValue(null, 1), getValue(null, "Weaver"), getValue(null, "Sigourney"), - getValue(null, Date.valueOf("1949-10-08")))); + Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), + Arrays.asList(getValue(null, 1), getValue(null, "Weaver"), getValue(null, "Sigourney"), + getValue(null, Date.valueOf("1949-10-08")))); Row rowAtEndPoint = getRow(null, - Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), - Arrays.asList(getValue(null, 1), getValue(null, "Weaverr"), getValue(null, "Sigourneyy"), - getValue(null, Date.valueOf("1949-10-08")))); + Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), + Arrays.asList(getValue(null, 1), getValue(null, "Weaverr"), getValue(null, "Sigourneyy"), + getValue(null, Date.valueOf("1949-10-08")))); Change change = getChange(DataType.TABLE, "test", ChangeType.MODIFICATION, rowAtStartPoint, rowAtEndPoint); try { AssertionsOnModifiedColumns.hasNumberOfModifiedColumnsGreaterThanOrEqualTo(tableAssert, info, change, 3); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[description] %n" - + "Expecting :%n" - + " number of modifications is greater than or equal to 3%n" - + "but was:%n" - + " 2")); + + "Expecting :%n" + + " number of modifications is greater than or equal to 3%n" + + "but was:%n" + + " 2")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnModifiedColumns_HasNumberOfModifiedColumnsGreaterThan_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnModifiedColumns_HasNumberOfModifiedColumnsGreaterThan_Test.java index 6119a5af..1ee7665d 100644 --- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnModifiedColumns_HasNumberOfModifiedColumnsGreaterThan_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnModifiedColumns_HasNumberOfModifiedColumnsGreaterThan_Test.java @@ -8,29 +8,32 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions.impl; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + +import java.sql.Date; +import java.util.Arrays; + import org.assertj.core.api.Assertions; import org.assertj.core.api.WritableAssertionInfo; import org.assertj.db.api.TableAssert; import org.assertj.db.common.AbstractTest; -import org.assertj.db.type.*; +import org.assertj.db.type.Change; +import org.assertj.db.type.ChangeType; +import org.assertj.db.type.DataType; +import org.assertj.db.type.Row; +import org.assertj.db.type.Table; import org.junit.Test; -import java.sql.Date; -import java.util.Arrays; - -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link AssertionsOnModifiedColumns} class : * {@link AssertionsOnModifiedColumns#hasNumberOfModifiedColumnsGreaterThan(org.assertj.db.api.AbstractAssert, org.assertj.core.api.WritableAssertionInfo, org.assertj.db.type.Change, int)} method. * * @author Régis Pouiller - * */ public class AssertionsOnModifiedColumns_HasNumberOfModifiedColumnsGreaterThan_Test extends AbstractTest { @@ -43,17 +46,17 @@ public void test_has_number_of_modified_columns_greater_than() throws Exception Table table = new Table(); TableAssert tableAssert = assertThat(table); Row rowAtStartPoint = getRow(null, - Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), - Arrays.asList(getValue(null, 1), getValue(null, "Weaver"), getValue(null, "Sigourney"), - getValue(null, Date.valueOf("1949-10-08")))); + Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), + Arrays.asList(getValue(null, 1), getValue(null, "Weaver"), getValue(null, "Sigourney"), + getValue(null, Date.valueOf("1949-10-08")))); Row rowAtEndPoint = getRow(null, - Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), - Arrays.asList(getValue(null, 1), getValue(null, "Weaverr"), getValue(null, "Sigourneyy"), - getValue(null, Date.valueOf("1949-10-08")))); + Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), + Arrays.asList(getValue(null, 1), getValue(null, "Weaverr"), getValue(null, "Sigourneyy"), + getValue(null, Date.valueOf("1949-10-08")))); Change change = getChange(DataType.TABLE, "test", ChangeType.MODIFICATION, rowAtStartPoint, rowAtEndPoint); TableAssert tableAssert2 = AssertionsOnModifiedColumns.hasNumberOfModifiedColumnsGreaterThan(tableAssert, - info, change, - 1); + info, change, + 1); Assertions.assertThat(tableAssert2).isSameAs(tableAssert); } @@ -67,23 +70,23 @@ public void should_fail_because_number_of_modified_columns_is_less_or_equal() th Table table = new Table(); TableAssert tableAssert = assertThat(table); Row rowAtStartPoint = getRow(null, - Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), - Arrays.asList(getValue(null, 1), getValue(null, "Weaver"), getValue(null, "Sigourney"), - getValue(null, Date.valueOf("1949-10-08")))); + Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), + Arrays.asList(getValue(null, 1), getValue(null, "Weaver"), getValue(null, "Sigourney"), + getValue(null, Date.valueOf("1949-10-08")))); Row rowAtEndPoint = getRow(null, - Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), - Arrays.asList(getValue(null, 1), getValue(null, "Weaverr"), getValue(null, "Sigourneyy"), - getValue(null, Date.valueOf("1949-10-08")))); + Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), + Arrays.asList(getValue(null, 1), getValue(null, "Weaverr"), getValue(null, "Sigourneyy"), + getValue(null, Date.valueOf("1949-10-08")))); Change change = getChange(DataType.TABLE, "test", ChangeType.MODIFICATION, rowAtStartPoint, rowAtEndPoint); try { AssertionsOnModifiedColumns.hasNumberOfModifiedColumnsGreaterThan(tableAssert, info, change, 3); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[description] %n" - + "Expecting :%n" - + " number of modifications is greater than 3%n" - + "but was:%n" - + " 2")); + + "Expecting :%n" + + " number of modifications is greater than 3%n" + + "but was:%n" + + " 2")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnModifiedColumns_HasNumberOfModifiedColumnsLessThanOrEqualTo_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnModifiedColumns_HasNumberOfModifiedColumnsLessThanOrEqualTo_Test.java index 093d2d09..3b70d52f 100644 --- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnModifiedColumns_HasNumberOfModifiedColumnsLessThanOrEqualTo_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnModifiedColumns_HasNumberOfModifiedColumnsLessThanOrEqualTo_Test.java @@ -8,29 +8,32 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions.impl; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + +import java.sql.Date; +import java.util.Arrays; + import org.assertj.core.api.Assertions; import org.assertj.core.api.WritableAssertionInfo; import org.assertj.db.api.TableAssert; import org.assertj.db.common.AbstractTest; -import org.assertj.db.type.*; +import org.assertj.db.type.Change; +import org.assertj.db.type.ChangeType; +import org.assertj.db.type.DataType; +import org.assertj.db.type.Row; +import org.assertj.db.type.Table; import org.junit.Test; -import java.sql.Date; -import java.util.Arrays; - -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link AssertionsOnModifiedColumns} class : * {@link AssertionsOnModifiedColumns#hasNumberOfModifiedColumnsLessThanOrEqualTo(org.assertj.db.api.AbstractAssert, org.assertj.core.api.WritableAssertionInfo, org.assertj.db.type.Change, int)} method. * * @author Régis Pouiller - * */ public class AssertionsOnModifiedColumns_HasNumberOfModifiedColumnsLessThanOrEqualTo_Test extends AbstractTest { @@ -43,16 +46,16 @@ public void test_has_number_of_modified_columns_less_than_or_equal_to() throws E Table table = new Table(); TableAssert tableAssert = assertThat(table); Row rowAtStartPoint = getRow(null, - Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), - Arrays.asList(getValue(null, 1), getValue(null, "Weaver"), getValue(null, "Sigourney"), - getValue(null, Date.valueOf("1949-10-08")))); + Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), + Arrays.asList(getValue(null, 1), getValue(null, "Weaver"), getValue(null, "Sigourney"), + getValue(null, Date.valueOf("1949-10-08")))); Row rowAtEndPoint = getRow(null, - Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), - Arrays.asList(getValue(null, 1), getValue(null, "Weaverr"), getValue(null, "Sigourneyy"), - getValue(null, Date.valueOf("1949-10-08")))); + Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), + Arrays.asList(getValue(null, 1), getValue(null, "Weaverr"), getValue(null, "Sigourneyy"), + getValue(null, Date.valueOf("1949-10-08")))); Change change = getChange(DataType.TABLE, "test", ChangeType.MODIFICATION, rowAtStartPoint, rowAtEndPoint); TableAssert tableAssert2 = AssertionsOnModifiedColumns.hasNumberOfModifiedColumnsLessThanOrEqualTo(tableAssert, - info, change, 2); + info, change, 2); Assertions.assertThat(tableAssert2).isSameAs(tableAssert); } @@ -66,23 +69,23 @@ public void should_fail_because_number_of_modified_columns_is_greater() throws E Table table = new Table(); TableAssert tableAssert = assertThat(table); Row rowAtStartPoint = getRow(null, - Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), - Arrays.asList(getValue(null, 1), getValue(null, "Weaver"), getValue(null, "Sigourney"), - getValue(null, Date.valueOf("1949-10-08")))); + Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), + Arrays.asList(getValue(null, 1), getValue(null, "Weaver"), getValue(null, "Sigourney"), + getValue(null, Date.valueOf("1949-10-08")))); Row rowAtEndPoint = getRow(null, - Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), - Arrays.asList(getValue(null, 1), getValue(null, "Weaverr"), getValue(null, "Sigourneyy"), - getValue(null, Date.valueOf("1949-10-08")))); + Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), + Arrays.asList(getValue(null, 1), getValue(null, "Weaverr"), getValue(null, "Sigourneyy"), + getValue(null, Date.valueOf("1949-10-08")))); Change change = getChange(DataType.TABLE, "test", ChangeType.MODIFICATION, rowAtStartPoint, rowAtEndPoint); try { AssertionsOnModifiedColumns.hasNumberOfModifiedColumnsLessThanOrEqualTo(tableAssert, info, change, 1); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[description] %n" - + "Expecting :%n" - + " number of modifications is less than or equal to 1%n" - + "but was:%n" - + " 2")); + + "Expecting :%n" + + " number of modifications is less than or equal to 1%n" + + "but was:%n" + + " 2")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnModifiedColumns_HasNumberOfModifiedColumnsLessThan_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnModifiedColumns_HasNumberOfModifiedColumnsLessThan_Test.java index 335a940d..e627c4e7 100644 --- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnModifiedColumns_HasNumberOfModifiedColumnsLessThan_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnModifiedColumns_HasNumberOfModifiedColumnsLessThan_Test.java @@ -8,29 +8,32 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions.impl; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + +import java.sql.Date; +import java.util.Arrays; + import org.assertj.core.api.Assertions; import org.assertj.core.api.WritableAssertionInfo; import org.assertj.db.api.TableAssert; import org.assertj.db.common.AbstractTest; -import org.assertj.db.type.*; +import org.assertj.db.type.Change; +import org.assertj.db.type.ChangeType; +import org.assertj.db.type.DataType; +import org.assertj.db.type.Row; +import org.assertj.db.type.Table; import org.junit.Test; -import java.sql.Date; -import java.util.Arrays; - -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link AssertionsOnModifiedColumns} class : * {@link AssertionsOnModifiedColumns#hasNumberOfModifiedColumnsLessThan(org.assertj.db.api.AbstractAssert, org.assertj.core.api.WritableAssertionInfo, org.assertj.db.type.Change, int)} method. * * @author Régis Pouiller - * */ public class AssertionsOnModifiedColumns_HasNumberOfModifiedColumnsLessThan_Test extends AbstractTest { @@ -43,16 +46,16 @@ public void test_has_number_of_modified_columns_less_than() throws Exception { Table table = new Table(); TableAssert tableAssert = assertThat(table); Row rowAtStartPoint = getRow(null, - Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), - Arrays.asList(getValue(null, 1), getValue(null, "Weaver"), getValue(null, "Sigourney"), - getValue(null, Date.valueOf("1949-10-08")))); + Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), + Arrays.asList(getValue(null, 1), getValue(null, "Weaver"), getValue(null, "Sigourney"), + getValue(null, Date.valueOf("1949-10-08")))); Row rowAtEndPoint = getRow(null, - Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), - Arrays.asList(getValue(null, 1), getValue(null, "Weaverr"), getValue(null, "Sigourneyy"), - getValue(null, Date.valueOf("1949-10-08")))); + Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), + Arrays.asList(getValue(null, 1), getValue(null, "Weaverr"), getValue(null, "Sigourneyy"), + getValue(null, Date.valueOf("1949-10-08")))); Change change = getChange(DataType.TABLE, "test", ChangeType.MODIFICATION, rowAtStartPoint, rowAtEndPoint); TableAssert tableAssert2 = AssertionsOnModifiedColumns.hasNumberOfModifiedColumnsLessThan(tableAssert, - info, change, 3); + info, change, 3); Assertions.assertThat(tableAssert2).isSameAs(tableAssert); } @@ -66,23 +69,23 @@ public void should_fail_because_number_of_modified_columns_is_greater_or_equal() Table table = new Table(); TableAssert tableAssert = assertThat(table); Row rowAtStartPoint = getRow(null, - Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), - Arrays.asList(getValue(null, 1), getValue(null, "Weaver"), getValue(null, "Sigourney"), - getValue(null, Date.valueOf("1949-10-08")))); + Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), + Arrays.asList(getValue(null, 1), getValue(null, "Weaver"), getValue(null, "Sigourney"), + getValue(null, Date.valueOf("1949-10-08")))); Row rowAtEndPoint = getRow(null, - Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), - Arrays.asList(getValue(null, 1), getValue(null, "Weaverr"), getValue(null, "Sigourneyy"), - getValue(null, Date.valueOf("1949-10-08")))); + Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), + Arrays.asList(getValue(null, 1), getValue(null, "Weaverr"), getValue(null, "Sigourneyy"), + getValue(null, Date.valueOf("1949-10-08")))); Change change = getChange(DataType.TABLE, "test", ChangeType.MODIFICATION, rowAtStartPoint, rowAtEndPoint); try { AssertionsOnModifiedColumns.hasNumberOfModifiedColumnsLessThan(tableAssert, info, change, 1); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[description] %n" - + "Expecting :%n" - + " number of modifications is less than 1%n" - + "but was:%n" - + " 2")); + + "Expecting :%n" + + " number of modifications is less than 1%n" + + "but was:%n" + + " 2")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnModifiedColumns_HasNumberOfModifiedColumns_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnModifiedColumns_HasNumberOfModifiedColumns_Test.java index cf990b9c..70f3330e 100644 --- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnModifiedColumns_HasNumberOfModifiedColumns_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnModifiedColumns_HasNumberOfModifiedColumns_Test.java @@ -8,29 +8,32 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions.impl; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + +import java.sql.Date; +import java.util.Arrays; + import org.assertj.core.api.Assertions; import org.assertj.core.api.WritableAssertionInfo; import org.assertj.db.api.TableAssert; import org.assertj.db.common.AbstractTest; -import org.assertj.db.type.*; +import org.assertj.db.type.Change; +import org.assertj.db.type.ChangeType; +import org.assertj.db.type.DataType; +import org.assertj.db.type.Row; +import org.assertj.db.type.Table; import org.junit.Test; -import java.sql.Date; -import java.util.Arrays; - -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link AssertionsOnModifiedColumns} class : * {@link AssertionsOnModifiedColumns#hasNumberOfModifiedColumns(org.assertj.db.api.AbstractAssert, org.assertj.core.api.WritableAssertionInfo, org.assertj.db.type.Change, int)} method. * * @author Régis Pouiller - * */ public class AssertionsOnModifiedColumns_HasNumberOfModifiedColumns_Test extends AbstractTest { @@ -43,13 +46,13 @@ public void test_has_number_of_modified_columns() throws Exception { Table table = new Table(); TableAssert tableAssert = assertThat(table); Row rowAtStartPoint = getRow(null, - Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), - Arrays.asList(getValue(null, 1), getValue(null, "Weaver"), getValue(null, "Sigourney"), - getValue(null, Date.valueOf("1949-10-08")))); + Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), + Arrays.asList(getValue(null, 1), getValue(null, "Weaver"), getValue(null, "Sigourney"), + getValue(null, Date.valueOf("1949-10-08")))); Row rowAtEndPoint = getRow(null, - Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), - Arrays.asList(getValue(null, 1), getValue(null, "Weaverr"), getValue(null, "Sigourneyy"), - getValue(null, Date.valueOf("1949-10-08")))); + Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), + Arrays.asList(getValue(null, 1), getValue(null, "Weaverr"), getValue(null, "Sigourneyy"), + getValue(null, Date.valueOf("1949-10-08")))); Change change = getChange(DataType.TABLE, "test", ChangeType.MODIFICATION, rowAtStartPoint, rowAtEndPoint); TableAssert tableAssert2 = AssertionsOnModifiedColumns.hasNumberOfModifiedColumns(tableAssert, info, change, 2); Assertions.assertThat(tableAssert2).isSameAs(tableAssert); @@ -65,23 +68,23 @@ public void should_fail_because_number_of_modified_columns_is_different() throws Table table = new Table(); TableAssert tableAssert = assertThat(table); Row rowAtStartPoint = getRow(null, - Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), - Arrays.asList(getValue(null, 1), getValue(null, "Weaver"), getValue(null, "Sigourney"), - getValue(null, Date.valueOf("1949-10-08")))); + Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), + Arrays.asList(getValue(null, 1), getValue(null, "Weaver"), getValue(null, "Sigourney"), + getValue(null, Date.valueOf("1949-10-08")))); Row rowAtEndPoint = getRow(null, - Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), - Arrays.asList(getValue(null, 1), getValue(null, "Weaverr"), getValue(null, "Sigourneyy"), - getValue(null, Date.valueOf("1949-10-08")))); + Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), + Arrays.asList(getValue(null, 1), getValue(null, "Weaverr"), getValue(null, "Sigourneyy"), + getValue(null, Date.valueOf("1949-10-08")))); Change change = getChange(DataType.TABLE, "test", ChangeType.MODIFICATION, rowAtStartPoint, rowAtEndPoint); try { AssertionsOnModifiedColumns.hasNumberOfModifiedColumns(tableAssert, info, change, 3); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[description] %n" - + "Expecting :%n" - + " 3 modifications%n" - + "but was:%n" - + " 2")); + + "Expecting :%n" + + " 3 modifications%n" + + "but was:%n" + + " 2")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnNumberOfChanges_HasNumberOfChangesGreaterThanOrEqualTo_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnNumberOfChanges_HasNumberOfChangesGreaterThanOrEqualTo_Test.java index b470f3ce..96e9695a 100644 --- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnNumberOfChanges_HasNumberOfChangesGreaterThanOrEqualTo_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnNumberOfChanges_HasNumberOfChangesGreaterThanOrEqualTo_Test.java @@ -8,29 +8,33 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions.impl; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + +import java.sql.Date; +import java.util.Arrays; + import org.assertj.core.api.Assertions; import org.assertj.core.api.WritableAssertionInfo; import org.assertj.db.api.TableAssert; import org.assertj.db.common.AbstractTest; -import org.assertj.db.type.*; +import org.assertj.db.type.Change; +import org.assertj.db.type.ChangeType; +import org.assertj.db.type.Changes; +import org.assertj.db.type.DataType; +import org.assertj.db.type.Row; +import org.assertj.db.type.Table; import org.junit.Test; -import java.sql.Date; -import java.util.Arrays; - -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link AssertionsOnNumberOfChanges} class : * {@link AssertionsOnNumberOfChanges#hasNumberOfChangesGreaterThanOrEqualTo(org.assertj.db.api.AbstractAssert, org.assertj.core.api.WritableAssertionInfo, org.assertj.db.type.Changes, int)} method. * * @author Régis Pouiller - * */ public class AssertionsOnNumberOfChanges_HasNumberOfChangesGreaterThanOrEqualTo_Test extends AbstractTest { @@ -43,17 +47,17 @@ public void test_has_number_of_changes_greater_than_or_equal_to() throws Excepti Table table = new Table(); TableAssert tableAssert = assertThat(table); Row rowAtStartPoint = getRow(Arrays.asList("ID"), - Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), - Arrays.asList(getValue(null, 1), getValue(null, "Weaver"), getValue(null, "Sigourney"), - getValue(null, Date.valueOf("1949-10-08")))); + Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), + Arrays.asList(getValue(null, 1), getValue(null, "Weaver"), getValue(null, "Sigourney"), + getValue(null, Date.valueOf("1949-10-08")))); Row rowAtEndPoint = getRow(Arrays.asList("ID"), - Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), - Arrays.asList(getValue(null, 1), getValue(null, "Weaverr"), getValue(null, "Sigourneyy"), - getValue(null, Date.valueOf("1949-10-08")))); + Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), + Arrays.asList(getValue(null, 1), getValue(null, "Weaverr"), getValue(null, "Sigourneyy"), + getValue(null, Date.valueOf("1949-10-08")))); Change change = getChange(DataType.TABLE, "test", ChangeType.CREATION, rowAtStartPoint, rowAtEndPoint); Changes changes = getChanges(Arrays.asList(change, change)); TableAssert tableAssert2 = AssertionsOnNumberOfChanges.hasNumberOfChangesGreaterThanOrEqualTo(tableAssert, info, - changes, 2); + changes, 2); Assertions.assertThat(tableAssert2).isSameAs(tableAssert); } @@ -67,13 +71,13 @@ public void should_fail_because_number_of_changes_is_less() throws Exception { Table table = new Table(); TableAssert tableAssert = assertThat(table); Row rowAtStartPoint = getRow(Arrays.asList("ID"), - Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), - Arrays.asList(getValue(null, 1), getValue(null, "Weaver"), getValue(null, "Sigourney"), - getValue(null, Date.valueOf("1949-10-08")))); + Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), + Arrays.asList(getValue(null, 1), getValue(null, "Weaver"), getValue(null, "Sigourney"), + getValue(null, Date.valueOf("1949-10-08")))); Row rowAtEndPoint = getRow(Arrays.asList("ID"), - Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), - Arrays.asList(getValue(null, 1), getValue(null, "Weaverr"), getValue(null, "Sigourneyy"), - getValue(null, Date.valueOf("1949-10-08")))); + Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), + Arrays.asList(getValue(null, 1), getValue(null, "Weaverr"), getValue(null, "Sigourneyy"), + getValue(null, Date.valueOf("1949-10-08")))); Change change = getChange(DataType.TABLE, "test", ChangeType.CREATION, rowAtStartPoint, rowAtEndPoint); Changes changes = getChanges(Arrays.asList(change, change)); try { @@ -81,10 +85,10 @@ public void should_fail_because_number_of_changes_is_less() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[description] %n" - + "Expecting size (number of changes) to be greater than or equal to :%n" - + " <3>%n" - + "but was:%n" - + " <2>")); + + "Expecting size (number of changes) to be greater than or equal to :%n" + + " <3>%n" + + "but was:%n" + + " <2>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnNumberOfChanges_HasNumberOfChangesGreaterThan_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnNumberOfChanges_HasNumberOfChangesGreaterThan_Test.java index dcd468fd..0ed570b8 100644 --- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnNumberOfChanges_HasNumberOfChangesGreaterThan_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnNumberOfChanges_HasNumberOfChangesGreaterThan_Test.java @@ -8,29 +8,33 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions.impl; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + +import java.sql.Date; +import java.util.Arrays; + import org.assertj.core.api.Assertions; import org.assertj.core.api.WritableAssertionInfo; import org.assertj.db.api.TableAssert; import org.assertj.db.common.AbstractTest; -import org.assertj.db.type.*; +import org.assertj.db.type.Change; +import org.assertj.db.type.ChangeType; +import org.assertj.db.type.Changes; +import org.assertj.db.type.DataType; +import org.assertj.db.type.Row; +import org.assertj.db.type.Table; import org.junit.Test; -import java.sql.Date; -import java.util.Arrays; - -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link AssertionsOnNumberOfChanges} class : * {@link AssertionsOnNumberOfChanges#hasNumberOfChangesGreaterThan(org.assertj.db.api.AbstractAssert, org.assertj.core.api.WritableAssertionInfo, org.assertj.db.type.Changes, int)} method. * * @author Régis Pouiller - * */ public class AssertionsOnNumberOfChanges_HasNumberOfChangesGreaterThan_Test extends AbstractTest { @@ -43,17 +47,17 @@ public void test_has_number_of_changes_greater_than_or_equal_to() throws Excepti Table table = new Table(); TableAssert tableAssert = assertThat(table); Row rowAtStartPoint = getRow(Arrays.asList("ID"), - Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), - Arrays.asList(getValue(null, 1), getValue(null, "Weaver"), getValue(null, "Sigourney"), - getValue(null, Date.valueOf("1949-10-08")))); + Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), + Arrays.asList(getValue(null, 1), getValue(null, "Weaver"), getValue(null, "Sigourney"), + getValue(null, Date.valueOf("1949-10-08")))); Row rowAtEndPoint = getRow(Arrays.asList("ID"), - Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), - Arrays.asList(getValue(null, 1), getValue(null, "Weaverr"), getValue(null, "Sigourneyy"), - getValue(null, Date.valueOf("1949-10-08")))); + Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), + Arrays.asList(getValue(null, 1), getValue(null, "Weaverr"), getValue(null, "Sigourneyy"), + getValue(null, Date.valueOf("1949-10-08")))); Change change = getChange(DataType.TABLE, "test", ChangeType.CREATION, rowAtStartPoint, rowAtEndPoint); Changes changes = getChanges(Arrays.asList(change, change)); TableAssert tableAssert2 = AssertionsOnNumberOfChanges.hasNumberOfChangesGreaterThan(tableAssert, info, - changes, 1); + changes, 1); Assertions.assertThat(tableAssert2).isSameAs(tableAssert); } @@ -67,13 +71,13 @@ public void should_fail_because_number_of_changes_is_less_or_equal() throws Exce Table table = new Table(); TableAssert tableAssert = assertThat(table); Row rowAtStartPoint = getRow(Arrays.asList("ID"), - Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), - Arrays.asList(getValue(null, 1), getValue(null, "Weaver"), getValue(null, "Sigourney"), - getValue(null, Date.valueOf("1949-10-08")))); + Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), + Arrays.asList(getValue(null, 1), getValue(null, "Weaver"), getValue(null, "Sigourney"), + getValue(null, Date.valueOf("1949-10-08")))); Row rowAtEndPoint = getRow(Arrays.asList("ID"), - Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), - Arrays.asList(getValue(null, 1), getValue(null, "Weaverr"), getValue(null, "Sigourneyy"), - getValue(null, Date.valueOf("1949-10-08")))); + Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), + Arrays.asList(getValue(null, 1), getValue(null, "Weaverr"), getValue(null, "Sigourneyy"), + getValue(null, Date.valueOf("1949-10-08")))); Change change = getChange(DataType.TABLE, "test", ChangeType.CREATION, rowAtStartPoint, rowAtEndPoint); Changes changes = getChanges(Arrays.asList(change, change)); try { @@ -81,10 +85,10 @@ public void should_fail_because_number_of_changes_is_less_or_equal() throws Exce fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[description] %n" - + "Expecting size (number of changes) to be greater than :%n" - + " <2>%n" - + "but was:%n" - + " <2>")); + + "Expecting size (number of changes) to be greater than :%n" + + " <2>%n" + + "but was:%n" + + " <2>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnNumberOfChanges_HasNumberOfChangesLessThanOrEqualTo_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnNumberOfChanges_HasNumberOfChangesLessThanOrEqualTo_Test.java index 61fa7e17..07b999c9 100644 --- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnNumberOfChanges_HasNumberOfChangesLessThanOrEqualTo_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnNumberOfChanges_HasNumberOfChangesLessThanOrEqualTo_Test.java @@ -8,29 +8,33 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions.impl; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + +import java.sql.Date; +import java.util.Arrays; + import org.assertj.core.api.Assertions; import org.assertj.core.api.WritableAssertionInfo; import org.assertj.db.api.TableAssert; import org.assertj.db.common.AbstractTest; -import org.assertj.db.type.*; +import org.assertj.db.type.Change; +import org.assertj.db.type.ChangeType; +import org.assertj.db.type.Changes; +import org.assertj.db.type.DataType; +import org.assertj.db.type.Row; +import org.assertj.db.type.Table; import org.junit.Test; -import java.sql.Date; -import java.util.Arrays; - -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link AssertionsOnNumberOfChanges} class : * {@link AssertionsOnNumberOfChanges#hasNumberOfChangesLessThanOrEqualTo(org.assertj.db.api.AbstractAssert, org.assertj.core.api.WritableAssertionInfo, org.assertj.db.type.Changes, int)} method. * * @author Régis Pouiller - * */ public class AssertionsOnNumberOfChanges_HasNumberOfChangesLessThanOrEqualTo_Test extends AbstractTest { @@ -43,17 +47,17 @@ public void test_has_number_of_changes_less_than_or_equal_to() throws Exception Table table = new Table(); TableAssert tableAssert = assertThat(table); Row rowAtStartPoint = getRow(Arrays.asList("ID"), - Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), - Arrays.asList(getValue(null, 1), getValue(null, "Weaver"), getValue(null, "Sigourney"), - getValue(null, Date.valueOf("1949-10-08")))); + Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), + Arrays.asList(getValue(null, 1), getValue(null, "Weaver"), getValue(null, "Sigourney"), + getValue(null, Date.valueOf("1949-10-08")))); Row rowAtEndPoint = getRow(Arrays.asList("ID"), - Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), - Arrays.asList(getValue(null, 1), getValue(null, "Weaverr"), getValue(null, "Sigourneyy"), - getValue(null, Date.valueOf("1949-10-08")))); + Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), + Arrays.asList(getValue(null, 1), getValue(null, "Weaverr"), getValue(null, "Sigourneyy"), + getValue(null, Date.valueOf("1949-10-08")))); Change change = getChange(DataType.TABLE, "test", ChangeType.CREATION, rowAtStartPoint, rowAtEndPoint); Changes changes = getChanges(Arrays.asList(change, change)); TableAssert tableAssert2 = AssertionsOnNumberOfChanges.hasNumberOfChangesLessThanOrEqualTo(tableAssert, info, - changes, 2); + changes, 2); Assertions.assertThat(tableAssert2).isSameAs(tableAssert); } @@ -67,13 +71,13 @@ public void should_fail_because_number_of_changes_is_greater() throws Exception Table table = new Table(); TableAssert tableAssert = assertThat(table); Row rowAtStartPoint = getRow(Arrays.asList("ID"), - Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), - Arrays.asList(getValue(null, 1), getValue(null, "Weaver"), getValue(null, "Sigourney"), - getValue(null, Date.valueOf("1949-10-08")))); + Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), + Arrays.asList(getValue(null, 1), getValue(null, "Weaver"), getValue(null, "Sigourney"), + getValue(null, Date.valueOf("1949-10-08")))); Row rowAtEndPoint = getRow(Arrays.asList("ID"), - Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), - Arrays.asList(getValue(null, 1), getValue(null, "Weaverr"), getValue(null, "Sigourneyy"), - getValue(null, Date.valueOf("1949-10-08")))); + Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), + Arrays.asList(getValue(null, 1), getValue(null, "Weaverr"), getValue(null, "Sigourneyy"), + getValue(null, Date.valueOf("1949-10-08")))); Change change = getChange(DataType.TABLE, "test", ChangeType.CREATION, rowAtStartPoint, rowAtEndPoint); Changes changes = getChanges(Arrays.asList(change, change)); try { @@ -81,10 +85,10 @@ public void should_fail_because_number_of_changes_is_greater() throws Exception fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[description] %n" - + "Expecting size (number of changes) to be less than or equal to :%n" - + " <1>%n" - + "but was:%n" - + " <2>")); + + "Expecting size (number of changes) to be less than or equal to :%n" + + " <1>%n" + + "but was:%n" + + " <2>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnNumberOfChanges_HasNumberOfChangesLessThan_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnNumberOfChanges_HasNumberOfChangesLessThan_Test.java index 613f6f90..9a770747 100644 --- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnNumberOfChanges_HasNumberOfChangesLessThan_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnNumberOfChanges_HasNumberOfChangesLessThan_Test.java @@ -8,29 +8,33 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions.impl; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + +import java.sql.Date; +import java.util.Arrays; + import org.assertj.core.api.Assertions; import org.assertj.core.api.WritableAssertionInfo; import org.assertj.db.api.TableAssert; import org.assertj.db.common.AbstractTest; -import org.assertj.db.type.*; +import org.assertj.db.type.Change; +import org.assertj.db.type.ChangeType; +import org.assertj.db.type.Changes; +import org.assertj.db.type.DataType; +import org.assertj.db.type.Row; +import org.assertj.db.type.Table; import org.junit.Test; -import java.sql.Date; -import java.util.Arrays; - -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link AssertionsOnNumberOfChanges} class : * {@link AssertionsOnNumberOfChanges#hasNumberOfChangesLessThan(org.assertj.db.api.AbstractAssert, org.assertj.core.api.WritableAssertionInfo, org.assertj.db.type.Changes, int)} method. * * @author Régis Pouiller - * */ public class AssertionsOnNumberOfChanges_HasNumberOfChangesLessThan_Test extends AbstractTest { @@ -43,17 +47,17 @@ public void test_has_number_of_changes_less_than() throws Exception { Table table = new Table(); TableAssert tableAssert = assertThat(table); Row rowAtStartPoint = getRow(Arrays.asList("ID"), - Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), - Arrays.asList(getValue(null, 1), getValue(null, "Weaver"), getValue(null, "Sigourney"), - getValue(null, Date.valueOf("1949-10-08")))); + Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), + Arrays.asList(getValue(null, 1), getValue(null, "Weaver"), getValue(null, "Sigourney"), + getValue(null, Date.valueOf("1949-10-08")))); Row rowAtEndPoint = getRow(Arrays.asList("ID"), - Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), - Arrays.asList(getValue(null, 1), getValue(null, "Weaverr"), getValue(null, "Sigourneyy"), - getValue(null, Date.valueOf("1949-10-08")))); + Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), + Arrays.asList(getValue(null, 1), getValue(null, "Weaverr"), getValue(null, "Sigourneyy"), + getValue(null, Date.valueOf("1949-10-08")))); Change change = getChange(DataType.TABLE, "test", ChangeType.CREATION, rowAtStartPoint, rowAtEndPoint); Changes changes = getChanges(Arrays.asList(change, change)); TableAssert tableAssert2 = AssertionsOnNumberOfChanges.hasNumberOfChangesLessThan(tableAssert, info, - changes, 3); + changes, 3); Assertions.assertThat(tableAssert2).isSameAs(tableAssert); } @@ -67,13 +71,13 @@ public void should_fail_because_number_of_changes_is_greater_or_equal() throws E Table table = new Table(); TableAssert tableAssert = assertThat(table); Row rowAtStartPoint = getRow(Arrays.asList("ID"), - Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), - Arrays.asList(getValue(null, 1), getValue(null, "Weaver"), getValue(null, "Sigourney"), - getValue(null, Date.valueOf("1949-10-08")))); + Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), + Arrays.asList(getValue(null, 1), getValue(null, "Weaver"), getValue(null, "Sigourney"), + getValue(null, Date.valueOf("1949-10-08")))); Row rowAtEndPoint = getRow(Arrays.asList("ID"), - Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), - Arrays.asList(getValue(null, 1), getValue(null, "Weaverr"), getValue(null, "Sigourneyy"), - getValue(null, Date.valueOf("1949-10-08")))); + Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), + Arrays.asList(getValue(null, 1), getValue(null, "Weaverr"), getValue(null, "Sigourneyy"), + getValue(null, Date.valueOf("1949-10-08")))); Change change = getChange(DataType.TABLE, "test", ChangeType.CREATION, rowAtStartPoint, rowAtEndPoint); Changes changes = getChanges(Arrays.asList(change, change)); try { @@ -81,10 +85,10 @@ public void should_fail_because_number_of_changes_is_greater_or_equal() throws E fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[description] %n" - + "Expecting size (number of changes) to be less than :%n" - + " <2>%n" - + "but was:%n" - + " <2>")); + + "Expecting size (number of changes) to be less than :%n" + + " <2>%n" + + "but was:%n" + + " <2>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnNumberOfChanges_HasNumberOfChanges_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnNumberOfChanges_HasNumberOfChanges_Test.java index c3fea7d5..4b5b1d55 100644 --- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnNumberOfChanges_HasNumberOfChanges_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnNumberOfChanges_HasNumberOfChanges_Test.java @@ -8,29 +8,33 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions.impl; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + +import java.sql.Date; +import java.util.Arrays; + import org.assertj.core.api.Assertions; import org.assertj.core.api.WritableAssertionInfo; import org.assertj.db.api.TableAssert; import org.assertj.db.common.AbstractTest; -import org.assertj.db.type.*; +import org.assertj.db.type.Change; +import org.assertj.db.type.ChangeType; +import org.assertj.db.type.Changes; +import org.assertj.db.type.DataType; +import org.assertj.db.type.Row; +import org.assertj.db.type.Table; import org.junit.Test; -import java.sql.Date; -import java.util.Arrays; - -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link AssertionsOnNumberOfChanges} class : * {@link AssertionsOnNumberOfChanges#hasNumberOfChanges(org.assertj.db.api.AbstractAssert, org.assertj.core.api.WritableAssertionInfo, org.assertj.db.type.Changes, int)} method. * * @author Régis Pouiller - * */ public class AssertionsOnNumberOfChanges_HasNumberOfChanges_Test extends AbstractTest { @@ -43,13 +47,13 @@ public void test_has_number_of_changes() throws Exception { Table table = new Table(); TableAssert tableAssert = assertThat(table); Row rowAtStartPoint = getRow(Arrays.asList("ID"), - Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), - Arrays.asList(getValue(null, 1), getValue(null, "Weaver"), getValue(null, "Sigourney"), - getValue(null, Date.valueOf("1949-10-08")))); + Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), + Arrays.asList(getValue(null, 1), getValue(null, "Weaver"), getValue(null, "Sigourney"), + getValue(null, Date.valueOf("1949-10-08")))); Row rowAtEndPoint = getRow(Arrays.asList("ID"), - Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), - Arrays.asList(getValue(null, 1), getValue(null, "Weaverr"), getValue(null, "Sigourneyy"), - getValue(null, Date.valueOf("1949-10-08")))); + Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), + Arrays.asList(getValue(null, 1), getValue(null, "Weaverr"), getValue(null, "Sigourneyy"), + getValue(null, Date.valueOf("1949-10-08")))); Change change = getChange(DataType.TABLE, "test", ChangeType.CREATION, rowAtStartPoint, rowAtEndPoint); Changes changes = getChanges(Arrays.asList(change, change)); TableAssert tableAssert2 = AssertionsOnNumberOfChanges.hasNumberOfChanges(tableAssert, info, changes, 2); @@ -66,13 +70,13 @@ public void should_fail_because_number_of_changes_is_different() throws Exceptio Table table = new Table(); TableAssert tableAssert = assertThat(table); Row rowAtStartPoint = getRow(Arrays.asList("ID"), - Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), - Arrays.asList(getValue(null, 1), getValue(null, "Weaver"), getValue(null, "Sigourney"), - getValue(null, Date.valueOf("1949-10-08")))); + Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), + Arrays.asList(getValue(null, 1), getValue(null, "Weaver"), getValue(null, "Sigourney"), + getValue(null, Date.valueOf("1949-10-08")))); Row rowAtEndPoint = getRow(Arrays.asList("ID"), - Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), - Arrays.asList(getValue(null, 1), getValue(null, "Weaverr"), getValue(null, "Sigourneyy"), - getValue(null, Date.valueOf("1949-10-08")))); + Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), + Arrays.asList(getValue(null, 1), getValue(null, "Weaverr"), getValue(null, "Sigourneyy"), + getValue(null, Date.valueOf("1949-10-08")))); Change change = getChange(DataType.TABLE, "test", ChangeType.CREATION, rowAtStartPoint, rowAtEndPoint); Changes changes = getChanges(Arrays.asList(change, change)); try { @@ -80,10 +84,10 @@ public void should_fail_because_number_of_changes_is_different() throws Exceptio fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[description] %n" - + "Expecting size (number of changes) to be equal to :%n" - + " <3>%n" - + "but was:%n" - + " <2>")); + + "Expecting size (number of changes) to be equal to :%n" + + " <3>%n" + + "but was:%n" + + " <2>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnNumberOfColumns_HasNumberOfColumnsGreaterThanOrEqualTo_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnNumberOfColumns_HasNumberOfColumnsGreaterThanOrEqualTo_Test.java index 112750d8..292a5160 100644 --- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnNumberOfColumns_HasNumberOfColumnsGreaterThanOrEqualTo_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnNumberOfColumns_HasNumberOfColumnsGreaterThanOrEqualTo_Test.java @@ -8,25 +8,24 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions.impl; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.core.api.WritableAssertionInfo; import org.assertj.db.api.TableAssert; import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link AssertionsOnNumberOfColumns} class : * {@link AssertionsOnNumberOfColumns#hasNumberOfColumnsGreaterThanOrEqualTo(org.assertj.db.api.AbstractAssert, org.assertj.core.api.WritableAssertionInfo, int, int)} method. * * @author Régis Pouiller - * */ public class AssertionsOnNumberOfColumns_HasNumberOfColumnsGreaterThanOrEqualTo_Test { @@ -39,7 +38,7 @@ public void test_has_number_of_columns_greater_than_or_equal_to() { Table table = new Table(); TableAssert tableAssert = assertThat(table); TableAssert tableAssert2 = AssertionsOnNumberOfColumns.hasNumberOfColumnsGreaterThanOrEqualTo(tableAssert, info, 3, - 3); + 3); Assertions.assertThat(tableAssert2).isSameAs(tableAssert); } @@ -57,10 +56,10 @@ public void should_fail_because_number_of_columns_is_less() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[description] %n" - + "Expecting size (number of columns) to be greater than or equal to :%n" - + " <4>%n" - + "but was:%n" - + " <3>")); + + "Expecting size (number of columns) to be greater than or equal to :%n" + + " <4>%n" + + "but was:%n" + + " <3>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnNumberOfColumns_HasNumberOfColumnsGreaterThan_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnNumberOfColumns_HasNumberOfColumnsGreaterThan_Test.java index 8d079a71..f46a455a 100644 --- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnNumberOfColumns_HasNumberOfColumnsGreaterThan_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnNumberOfColumns_HasNumberOfColumnsGreaterThan_Test.java @@ -8,25 +8,24 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions.impl; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.core.api.WritableAssertionInfo; import org.assertj.db.api.TableAssert; import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link AssertionsOnNumberOfColumns} class : * {@link AssertionsOnNumberOfColumns#hasNumberOfColumnsGreaterThan(org.assertj.db.api.AbstractAssert, org.assertj.core.api.WritableAssertionInfo, int, int)} method. * * @author Régis Pouiller - * */ public class AssertionsOnNumberOfColumns_HasNumberOfColumnsGreaterThan_Test { @@ -56,10 +55,10 @@ public void should_fail_because_number_of_columns_is_equal() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[description] %n" - + "Expecting size (number of columns) to be greater than :%n" - + " <3>%n" - + "but was:%n" - + " <3>")); + + "Expecting size (number of columns) to be greater than :%n" + + " <3>%n" + + "but was:%n" + + " <3>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnNumberOfColumns_HasNumberOfColumnsLessThanOrEqualTo_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnNumberOfColumns_HasNumberOfColumnsLessThanOrEqualTo_Test.java index b13792f3..459bcd68 100644 --- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnNumberOfColumns_HasNumberOfColumnsLessThanOrEqualTo_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnNumberOfColumns_HasNumberOfColumnsLessThanOrEqualTo_Test.java @@ -8,25 +8,24 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions.impl; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.core.api.WritableAssertionInfo; import org.assertj.db.api.TableAssert; import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link AssertionsOnNumberOfColumns} class : * {@link AssertionsOnNumberOfColumns#hasNumberOfColumnsLessThanOrEqualTo(org.assertj.db.api.AbstractAssert, org.assertj.core.api.WritableAssertionInfo, int, int)} method. * * @author Régis Pouiller - * */ public class AssertionsOnNumberOfColumns_HasNumberOfColumnsLessThanOrEqualTo_Test { @@ -56,10 +55,10 @@ public void should_fail_because_number_of_columns_is_more() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[description] %n" - + "Expecting size (number of columns) to be less than or equal to :%n" - + " <2>%n" - + "but was:%n" - + " <3>")); + + "Expecting size (number of columns) to be less than or equal to :%n" + + " <2>%n" + + "but was:%n" + + " <3>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnNumberOfColumns_HasNumberOfColumnsLessThan_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnNumberOfColumns_HasNumberOfColumnsLessThan_Test.java index 43fec72a..bac6f45c 100644 --- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnNumberOfColumns_HasNumberOfColumnsLessThan_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnNumberOfColumns_HasNumberOfColumnsLessThan_Test.java @@ -8,25 +8,24 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions.impl; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.core.api.WritableAssertionInfo; import org.assertj.db.api.TableAssert; import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link AssertionsOnNumberOfColumns} class : * {@link AssertionsOnNumberOfColumns#hasNumberOfColumnsLessThan(org.assertj.db.api.AbstractAssert, org.assertj.core.api.WritableAssertionInfo, int, int)} method. * * @author Régis Pouiller - * */ public class AssertionsOnNumberOfColumns_HasNumberOfColumnsLessThan_Test { @@ -56,10 +55,10 @@ public void should_fail_because_number_of_columns_is_equal() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[description] %n" - + "Expecting size (number of columns) to be less than :%n" - + " <3>%n" - + "but was:%n" - + " <3>")); + + "Expecting size (number of columns) to be less than :%n" + + " <3>%n" + + "but was:%n" + + " <3>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnNumberOfColumns_HasNumberOfColumns_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnNumberOfColumns_HasNumberOfColumns_Test.java index ffb7e2df..3b3ed9bc 100644 --- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnNumberOfColumns_HasNumberOfColumns_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnNumberOfColumns_HasNumberOfColumns_Test.java @@ -8,25 +8,24 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions.impl; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.core.api.WritableAssertionInfo; import org.assertj.db.api.TableAssert; import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link AssertionsOnNumberOfColumns} class : * {@link AssertionsOnNumberOfColumns#hasNumberOfColumns(org.assertj.db.api.AbstractAssert, org.assertj.core.api.WritableAssertionInfo, int, int)} method. * * @author Régis Pouiller - * */ public class AssertionsOnNumberOfColumns_HasNumberOfColumns_Test { @@ -56,10 +55,10 @@ public void should_fail_because_number_of_columns_is_different() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[description] %n" - + "Expecting size (number of columns) to be equal to :%n" - + " <4>%n" - + "but was:%n" - + " <3>")); + + "Expecting size (number of columns) to be equal to :%n" + + " <4>%n" + + "but was:%n" + + " <3>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnNumberOfRows_HasNumberOfRowsGreaterThanOrEqualTo_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnNumberOfRows_HasNumberOfRowsGreaterThanOrEqualTo_Test.java index 232c71b3..f947ac03 100644 --- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnNumberOfRows_HasNumberOfRowsGreaterThanOrEqualTo_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnNumberOfRows_HasNumberOfRowsGreaterThanOrEqualTo_Test.java @@ -8,25 +8,24 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions.impl; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.core.api.WritableAssertionInfo; import org.assertj.db.api.TableAssert; import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link AssertionsOnNumberOfRows} class : * {@link AssertionsOnNumberOfRows#hasNumberOfRowsGreaterThanOrEqualTo(org.assertj.db.api.AbstractAssert, org.assertj.core.api.WritableAssertionInfo, int, int)} method. * * @author Régis Pouiller - * */ public class AssertionsOnNumberOfRows_HasNumberOfRowsGreaterThanOrEqualTo_Test { @@ -56,10 +55,10 @@ public void should_fail_because_number_of_rows_is_less() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[description] %n" - + "Expecting size (number of rows) to be greater than or equal to :%n" - + " <9>%n" - + "but was:%n" - + " <8>")); + + "Expecting size (number of rows) to be greater than or equal to :%n" + + " <9>%n" + + "but was:%n" + + " <8>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnNumberOfRows_HasNumberOfRowsGreaterThan_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnNumberOfRows_HasNumberOfRowsGreaterThan_Test.java index 38f1b1ff..0f6835c4 100644 --- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnNumberOfRows_HasNumberOfRowsGreaterThan_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnNumberOfRows_HasNumberOfRowsGreaterThan_Test.java @@ -8,25 +8,24 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions.impl; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.core.api.WritableAssertionInfo; import org.assertj.db.api.TableAssert; import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link AssertionsOnNumberOfRows} class : * {@link AssertionsOnNumberOfRows#hasNumberOfRowsGreaterThan(org.assertj.db.api.AbstractAssert, org.assertj.core.api.WritableAssertionInfo, int, int)} method. * * @author Régis Pouiller - * */ public class AssertionsOnNumberOfRows_HasNumberOfRowsGreaterThan_Test { @@ -56,10 +55,10 @@ public void should_fail_because_number_of_rows_is_less_than_or_equal() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[description] %n" - + "Expecting size (number of rows) to be greater than :%n" - + " <8>%n" - + "but was:%n" - + " <8>")); + + "Expecting size (number of rows) to be greater than :%n" + + " <8>%n" + + "but was:%n" + + " <8>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnNumberOfRows_HasNumberOfRowsLessThanOrEqualTo_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnNumberOfRows_HasNumberOfRowsLessThanOrEqualTo_Test.java index 64495e5c..b910c000 100644 --- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnNumberOfRows_HasNumberOfRowsLessThanOrEqualTo_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnNumberOfRows_HasNumberOfRowsLessThanOrEqualTo_Test.java @@ -8,25 +8,24 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions.impl; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.core.api.WritableAssertionInfo; import org.assertj.db.api.TableAssert; import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link AssertionsOnNumberOfRows} class : * {@link AssertionsOnNumberOfRows#hasNumberOfRowsLessThanOrEqualTo(org.assertj.db.api.AbstractAssert, org.assertj.core.api.WritableAssertionInfo, int, int)} method. * * @author Régis Pouiller - * */ public class AssertionsOnNumberOfRows_HasNumberOfRowsLessThanOrEqualTo_Test { @@ -56,10 +55,10 @@ public void should_fail_because_number_of_rows_is_greater() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[description] %n" - + "Expecting size (number of rows) to be less than or equal to :%n" - + " <7>%n" - + "but was:%n" - + " <8>")); + + "Expecting size (number of rows) to be less than or equal to :%n" + + " <7>%n" + + "but was:%n" + + " <8>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnNumberOfRows_HasNumberOfRowsLessThan_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnNumberOfRows_HasNumberOfRowsLessThan_Test.java index c544fbbd..1b698271 100644 --- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnNumberOfRows_HasNumberOfRowsLessThan_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnNumberOfRows_HasNumberOfRowsLessThan_Test.java @@ -8,25 +8,24 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions.impl; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.core.api.WritableAssertionInfo; import org.assertj.db.api.TableAssert; import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link AssertionsOnNumberOfRows} class : * {@link AssertionsOnNumberOfRows#hasNumberOfRowsLessThan(org.assertj.db.api.AbstractAssert, org.assertj.core.api.WritableAssertionInfo, int, int)} method. * * @author Régis Pouiller - * */ public class AssertionsOnNumberOfRows_HasNumberOfRowsLessThan_Test { @@ -56,10 +55,10 @@ public void should_fail_because_number_of_rows_is_greater_than_or_equal() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[description] %n" - + "Expecting size (number of rows) to be less than :%n" - + " <8>%n" - + "but was:%n" - + " <8>")); + + "Expecting size (number of rows) to be less than :%n" + + " <8>%n" + + "but was:%n" + + " <8>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnNumberOfRows_HasNumberOfRows_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnNumberOfRows_HasNumberOfRows_Test.java index a7d5263e..5fc6aa43 100644 --- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnNumberOfRows_HasNumberOfRows_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnNumberOfRows_HasNumberOfRows_Test.java @@ -8,25 +8,24 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions.impl; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.core.api.WritableAssertionInfo; import org.assertj.db.api.TableAssert; import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link AssertionsOnNumberOfRows} class : * {@link AssertionsOnNumberOfRows#hasNumberOfRows(org.assertj.db.api.AbstractAssert, org.assertj.core.api.WritableAssertionInfo, int, int)} method. * * @author Régis Pouiller - * */ public class AssertionsOnNumberOfRows_HasNumberOfRows_Test { @@ -56,10 +55,10 @@ public void should_fail_because_number_of_rows_is_different() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[description] %n" - + "Expecting size (number of rows) to be equal to :%n" - + " <9>%n" - + "but was:%n" - + " <8>")); + + "Expecting size (number of rows) to be equal to :%n" + + " <9>%n" + + "but was:%n" + + " <8>")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnPrimaryKey_HasPksNames_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnPrimaryKey_HasPksNames_Test.java index 06b12b25..b04f5189 100644 --- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnPrimaryKey_HasPksNames_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnPrimaryKey_HasPksNames_Test.java @@ -8,32 +8,35 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions.impl; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + +import java.sql.Date; +import java.util.Arrays; + import org.assertj.core.api.Assertions; import org.assertj.core.api.WritableAssertionInfo; import org.assertj.db.api.TableAssert; import org.assertj.db.common.AbstractTest; -import org.assertj.db.type.*; +import org.assertj.db.type.Change; +import org.assertj.db.type.ChangeType; +import org.assertj.db.type.DataType; +import org.assertj.db.type.Row; +import org.assertj.db.type.Table; import org.assertj.db.type.lettercase.CaseComparisons; import org.assertj.db.type.lettercase.CaseConversions; import org.assertj.db.type.lettercase.LetterCase; import org.junit.Test; -import java.sql.Date; -import java.util.Arrays; - -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link AssertionsOnPrimaryKey} class : * {@link AssertionsOnPrimaryKey#hasPksNames(org.assertj.db.api.AbstractAssert, org.assertj.core.api.WritableAssertionInfo, org.assertj.db.type.Change, LetterCase, String...)} method. * * @author Régis Pouiller - * */ public class AssertionsOnPrimaryKey_HasPksNames_Test extends AbstractTest { @@ -46,13 +49,13 @@ public void test_has_pks_names() throws Exception { Table table = new Table(); TableAssert tableAssert = assertThat(table); Row rowAtStartPoint = getRow(Arrays.asList("ID", "ID2"), - Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), - Arrays.asList(getValue(null, 1), getValue(null, "Weaver"), getValue(null, "Sigourney"), - getValue(null, Date.valueOf("1949-10-08")))); + Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), + Arrays.asList(getValue(null, 1), getValue(null, "Weaver"), getValue(null, "Sigourney"), + getValue(null, Date.valueOf("1949-10-08")))); Row rowAtEndPoint = getRow(Arrays.asList("ID", "ID2"), - Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), - Arrays.asList(getValue(null, 1), getValue(null, "Weaverr"), getValue(null, "Sigourneyy"), - getValue(null, Date.valueOf("1949-10-08")))); + Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), + Arrays.asList(getValue(null, 1), getValue(null, "Weaverr"), getValue(null, "Sigourneyy"), + getValue(null, Date.valueOf("1949-10-08")))); Change change = getChange(DataType.TABLE, "test", ChangeType.CREATION, rowAtStartPoint, rowAtEndPoint); TableAssert tableAssert2 = AssertionsOnPrimaryKey.hasPksNames(tableAssert, info, change, LetterCase.PRIMARY_KEY_DEFAULT, "ID", "ID2"); Assertions.assertThat(tableAssert2).isSameAs(tableAssert); @@ -72,45 +75,45 @@ public void should_fail_because_pks_names_are_different() throws Exception { Table table = new Table(); TableAssert tableAssert = assertThat(table); Row rowAtStartPoint = getRow(Arrays.asList("ID", "ID2"), - Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), - Arrays.asList(getValue(null, 1), getValue(null, "Weaver"), getValue(null, "Sigourney"), - getValue(null, Date.valueOf("1949-10-08")))); + Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), + Arrays.asList(getValue(null, 1), getValue(null, "Weaver"), getValue(null, "Sigourney"), + getValue(null, Date.valueOf("1949-10-08")))); Row rowAtEndPoint = getRow(Arrays.asList("ID", "ID2"), - Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), - Arrays.asList(getValue(null, 1), getValue(null, "Weaverr"), getValue(null, "Sigourneyy"), - getValue(null, Date.valueOf("1949-10-08")))); + Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), + Arrays.asList(getValue(null, 1), getValue(null, "Weaverr"), getValue(null, "Sigourneyy"), + getValue(null, Date.valueOf("1949-10-08")))); Change change = getChange(DataType.TABLE, "test", ChangeType.CREATION, rowAtStartPoint, rowAtEndPoint); try { AssertionsOnPrimaryKey.hasPksNames(tableAssert, info, change, LetterCase.PRIMARY_KEY_DEFAULT, "ID1", "ID2"); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[description] %n" - + "Expecting :%n" - + " [\"ID1\", \"ID2\"]%n" - + "to be the name of the columns of the primary keys but was:%n" - + " [\"ID\", \"ID2\"]")); + + "Expecting :%n" + + " [\"ID1\", \"ID2\"]%n" + + "to be the name of the columns of the primary keys but was:%n" + + " [\"ID\", \"ID2\"]")); } try { AssertionsOnPrimaryKey.hasPksNames(tableAssert, info, change, LetterCase.getLetterCase(CaseConversions.NO, - CaseComparisons.STRICT), "id", "ID2"); + CaseComparisons.STRICT), "id", "ID2"); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[description] %n" - + "Expecting :%n" - + " [\"id\", \"ID2\"]%n" - + "to be the name of the columns of the primary keys but was:%n" - + " [\"ID\", \"ID2\"]")); + + "Expecting :%n" + + " [\"id\", \"ID2\"]%n" + + "to be the name of the columns of the primary keys but was:%n" + + " [\"ID\", \"ID2\"]")); } try { AssertionsOnPrimaryKey.hasPksNames(tableAssert, info, change, LetterCase.getLetterCase(CaseConversions.NO, - CaseComparisons.STRICT), "ID2", "id"); + CaseComparisons.STRICT), "ID2", "id"); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[description] %n" - + "Expecting :%n" - + " [\"ID2\", \"id\"]%n" - + "to be the name of the columns of the primary keys but was:%n" - + " [\"ID\", \"ID2\"]")); + + "Expecting :%n" + + " [\"ID2\", \"id\"]%n" + + "to be the name of the columns of the primary keys but was:%n" + + " [\"ID\", \"ID2\"]")); } } @@ -124,33 +127,33 @@ public void should_fail_because_number_of_pks_names_are_different() throws Excep Table table = new Table(); TableAssert tableAssert = assertThat(table); Row rowAtStartPoint = getRow(Arrays.asList("ID", "ID2"), - Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), - Arrays.asList(getValue(null, 1), getValue(null, "Weaver"), getValue(null, "Sigourney"), - getValue(null, Date.valueOf("1949-10-08")))); + Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), + Arrays.asList(getValue(null, 1), getValue(null, "Weaver"), getValue(null, "Sigourney"), + getValue(null, Date.valueOf("1949-10-08")))); Row rowAtEndPoint = getRow(Arrays.asList("ID", "ID2"), - Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), - Arrays.asList(getValue(null, 1), getValue(null, "Weaverr"), getValue(null, "Sigourneyy"), - getValue(null, Date.valueOf("1949-10-08")))); + Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), + Arrays.asList(getValue(null, 1), getValue(null, "Weaverr"), getValue(null, "Sigourneyy"), + getValue(null, Date.valueOf("1949-10-08")))); Change change = getChange(DataType.TABLE, "test", ChangeType.CREATION, rowAtStartPoint, rowAtEndPoint); try { AssertionsOnPrimaryKey.hasPksNames(tableAssert, info, change, LetterCase.PRIMARY_KEY_DEFAULT, "ID", "ID2", "ID3"); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[description] %n" - + "Expecting :%n" - + " [\"ID\", \"ID2\", \"ID3\"]%n" - + "to be the name of the columns of the primary keys but was:%n" - + " [\"ID\", \"ID2\"]")); + + "Expecting :%n" + + " [\"ID\", \"ID2\", \"ID3\"]%n" + + "to be the name of the columns of the primary keys but was:%n" + + " [\"ID\", \"ID2\"]")); } try { AssertionsOnPrimaryKey.hasPksNames(tableAssert, info, change, LetterCase.PRIMARY_KEY_DEFAULT, "ID"); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[description] %n" - + "Expecting :%n" - + " [\"ID\"]%n" - + "to be the name of the columns of the primary keys but was:%n" - + " [\"ID\", \"ID2\"]")); + + "Expecting :%n" + + " [\"ID\"]%n" + + "to be the name of the columns of the primary keys but was:%n" + + " [\"ID\", \"ID2\"]")); } } @@ -164,13 +167,13 @@ public void should_fail_because_expected_name_must_be_not_null() throws Exceptio Table table = new Table(); TableAssert tableAssert = assertThat(table); Row rowAtStartPoint = getRow(Arrays.asList("ID", "ID2"), - Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), - Arrays.asList(getValue(null, 1), getValue(null, "Weaver"), getValue(null, "Sigourney"), - getValue(null, Date.valueOf("1949-10-08")))); + Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), + Arrays.asList(getValue(null, 1), getValue(null, "Weaver"), getValue(null, "Sigourney"), + getValue(null, Date.valueOf("1949-10-08")))); Row rowAtEndPoint = getRow(Arrays.asList("ID", "ID2"), - Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), - Arrays.asList(getValue(null, 1), getValue(null, "Weaverr"), getValue(null, "Sigourneyy"), - getValue(null, Date.valueOf("1949-10-08")))); + Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), + Arrays.asList(getValue(null, 1), getValue(null, "Weaverr"), getValue(null, "Sigourneyy"), + getValue(null, Date.valueOf("1949-10-08")))); Change change = getChange(DataType.TABLE, "test", ChangeType.CREATION, rowAtStartPoint, rowAtEndPoint); try { AssertionsOnPrimaryKey.hasPksNames(tableAssert, info, change, LetterCase.PRIMARY_KEY_DEFAULT, "NAME", null); @@ -190,13 +193,13 @@ public void should_fail_because_expected_names_must_be_not_null() throws Excepti Table table = new Table(); TableAssert tableAssert = assertThat(table); Row rowAtStartPoint = getRow(Arrays.asList("ID", "ID2"), - Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), - Arrays.asList(getValue(null, 1), getValue(null, "Weaver"), getValue(null, "Sigourney"), - getValue(null, Date.valueOf("1949-10-08")))); + Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), + Arrays.asList(getValue(null, 1), getValue(null, "Weaver"), getValue(null, "Sigourney"), + getValue(null, Date.valueOf("1949-10-08")))); Row rowAtEndPoint = getRow(Arrays.asList("ID", "ID2"), - Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), - Arrays.asList(getValue(null, 1), getValue(null, "Weaverr"), getValue(null, "Sigourneyy"), - getValue(null, Date.valueOf("1949-10-08")))); + Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), + Arrays.asList(getValue(null, 1), getValue(null, "Weaverr"), getValue(null, "Sigourneyy"), + getValue(null, Date.valueOf("1949-10-08")))); Change change = getChange(DataType.TABLE, "test", ChangeType.CREATION, rowAtStartPoint, rowAtEndPoint); try { AssertionsOnPrimaryKey.hasPksNames(tableAssert, info, change, LetterCase.PRIMARY_KEY_DEFAULT, (String[]) null); diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnPrimaryKey_HasPksValues_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnPrimaryKey_HasPksValues_Test.java index 9c842214..f14d3979 100644 --- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnPrimaryKey_HasPksValues_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnPrimaryKey_HasPksValues_Test.java @@ -8,29 +8,32 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions.impl; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + +import java.sql.Date; +import java.util.Arrays; + import org.assertj.core.api.Assertions; import org.assertj.core.api.WritableAssertionInfo; import org.assertj.db.api.TableAssert; import org.assertj.db.common.AbstractTest; -import org.assertj.db.type.*; +import org.assertj.db.type.Change; +import org.assertj.db.type.ChangeType; +import org.assertj.db.type.DataType; +import org.assertj.db.type.Row; +import org.assertj.db.type.Table; import org.junit.Test; -import java.sql.Date; -import java.util.Arrays; - -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link AssertionsOnPrimaryKey} class : * {@link AssertionsOnPrimaryKey#hasPksValues(org.assertj.db.api.AbstractAssert, org.assertj.core.api.WritableAssertionInfo, org.assertj.db.type.Change, Object...)} method. * * @author Régis Pouiller - * */ public class AssertionsOnPrimaryKey_HasPksValues_Test extends AbstractTest { @@ -43,13 +46,13 @@ public void test_has_pks_values() throws Exception { Table table = new Table(); TableAssert tableAssert = assertThat(table); Row rowAtStartPoint = getRow(Arrays.asList("ID", "NAME"), - Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), - Arrays.asList(getValue(null, 1), getValue(null, "Weaver"), getValue(null, "Sigourney"), - getValue(null, Date.valueOf("1949-10-08")))); + Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), + Arrays.asList(getValue(null, 1), getValue(null, "Weaver"), getValue(null, "Sigourney"), + getValue(null, Date.valueOf("1949-10-08")))); Row rowAtEndPoint = getRow(Arrays.asList("ID", "NAME"), - Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), - Arrays.asList(getValue(null, 1), getValue(null, "Weaver"), getValue(null, "Sigourneyy"), - getValue(null, Date.valueOf("1949-10-08")))); + Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), + Arrays.asList(getValue(null, 1), getValue(null, "Weaver"), getValue(null, "Sigourneyy"), + getValue(null, Date.valueOf("1949-10-08")))); Change change = getChange(DataType.TABLE, "test", ChangeType.CREATION, rowAtStartPoint, rowAtEndPoint); TableAssert tableAssert2 = AssertionsOnPrimaryKey.hasPksValues(tableAssert, info, change, 1, "Weaver"); Assertions.assertThat(tableAssert2).isSameAs(tableAssert); @@ -65,23 +68,23 @@ public void should_fail_because_pks_values_are_different() throws Exception { Table table = new Table(); TableAssert tableAssert = assertThat(table); Row rowAtStartPoint = getRow(Arrays.asList("ID", "NAME"), - Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), - Arrays.asList(getValue(null, 1), getValue(null, "Weaver"), getValue(null, "Sigourney"), - getValue(null, Date.valueOf("1949-10-08")))); + Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), + Arrays.asList(getValue(null, 1), getValue(null, "Weaver"), getValue(null, "Sigourney"), + getValue(null, Date.valueOf("1949-10-08")))); Row rowAtEndPoint = getRow(Arrays.asList("ID", "NAME"), - Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), - Arrays.asList(getValue(null, 1), getValue(null, "Weaver"), getValue(null, "Sigourneyy"), - getValue(null, Date.valueOf("1949-10-08")))); + Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), + Arrays.asList(getValue(null, 1), getValue(null, "Weaver"), getValue(null, "Sigourneyy"), + getValue(null, Date.valueOf("1949-10-08")))); Change change = getChange(DataType.TABLE, "test", ChangeType.CREATION, rowAtStartPoint, rowAtEndPoint); try { AssertionsOnPrimaryKey.hasPksValues(tableAssert, info, change, 1, "Weaverr"); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[description] %n" - + "Expecting :%n" - + " [1, \"Weaverr\"]%n" - + "to be the values of the columns of the primary keys but was:%n" - + " [1, \"Weaver\"]")); + + "Expecting :%n" + + " [1, \"Weaverr\"]%n" + + "to be the values of the columns of the primary keys but was:%n" + + " [1, \"Weaver\"]")); } } @@ -95,23 +98,23 @@ public void should_fail_because_number_of_pks_values_are_different() throws Exce Table table = new Table(); TableAssert tableAssert = assertThat(table); Row rowAtStartPoint = getRow(Arrays.asList("ID", "NAME"), - Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), - Arrays.asList(getValue(null, 1), getValue(null, "Weaver"), getValue(null, "Sigourney"), - getValue(null, Date.valueOf("1949-10-08")))); + Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), + Arrays.asList(getValue(null, 1), getValue(null, "Weaver"), getValue(null, "Sigourney"), + getValue(null, Date.valueOf("1949-10-08")))); Row rowAtEndPoint = getRow(Arrays.asList("ID", "NAME"), - Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), - Arrays.asList(getValue(null, 1), getValue(null, "Weaver"), getValue(null, "Sigourneyy"), - getValue(null, Date.valueOf("1949-10-08")))); + Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), + Arrays.asList(getValue(null, 1), getValue(null, "Weaver"), getValue(null, "Sigourneyy"), + getValue(null, Date.valueOf("1949-10-08")))); Change change = getChange(DataType.TABLE, "test", ChangeType.CREATION, rowAtStartPoint, rowAtEndPoint); try { AssertionsOnPrimaryKey.hasPksValues(tableAssert, info, change, 1, "Weaverr", "Sigourney"); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[description] %n" - + "Expecting :%n" - + " [1, \"Weaverr\", \"Sigourney\"]%n" - + "to be the values of the columns of the primary keys but was:%n" - + " [1, \"Weaver\"]")); + + "Expecting :%n" + + " [1, \"Weaverr\", \"Sigourney\"]%n" + + "to be the values of the columns of the primary keys but was:%n" + + " [1, \"Weaver\"]")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnRowCondition_HasValues_Satisfying_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnRowCondition_HasValues_Satisfying_Test.java index e01a5ba9..60b3ad0b 100644 --- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnRowCondition_HasValues_Satisfying_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnRowCondition_HasValues_Satisfying_Test.java @@ -8,10 +8,19 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions.impl; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + +import java.sql.Date; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Locale; + import org.assertj.core.api.Assertions; import org.assertj.core.api.Condition; import org.assertj.core.api.HamcrestCondition; @@ -23,21 +32,11 @@ import org.hamcrest.CoreMatchers; import org.junit.Test; -import java.sql.Date; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Locale; - -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link AssertionsOnRowCondition} class : * {@link AssertionsOnRowCondition#hasValuesSatisfying(org.assertj.db.api.AbstractAssert, WritableAssertionInfo, List, Object...)} method. * * @author Julien Roy - * */ public class AssertionsOnRowCondition_HasValues_Satisfying_Test extends AbstractTest { @@ -50,19 +49,19 @@ public void test_has_values_satisfying() throws Exception { Table table = new Table(); TableAssert tableAssert = assertThat(table); List list = Arrays.asList(getValue(null, 1), - getValue(null, "Weaver"), - getValue(null, "Sigourney"), - getValue(null, Date.valueOf("1949-10-08")), - getValue(null, new Locale("fr"))); + getValue(null, "Weaver"), + getValue(null, "Sigourney"), + getValue(null, Date.valueOf("1949-10-08")), + getValue(null, new Locale("fr"))); TableAssert tableAssert2 = AssertionsOnRowCondition - .hasValuesSatisfying(tableAssert, info, list, - 1, - new Condition(v -> v.equals("Weaver"), "isWeaver"), - new HamcrestCondition<>(CoreMatchers.is("Sigourney")), - "1949-10-08", - Locale.FRENCH - ); + .hasValuesSatisfying(tableAssert, info, list, + 1, + new Condition(v -> v.equals("Weaver"), "isWeaver"), + new HamcrestCondition<>(CoreMatchers.is("Sigourney")), + "1949-10-08", + Locale.FRENCH + ); Assertions.assertThat(tableAssert2).isSameAs(tableAssert); } @@ -77,22 +76,22 @@ public void should_fail_because_values_are_different() throws Exception { Table table = new Table(); TableAssert tableAssert = assertThat(table); List list = new ArrayList<>(Arrays.asList(getValue(null, 1), - getValue(null, "Weaver"), - getValue(null, "Sigourney"), - getValue(null, Date.valueOf("1949-10-08")))); + getValue(null, "Weaver"), + getValue(null, "Sigourney"), + getValue(null, Date.valueOf("1949-10-08")))); try { AssertionsOnRowCondition.hasValuesSatisfying(tableAssert, info, list, 1, - new Condition(v -> v.equals("Weaverr"), "isWeaverr"), - "Sigourney", - "1949-10-08" + new Condition(v -> v.equals("Weaverr"), "isWeaverr"), + "Sigourney", + "1949-10-08" ); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[description] %n" - + "Expecting that the value at index 1:%n" - + " \"Weaver\"%n" - + "to satisfy: %n" - + " isWeaverr")); + + "Expecting that the value at index 1:%n" + + " \"Weaver\"%n" + + "to satisfy: %n" + + " isWeaverr")); } } @@ -106,18 +105,18 @@ public void should_fail_because_values_not_satisfying() throws Exception { Table table = new Table(); TableAssert tableAssert = assertThat(table); List list = new ArrayList<>(Arrays.asList(getValue(null, 1), - getValue(null, "Weaver"), - getValue(null, "Sigourney"), - getValue(null, Date.valueOf("1949-10-08")))); + getValue(null, "Weaver"), + getValue(null, "Sigourney"), + getValue(null, Date.valueOf("1949-10-08")))); try { AssertionsOnRowCondition.hasValuesSatisfying(tableAssert, info, list, 1, "Weaverr", "Sigourney", "1949-10-08"); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[description] %n" - + "Expecting that the value at index 1:%n" - + " <\"Weaver\">%n" - + "to be equal to: %n" - + " <\"Weaverr\">")); + + "Expecting that the value at index 1:%n" + + " <\"Weaver\">%n" + + "to be equal to: %n" + + " <\"Weaverr\">")); } } @@ -131,38 +130,38 @@ public void should_fail_because_types_are_not_compatible() throws Exception { Table table = new Table(); TableAssert tableAssert = assertThat(table); List list = new ArrayList<>(Arrays.asList(getValue(null, 1), - getValue(null, "Weaver"), - getValue(null, null), - getValue(null, Date.valueOf("1949-10-08")))); + getValue(null, "Weaver"), + getValue(null, null), + getValue(null, Date.valueOf("1949-10-08")))); try { AssertionsOnRowCondition.hasValuesSatisfying(tableAssert, info, list, 1, true, "Sigourney", "1949-10-08"); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[description] %n" - + "Expecting:%n" - + " \"TEXT\" : <\"Weaver\">%n" - + "to be compatible with %n" - + " java.lang.Boolean : ")); + + "Expecting:%n" + + " \"TEXT\" : <\"Weaver\">%n" + + "to be compatible with %n" + + " java.lang.Boolean : ")); } try { AssertionsOnRowCondition.hasValuesSatisfying(tableAssert, info, list, 1, "Weaver", "Sigourney", "1949-10-08"); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[description] %n" - + "Expecting:%n" - + " \"NOT_IDENTIFIED\" : %n" - + "to be compatible with %n" - + " java.lang.String : <\"Sigourney\">")); + + "Expecting:%n" + + " \"NOT_IDENTIFIED\" : %n" + + "to be compatible with %n" + + " java.lang.String : <\"Sigourney\">")); } try { AssertionsOnRowCondition.hasValuesSatisfying(tableAssert, info, list, 1, null, "Sigourney", "1949-10-08"); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[description] %n" - + "Expecting:%n" - + " \"TEXT\" : <\"Weaver\">%n" - + "to be compatible with %n" - + " ")); + + "Expecting:%n" + + " \"TEXT\" : <\"Weaver\">%n" + + "to be compatible with %n" + + " ")); } } @@ -175,15 +174,15 @@ public void should_fail_because_bytes_values_are_different() throws Exception { info.description("description"); Table table = new Table(); TableAssert tableAssert = assertThat(table); - List list = new ArrayList<>(Arrays.asList(getValue(null, 1), getValue(null, new byte[] { 0, 1 }), - getValue(null, "Sigourney"), - getValue(null, Date.valueOf("1949-10-08")))); + List list = new ArrayList<>(Arrays.asList(getValue(null, 1), getValue(null, new byte[]{0, 1}), + getValue(null, "Sigourney"), + getValue(null, Date.valueOf("1949-10-08")))); try { - AssertionsOnRowCondition.hasValuesSatisfying(tableAssert, info, list, 1, new byte[] { 2, 3 }, "Sigourney", "1949-10-08"); + AssertionsOnRowCondition.hasValuesSatisfying(tableAssert, info, list, 1, new byte[]{2, 3}, "Sigourney", "1949-10-08"); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[description] %n" - + "Expecting that the value at index 1 to be equal to the expected value but was not equal")); + + "Expecting that the value at index 1 to be equal to the expected value but was not equal")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnRowEquality_HasValues_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnRowEquality_HasValues_Test.java index 8917b465..83facd98 100644 --- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnRowEquality_HasValues_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnRowEquality_HasValues_Test.java @@ -8,17 +8,12 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions.impl; -import org.assertj.core.api.Assertions; -import org.assertj.core.api.WritableAssertionInfo; -import org.assertj.db.api.TableAssert; -import org.assertj.db.common.AbstractTest; -import org.assertj.db.type.Table; -import org.assertj.db.type.Value; -import org.junit.Test; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; import java.sql.Date; import java.util.ArrayList; @@ -26,15 +21,19 @@ import java.util.List; import java.util.Locale; -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; +import org.assertj.core.api.Assertions; +import org.assertj.core.api.WritableAssertionInfo; +import org.assertj.db.api.TableAssert; +import org.assertj.db.common.AbstractTest; +import org.assertj.db.type.Table; +import org.assertj.db.type.Value; +import org.junit.Test; /** * Tests on {@link AssertionsOnRowEquality} class : * {@link AssertionsOnRowEquality#hasValues(org.assertj.db.api.AbstractAssert, org.assertj.core.api.WritableAssertionInfo, java.util.List, Object...)} method. * * @author Régis Pouiller - * */ public class AssertionsOnRowEquality_HasValues_Test extends AbstractTest { @@ -47,10 +46,10 @@ public void test_has_values() throws Exception { Table table = new Table(); TableAssert tableAssert = assertThat(table); List list = new ArrayList<>(Arrays.asList(getValue(null, 1), getValue(null, "Weaver"), getValue(null, - "Sigourney"), - getValue(null, Date.valueOf("1949-10-08")), getValue(null, new Locale("fr")))); + "Sigourney"), + getValue(null, Date.valueOf("1949-10-08")), getValue(null, new Locale("fr")))); TableAssert tableAssert2 = AssertionsOnRowEquality.hasValues(tableAssert, info, list, 1, "Weaver", "Sigourney", - "1949-10-08", Locale.FRENCH); + "1949-10-08", Locale.FRENCH); Assertions.assertThat(tableAssert2).isSameAs(tableAssert); } @@ -64,17 +63,17 @@ public void should_fail_because_values_are_different() throws Exception { Table table = new Table(); TableAssert tableAssert = assertThat(table); List list = new ArrayList<>(Arrays.asList(getValue(null, 1), getValue(null, "Weaver"), getValue(null, - "Sigourney"), - getValue(null, Date.valueOf("1949-10-08")))); + "Sigourney"), + getValue(null, Date.valueOf("1949-10-08")))); try { AssertionsOnRowEquality.hasValues(tableAssert, info, list, 1, "Weaverr", "Sigourney", "1949-10-08"); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[description] %n" - + "Expecting that the value at index 1:%n" - + " <\"Weaver\">%n" - + "to be equal to: %n" - + " <\"Weaverr\">")); + + "Expecting that the value at index 1:%n" + + " <\"Weaver\">%n" + + "to be equal to: %n" + + " <\"Weaverr\">")); } } @@ -88,37 +87,37 @@ public void should_fail_because_types_are_not_compatible() throws Exception { Table table = new Table(); TableAssert tableAssert = assertThat(table); List list = new ArrayList<>(Arrays.asList(getValue(null, 1), getValue(null, "Weaver"), getValue(null, - null), - getValue(null, Date.valueOf("1949-10-08")))); + null), + getValue(null, Date.valueOf("1949-10-08")))); try { AssertionsOnRowEquality.hasValues(tableAssert, info, list, 1, true, "Sigourney", "1949-10-08"); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[description] %n" - + "Expecting:%n" - + " \"TEXT\" : <\"Weaver\">%n" - + "to be compatible with %n" - + " java.lang.Boolean : ")); + + "Expecting:%n" + + " \"TEXT\" : <\"Weaver\">%n" + + "to be compatible with %n" + + " java.lang.Boolean : ")); } try { AssertionsOnRowEquality.hasValues(tableAssert, info, list, 1, "Weaver", "Sigourney", "1949-10-08"); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[description] %n" - + "Expecting:%n" - + " \"NOT_IDENTIFIED\" : %n" - + "to be compatible with %n" - + " java.lang.String : <\"Sigourney\">")); + + "Expecting:%n" + + " \"NOT_IDENTIFIED\" : %n" + + "to be compatible with %n" + + " java.lang.String : <\"Sigourney\">")); } try { AssertionsOnRowEquality.hasValues(tableAssert, info, list, 1, null, "Sigourney", "1949-10-08"); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[description] %n" - + "Expecting:%n" - + " \"TEXT\" : <\"Weaver\">%n" - + "to be compatible with %n" - + " ")); + + "Expecting:%n" + + " \"TEXT\" : <\"Weaver\">%n" + + "to be compatible with %n" + + " ")); } } @@ -131,15 +130,15 @@ public void should_fail_because_bytes_values_are_different() throws Exception { info.description("description"); Table table = new Table(); TableAssert tableAssert = assertThat(table); - List list = new ArrayList<>(Arrays.asList(getValue(null, 1), getValue(null, new byte[] {0, 1}), - getValue(null, "Sigourney"), - getValue(null, Date.valueOf("1949-10-08")))); + List list = new ArrayList<>(Arrays.asList(getValue(null, 1), getValue(null, new byte[]{0, 1}), + getValue(null, "Sigourney"), + getValue(null, Date.valueOf("1949-10-08")))); try { - AssertionsOnRowEquality.hasValues(tableAssert, info, list, 1, new byte[] { 2, 3 }, "Sigourney", "1949-10-08"); + AssertionsOnRowEquality.hasValues(tableAssert, info, list, 1, new byte[]{2, 3}, "Sigourney", "1949-10-08"); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[description] %n" - + "Expecting that the value at index 1 to be equal to the expected value but was not equal")); + + "Expecting that the value at index 1 to be equal to the expected value but was not equal")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnRowOfChangeExistence_DoesNotExist_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnRowOfChangeExistence_DoesNotExist_Test.java index 171cee19..0dd9ccdd 100644 --- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnRowOfChangeExistence_DoesNotExist_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnRowOfChangeExistence_DoesNotExist_Test.java @@ -8,10 +8,16 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions.impl; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + +import java.sql.Date; +import java.util.Arrays; + import org.assertj.core.api.Assertions; import org.assertj.core.api.WritableAssertionInfo; import org.assertj.db.api.TableAssert; @@ -20,18 +26,11 @@ import org.assertj.db.type.Table; import org.junit.Test; -import java.sql.Date; -import java.util.Arrays; - -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link AssertionsOnRowOfChangeExistence} class : * {@link AssertionsOnRowOfChangeExistence#doesNotExist(org.assertj.db.api.AbstractAssert, org.assertj.core.api.WritableAssertionInfo, org.assertj.db.type.Row)} method. * * @author Régis Pouiller - * */ public class AssertionsOnRowOfChangeExistence_DoesNotExist_Test extends AbstractTest { @@ -57,14 +56,14 @@ public void should_fail_because_row_exists() throws Exception { Table table = new Table(); TableAssert tableAssert = assertThat(table); Row row = getRow(null, Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), - Arrays.asList(getValue(null, 1), getValue(null, "Weaver"), getValue(null, "Sigourney"), - getValue(null, Date.valueOf("1949-10-08")))); + Arrays.asList(getValue(null, 1), getValue(null, "Weaver"), getValue(null, "Sigourney"), + getValue(null, Date.valueOf("1949-10-08")))); try { AssertionsOnRowOfChangeExistence.doesNotExist(tableAssert, info, row); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[description] %n" - + "Expecting not exist but exists")); + + "Expecting not exist but exists")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnRowOfChangeExistence_Exists_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnRowOfChangeExistence_Exists_Test.java index 5b4cb70e..10404e16 100644 --- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnRowOfChangeExistence_Exists_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnRowOfChangeExistence_Exists_Test.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions.impl; @@ -31,7 +31,6 @@ * {@link AssertionsOnRowOfChangeExistence#exists(org.assertj.db.api.AbstractAssert, org.assertj.core.api.WritableAssertionInfo, org.assertj.db.type.Row)} method. * * @author Régis Pouiller - * */ public class AssertionsOnRowOfChangeExistence_Exists_Test extends AbstractTest { @@ -43,9 +42,9 @@ public void test_exists() throws Exception { WritableAssertionInfo info = new WritableAssertionInfo(); Table table = new Table(); TableAssert tableAssert = assertThat(table); - Row row = getRow(null,Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), - Arrays.asList(getValue(null, 1), getValue(null, "Weaver"), getValue(null, "Sigourney"), - getValue(null, Date.valueOf("1949-10-08")))); + Row row = getRow(null, Arrays.asList("ID", "NAME", "FIRSTNAME", "BIRTH"), + Arrays.asList(getValue(null, 1), getValue(null, "Weaver"), getValue(null, "Sigourney"), + getValue(null, Date.valueOf("1949-10-08")))); TableAssert tableAssert2 = AssertionsOnRowOfChangeExistence.exists(tableAssert, info, row); Assertions.assertThat(tableAssert2).isSameAs(tableAssert); } @@ -64,7 +63,7 @@ public void should_fail_because_row_does_not_exist() throws Exception { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[description] %n" - + "Expecting exist but do not exist")); + + "Expecting exist but do not exist")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnTableExistence_DoesNotExist_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnTableExistence_DoesNotExist_Test.java index e3291e15..f75c6b3c 100644 --- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnTableExistence_DoesNotExist_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnTableExistence_DoesNotExist_Test.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions.impl; @@ -31,7 +31,6 @@ * {@link AssertionsOnTableExistence#doesNotExists(AbstractDbAssert, WritableAssertionInfo, String, Source, DataSource)} method. * * @author Julien Roy - * */ public class AssertionsOnTableExistence_DoesNotExist_Test extends AbstractTest { @@ -63,7 +62,7 @@ public void should_fail_because_table_exists() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[description] %n" - + "Expecting not exist but exists")); + + "Expecting not exist but exists")); } try { @@ -71,7 +70,7 @@ public void should_fail_because_table_exists() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[description] %n" - + "Expecting not exist but exists")); + + "Expecting not exist but exists")); } } -} \ No newline at end of file +} diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnTableExistence_Exists_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnTableExistence_Exists_Test.java index bf954c29..8f77159f 100644 --- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnTableExistence_Exists_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnTableExistence_Exists_Test.java @@ -8,10 +8,15 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions.impl; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + +import javax.sql.DataSource; + import org.assertj.core.api.Assertions; import org.assertj.core.api.WritableAssertionInfo; import org.assertj.db.api.AbstractDbAssert; @@ -21,17 +26,11 @@ import org.assertj.db.type.Table; import org.junit.Test; -import javax.sql.DataSource; - -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link AssertionsOnTableExistence} class : * {@link AssertionsOnTableExistence#exists(AbstractDbAssert, WritableAssertionInfo, String, Source, DataSource)} method. * * @author Julien Roy - * */ public class AssertionsOnTableExistence_Exists_Test extends AbstractTest { @@ -63,7 +62,7 @@ public void should_fail_because_table_does_not_exist() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[description] %n" - + "Expecting exist but do not exist")); + + "Expecting exist but do not exist")); } try { @@ -71,7 +70,7 @@ public void should_fail_because_table_does_not_exist() { fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[description] %n" - + "Expecting exist but do not exist")); + + "Expecting exist but do not exist")); } } -} \ No newline at end of file +} diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnValueChronology_IsAfterOrEqualTo_DateTimeValue_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnValueChronology_IsAfterOrEqualTo_DateTimeValue_Test.java index b2d5e3d9..2fd0f964 100644 --- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnValueChronology_IsAfterOrEqualTo_DateTimeValue_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnValueChronology_IsAfterOrEqualTo_DateTimeValue_Test.java @@ -8,10 +8,16 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions.impl; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + +import java.sql.Date; +import java.sql.Timestamp; + import org.assertj.core.api.Assertions; import org.assertj.core.api.WritableAssertionInfo; import org.assertj.db.api.TableAssert; @@ -22,18 +28,11 @@ import org.assertj.db.type.TimeValue; import org.junit.Test; -import java.sql.Date; -import java.sql.Timestamp; - -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link AssertionsOnValueChronology} class : * {@link AssertionsOnValueChronology#isAfterOrEqualTo(org.assertj.db.api.AbstractAssert, org.assertj.core.api.WritableAssertionInfo, org.assertj.db.type.Value, org.assertj.db.type.DateTimeValue)} method. * * @author Régis Pouiller - * */ public class AssertionsOnValueChronology_IsAfterOrEqualTo_DateTimeValue_Test extends AbstractTest { @@ -46,25 +45,25 @@ public void test_is_after_or_equal_to() throws Exception { Table table = new Table(); TableAssert tableAssert = assertThat(table); TableAssert tableAssert2 = AssertionsOnValueChronology.isAfterOrEqualTo(tableAssert, info, - getValue(null, Timestamp.valueOf( - "2007-12-23 09:01:05")), - DateTimeValue.of(DateValue.of(2007, 12, 23), - TimeValue.of(9, 1, 5))); + getValue(null, Timestamp.valueOf( + "2007-12-23 09:01:05")), + DateTimeValue.of(DateValue.of(2007, 12, 23), + TimeValue.of(9, 1, 5))); Assertions.assertThat(tableAssert2).isSameAs(tableAssert); tableAssert2 = AssertionsOnValueChronology.isAfterOrEqualTo(tableAssert, info, - getValue(null, Timestamp.valueOf("2007-12-23 09:01:05")), - DateTimeValue.of(DateValue.of(2007, 12, 23), - TimeValue.of(9, 1, 0))); + getValue(null, Timestamp.valueOf("2007-12-23 09:01:05")), + DateTimeValue.of(DateValue.of(2007, 12, 23), + TimeValue.of(9, 1, 0))); Assertions.assertThat(tableAssert2).isSameAs(tableAssert); tableAssert2 = AssertionsOnValueChronology.isAfterOrEqualTo(tableAssert, info, - getValue(null, Date.valueOf("2007-12-23")), - DateTimeValue.of(DateValue.of(2007, 12, 23))); + getValue(null, Date.valueOf("2007-12-23")), + DateTimeValue.of(DateValue.of(2007, 12, 23))); Assertions.assertThat(tableAssert2).isSameAs(tableAssert); tableAssert2 = AssertionsOnValueChronology.isAfterOrEqualTo(tableAssert, info, - getValue(null, Date.valueOf("2007-12-24")), - DateTimeValue - .of(DateValue.of(2007, 12, 23), - TimeValue.of(9, 1, 5))); + getValue(null, Date.valueOf("2007-12-24")), + DateTimeValue + .of(DateValue.of(2007, 12, 23), + TimeValue.of(9, 1, 5))); Assertions.assertThat(tableAssert2).isSameAs(tableAssert); } @@ -79,28 +78,28 @@ public void should_fail_because_value_is_before() throws Exception { TableAssert tableAssert = assertThat(table); try { AssertionsOnValueChronology.isAfterOrEqualTo(tableAssert, info, - getValue(null, Timestamp.valueOf("2007-12-23 09:01:05")), - DateTimeValue.of(DateValue.of(2007, 12, 23), - TimeValue.of(9, 1, 6))); + getValue(null, Timestamp.valueOf("2007-12-23 09:01:05")), + DateTimeValue.of(DateValue.of(2007, 12, 23), + TimeValue.of(9, 1, 6))); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[description] %n" - + "Expecting:%n" - + " <2007-12-23T09:01:05.000000000>%n" - + "to be after or equal to %n" - + " <2007-12-23T09:01:06.000000000>")); + + "Expecting:%n" + + " <2007-12-23T09:01:05.000000000>%n" + + "to be after or equal to %n" + + " <2007-12-23T09:01:06.000000000>")); } try { AssertionsOnValueChronology.isAfterOrEqualTo(tableAssert, info, - getValue(null, Date.valueOf("2007-12-23")), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 5))); + getValue(null, Date.valueOf("2007-12-23")), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 5))); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[description] %n" - + "Expecting:%n" - + " <2007-12-23T00:00:00.000000000>%n" - + "to be after or equal to %n" - + " <2007-12-23T09:01:05.000000000>")); + + "Expecting:%n" + + " <2007-12-23T00:00:00.000000000>%n" + + "to be after or equal to %n" + + " <2007-12-23T09:01:05.000000000>")); } } @@ -115,18 +114,18 @@ public void should_fail_because_value_is_not_compatible() throws Exception { TableAssert tableAssert = assertThat(table); try { AssertionsOnValueChronology.isAfterOrEqualTo(tableAssert, info, - getValue(null, "test"), - DateTimeValue.of(DateValue.of(2007, 12, 23), - TimeValue.of(9, 1, 5))); + getValue(null, "test"), + DateTimeValue.of(DateValue.of(2007, 12, 23), + TimeValue.of(9, 1, 5))); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[description] %n" - + "Expecting:%n" - + " <\"test\">%n" - + "to be of type%n" - + " <[DATE, DATE_TIME]>%n" - + "but was of type%n" - + " ")); + + "Expecting:%n" + + " <\"test\">%n" + + "to be of type%n" + + " <[DATE, DATE_TIME]>%n" + + "but was of type%n" + + " ")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnValueChronology_IsAfterOrEqualTo_DateValue_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnValueChronology_IsAfterOrEqualTo_DateValue_Test.java index adc24bb0..c1076f19 100644 --- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnValueChronology_IsAfterOrEqualTo_DateValue_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnValueChronology_IsAfterOrEqualTo_DateValue_Test.java @@ -8,10 +8,16 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions.impl; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + +import java.sql.Date; +import java.sql.Timestamp; + import org.assertj.core.api.Assertions; import org.assertj.core.api.WritableAssertionInfo; import org.assertj.db.api.TableAssert; @@ -20,18 +26,11 @@ import org.assertj.db.type.Table; import org.junit.Test; -import java.sql.Date; -import java.sql.Timestamp; - -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link AssertionsOnValueChronology} class : * {@link AssertionsOnValueChronology#isAfterOrEqualTo(org.assertj.db.api.AbstractAssert, org.assertj.core.api.WritableAssertionInfo, org.assertj.db.type.Value, org.assertj.db.type.DateValue)} method. * * @author Régis Pouiller - * */ public class AssertionsOnValueChronology_IsAfterOrEqualTo_DateValue_Test extends AbstractTest { @@ -44,20 +43,20 @@ public void test_is_after_or_equal_to() throws Exception { Table table = new Table(); TableAssert tableAssert = assertThat(table); TableAssert tableAssert2 = AssertionsOnValueChronology.isAfterOrEqualTo(tableAssert, info, - getValue(null, Timestamp.valueOf("2007-12-23 00:00:00")), - DateValue.of(2007, 12, 23)); + getValue(null, Timestamp.valueOf("2007-12-23 00:00:00")), + DateValue.of(2007, 12, 23)); Assertions.assertThat(tableAssert2).isSameAs(tableAssert); tableAssert2 = AssertionsOnValueChronology.isAfterOrEqualTo(tableAssert, info, - getValue(null, Timestamp.valueOf("2007-12-23 09:01:05")), - DateValue.of(2007, 12, 23)); + getValue(null, Timestamp.valueOf("2007-12-23 09:01:05")), + DateValue.of(2007, 12, 23)); Assertions.assertThat(tableAssert2).isSameAs(tableAssert); tableAssert2 = AssertionsOnValueChronology.isAfterOrEqualTo(tableAssert, info, - getValue(null, Date.valueOf("2007-12-23")), - DateValue.of(2007, 12, 23)); + getValue(null, Date.valueOf("2007-12-23")), + DateValue.of(2007, 12, 23)); Assertions.assertThat(tableAssert2).isSameAs(tableAssert); tableAssert2 = AssertionsOnValueChronology.isAfterOrEqualTo(tableAssert, info, - getValue(null, Date.valueOf("2007-12-24")), - DateValue.of(2007, 12, 23)); + getValue(null, Date.valueOf("2007-12-24")), + DateValue.of(2007, 12, 23)); Assertions.assertThat(tableAssert2).isSameAs(tableAssert); } @@ -72,27 +71,27 @@ public void should_fail_because_value_is_before() throws Exception { TableAssert tableAssert = assertThat(table); try { AssertionsOnValueChronology.isAfterOrEqualTo(tableAssert, info, - getValue(null, Timestamp.valueOf("2007-12-23 09:01:05")), - DateValue.of(2007, 12, 24)); + getValue(null, Timestamp.valueOf("2007-12-23 09:01:05")), + DateValue.of(2007, 12, 24)); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[description] %n" - + "Expecting:%n" - + " <2007-12-23T09:01:05.000000000>%n" - + "to be after or equal to %n" - + " <2007-12-24T00:00:00.000000000>")); + + "Expecting:%n" + + " <2007-12-23T09:01:05.000000000>%n" + + "to be after or equal to %n" + + " <2007-12-24T00:00:00.000000000>")); } try { AssertionsOnValueChronology.isAfterOrEqualTo(tableAssert, info, - getValue(null, Date.valueOf("2007-12-23")), - DateValue.of(2007, 12, 24)); + getValue(null, Date.valueOf("2007-12-23")), + DateValue.of(2007, 12, 24)); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[description] %n" - + "Expecting:%n" - + " <2007-12-23>%n" - + "to be after or equal to %n" - + " <2007-12-24>")); + + "Expecting:%n" + + " <2007-12-23>%n" + + "to be after or equal to %n" + + " <2007-12-24>")); } } @@ -107,17 +106,17 @@ public void should_fail_because_value_is_not_compatible() throws Exception { TableAssert tableAssert = assertThat(table); try { AssertionsOnValueChronology.isAfterOrEqualTo(tableAssert, info, - getValue(null, "test"), - DateValue.of(2007, 12, 23)); + getValue(null, "test"), + DateValue.of(2007, 12, 23)); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[description] %n" - + "Expecting:%n" - + " <\"test\">%n" - + "to be of type%n" - + " <[DATE, DATE_TIME]>%n" - + "but was of type%n" - + " ")); + + "Expecting:%n" + + " <\"test\">%n" + + "to be of type%n" + + " <[DATE, DATE_TIME]>%n" + + "but was of type%n" + + " ")); } } } diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnValueChronology_IsAfterOrEqualTo_String_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnValueChronology_IsAfterOrEqualTo_String_Test.java index 846d61e5..760eb6c3 100644 --- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnValueChronology_IsAfterOrEqualTo_String_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnValueChronology_IsAfterOrEqualTo_String_Test.java @@ -8,10 +8,17 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions.impl; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + +import java.sql.Date; +import java.sql.Time; +import java.sql.Timestamp; + import org.assertj.core.api.Assertions; import org.assertj.core.api.WritableAssertionInfo; import org.assertj.db.api.TableAssert; @@ -20,19 +27,11 @@ import org.assertj.db.type.Table; import org.junit.Test; -import java.sql.Date; -import java.sql.Time; -import java.sql.Timestamp; - -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.api.assertions.impl.AssertionsOnValueChronology} class : * {@link org.assertj.db.api.assertions.impl.AssertionsOnValueChronology#isAfterOrEqualTo(org.assertj.db.api.AbstractAssert, org.assertj.core.api.WritableAssertionInfo, org.assertj.db.type.Value, org.assertj.db.type.DateTimeValue)} method. * * @author Régis Pouiller - * */ public class AssertionsOnValueChronology_IsAfterOrEqualTo_String_Test extends AbstractTest { @@ -45,45 +44,45 @@ public void test_is_after_or_equal_to() throws Exception { Table table = new Table(); TableAssert tableAssert = assertThat(table); TableAssert tableAssert2 = AssertionsOnValueChronology.isAfterOrEqualTo(tableAssert, info, - getValue(null, Timestamp.valueOf( - "2007-12-23 09:01:05")), - "2007-12-23T09:01:05"); + getValue(null, Timestamp.valueOf( + "2007-12-23 09:01:05")), + "2007-12-23T09:01:05"); Assertions.assertThat(tableAssert2).isSameAs(tableAssert); tableAssert2 = AssertionsOnValueChronology.isAfterOrEqualTo(tableAssert, info, - getValue(null, Timestamp.valueOf("2007-12-23 09:01:05")), - "2007-12-23T09:01:00"); + getValue(null, Timestamp.valueOf("2007-12-23 09:01:05")), + "2007-12-23T09:01:00"); Assertions.assertThat(tableAssert2).isSameAs(tableAssert); tableAssert2 = AssertionsOnValueChronology.isAfterOrEqualTo(tableAssert, info, - getValue(null, Date.valueOf("2007-12-23")), - "2007-12-23T00:00:00"); + getValue(null, Date.valueOf("2007-12-23")), + "2007-12-23T00:00:00"); Assertions.assertThat(tableAssert2).isSameAs(tableAssert); tableAssert2 = AssertionsOnValueChronology.isAfterOrEqualTo(tableAssert, info, - getValue(null, Date.valueOf("2007-12-24")), - "2007-12-23T09:01:05"); + getValue(null, Date.valueOf("2007-12-24")), + "2007-12-23T09:01:05"); Assertions.assertThat(tableAssert2).isSameAs(tableAssert); tableAssert2 = AssertionsOnValueChronology.isAfterOrEqualTo(tableAssert, info, - getValue(null, Timestamp.valueOf("2007-12-23 00:00:00")), - "2007-12-23"); + getValue(null, Timestamp.valueOf("2007-12-23 00:00:00")), + "2007-12-23"); Assertions.assertThat(tableAssert2).isSameAs(tableAssert); tableAssert2 = AssertionsOnValueChronology.isAfterOrEqualTo(tableAssert, info, - getValue(null, Timestamp.valueOf("2007-12-23 09:01:05")), - "2007-12-23"); + getValue(null, Timestamp.valueOf("2007-12-23 09:01:05")), + "2007-12-23"); Assertions.assertThat(tableAssert2).isSameAs(tableAssert); tableAssert2 = AssertionsOnValueChronology.isAfterOrEqualTo(tableAssert, info, - getValue(null, Date.valueOf("2007-12-23")), - "2007-12-23"); + getValue(null, Date.valueOf("2007-12-23")), + "2007-12-23"); Assertions.assertThat(tableAssert2).isSameAs(tableAssert); tableAssert2 = AssertionsOnValueChronology.isAfterOrEqualTo(tableAssert, info, - getValue(null, Date.valueOf("2007-12-24")), - "2007-12-23"); + getValue(null, Date.valueOf("2007-12-24")), + "2007-12-23"); Assertions.assertThat(tableAssert2).isSameAs(tableAssert); tableAssert2 = AssertionsOnValueChronology.isAfterOrEqualTo(tableAssert, info, - getValue(null, Time.valueOf("09:01:05")), - "09:01:05"); + getValue(null, Time.valueOf("09:01:05")), + "09:01:05"); Assertions.assertThat(tableAssert2).isSameAs(tableAssert); tableAssert2 = AssertionsOnValueChronology.isAfterOrEqualTo(tableAssert, info, - getValue(null, Time.valueOf("09:01:05")), - "09:01:00"); + getValue(null, Time.valueOf("09:01:05")), + "09:01:00"); Assertions.assertThat(tableAssert2).isSameAs(tableAssert); } @@ -98,63 +97,63 @@ public void should_fail_because_value_is_before() throws Exception { TableAssert tableAssert = assertThat(table); try { AssertionsOnValueChronology.isAfterOrEqualTo(tableAssert, info, - getValue(null, Timestamp.valueOf("2007-12-23 09:01:05")), - "2007-12-23T09:01:06"); + getValue(null, Timestamp.valueOf("2007-12-23 09:01:05")), + "2007-12-23T09:01:06"); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[description] %n" - + "Expecting:%n" - + " <2007-12-23T09:01:05.000000000>%n" - + "to be after or equal to %n" - + " <2007-12-23T09:01:06.000000000>")); + + "Expecting:%n" + + " <2007-12-23T09:01:05.000000000>%n" + + "to be after or equal to %n" + + " <2007-12-23T09:01:06.000000000>")); } try { AssertionsOnValueChronology.isAfterOrEqualTo(tableAssert, info, - getValue(null, Date.valueOf("2007-12-23")), - "2007-12-23T09:01:05"); + getValue(null, Date.valueOf("2007-12-23")), + "2007-12-23T09:01:05"); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[description] %n" - + "Expecting:%n" - + " <2007-12-23T00:00:00.000000000>%n" - + "to be after or equal to %n" - + " <2007-12-23T09:01:05.000000000>")); + + "Expecting:%n" + + " <2007-12-23T00:00:00.000000000>%n" + + "to be after or equal to %n" + + " <2007-12-23T09:01:05.000000000>")); } try { AssertionsOnValueChronology.isAfterOrEqualTo(tableAssert, info, - getValue(null, Timestamp.valueOf("2007-12-23 09:01:05")), - "2007-12-24"); + getValue(null, Timestamp.valueOf("2007-12-23 09:01:05")), + "2007-12-24"); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[description] %n" - + "Expecting:%n" - + " <2007-12-23T09:01:05.000000000>%n" - + "to be after or equal to %n" - + " <2007-12-24T00:00:00.000000000>")); + + "Expecting:%n" + + " <2007-12-23T09:01:05.000000000>%n" + + "to be after or equal to %n" + + " <2007-12-24T00:00:00.000000000>")); } try { AssertionsOnValueChronology.isAfterOrEqualTo(tableAssert, info, - getValue(null, Date.valueOf("2007-12-23")), - "2007-12-24"); + getValue(null, Date.valueOf("2007-12-23")), + "2007-12-24"); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[description] %n" - + "Expecting:%n" - + " <2007-12-23T00:00:00.000000000>%n" - + "to be after or equal to %n" - + " <2007-12-24T00:00:00.000000000>")); + + "Expecting:%n" + + " <2007-12-23T00:00:00.000000000>%n" + + "to be after or equal to %n" + + " <2007-12-24T00:00:00.000000000>")); } try { AssertionsOnValueChronology.isAfterOrEqualTo(tableAssert, info, - getValue(null, Time.valueOf("09:01:05")), - "09:01:06"); + getValue(null, Time.valueOf("09:01:05")), + "09:01:06"); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[description] %n" - + "Expecting:%n" - + " <09:01:05.000000000>%n" - + "to be after or equal to %n" - + " <09:01:06.000000000>")); + + "Expecting:%n" + + " <09:01:05.000000000>%n" + + "to be after or equal to %n" + + " <09:01:06.000000000>")); } } @@ -169,17 +168,17 @@ public void should_fail_because_value_is_not_compatible() throws Exception { TableAssert tableAssert = assertThat(table); try { AssertionsOnValueChronology.isAfterOrEqualTo(tableAssert, info, - getValue(null, "test"), - "2007-12-23T09:01:05"); + getValue(null, "test"), + "2007-12-23T09:01:05"); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[description] %n" - + "Expecting:%n" - + " <\"test\">%n" - + "to be of type%n" - + " <[DATE, TIME, DATE_TIME]>%n" - + "but was of type%n" - + " ")); + + "Expecting:%n" + + " <\"test\">%n" + + "to be of type%n" + + " <[DATE, TIME, DATE_TIME]>%n" + + "but was of type%n" + + " ")); } } @@ -194,8 +193,8 @@ public void should_fail_because_expected_string_is_not_correct_to_compare_to_tim TableAssert tableAssert = assertThat(table); try { AssertionsOnValueChronology.isAfterOrEqualTo(tableAssert, info, - getValue(null, Time.valueOf("09:01:05")), - "09_01:00"); + getValue(null, Time.valueOf("09:01:05")), + "09_01:00"); fail("An exception must be raised"); } catch (AssertJDBException e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("Expected <09_01:00> is not correct to compare to <09:01:05.000000000>")); @@ -213,8 +212,8 @@ public void should_fail_because_expected_string_is_not_correct_to_compare_to() t TableAssert tableAssert = assertThat(table); try { AssertionsOnValueChronology.isAfterOrEqualTo(tableAssert, info, - getValue(null, Date.valueOf("2007-12-23")), - "2007_12-23T09:01:00"); + getValue(null, Date.valueOf("2007-12-23")), + "2007_12-23T09:01:00"); fail("An exception must be raised"); } catch (AssertJDBException e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("Expected <2007_12-23T09:01:00> is not correct to compare to <2007-12-23T00:00:00.000000000>")); diff --git a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnValueChronology_IsAfterOrEqualTo_TimeValue_Test.java b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnValueChronology_IsAfterOrEqualTo_TimeValue_Test.java index 851058db..3b5173df 100644 --- a/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnValueChronology_IsAfterOrEqualTo_TimeValue_Test.java +++ b/src/test/java/org/assertj/db/api/assertions/impl/AssertionsOnValueChronology_IsAfterOrEqualTo_TimeValue_Test.java @@ -8,10 +8,15 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.api.assertions.impl; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + +import java.sql.Time; + import org.assertj.core.api.Assertions; import org.assertj.core.api.WritableAssertionInfo; import org.assertj.db.api.TableAssert; @@ -20,17 +25,11 @@ import org.assertj.db.type.TimeValue; import org.junit.Test; -import java.sql.Time; - -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link AssertionsOnValueChronology} class : * {@link AssertionsOnValueChronology#isAfterOrEqualTo(org.assertj.db.api.AbstractAssert, org.assertj.core.api.WritableAssertionInfo, org.assertj.db.type.Value, org.assertj.db.type.TimeValue)} method. * * @author Régis Pouiller - * */ public class AssertionsOnValueChronology_IsAfterOrEqualTo_TimeValue_Test extends AbstractTest { @@ -43,12 +42,12 @@ public void test_is_after_or_equal_to() throws Exception { Table table = new Table(); TableAssert tableAssert = assertThat(table); TableAssert tableAssert2 = AssertionsOnValueChronology.isAfterOrEqualTo(tableAssert, info, - getValue(null, Time.valueOf("09:01:05")), - TimeValue.of(9, 1, 5)); + getValue(null, Time.valueOf("09:01:05")), + TimeValue.of(9, 1, 5)); Assertions.assertThat(tableAssert2).isSameAs(tableAssert); tableAssert2 = AssertionsOnValueChronology.isAfterOrEqualTo(tableAssert, info, - getValue(null, Time.valueOf("09:01:05")), - TimeValue.of(9, 1, 0)); + getValue(null, Time.valueOf("09:01:05")), + TimeValue.of(9, 1, 0)); Assertions.assertThat(tableAssert2).isSameAs(tableAssert); } @@ -63,15 +62,15 @@ public void should_fail_because_value_is_before() throws Exception { TableAssert tableAssert = assertThat(table); try { AssertionsOnValueChronology.isAfterOrEqualTo(tableAssert, info, - getValue(null, Time.valueOf("09:01:05")), - TimeValue.of(9, 1, 6)); + getValue(null, Time.valueOf("09:01:05")), + TimeValue.of(9, 1, 6)); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[description] %n" - + "Expecting:%n" - + " <09:01:05.000000000>%n" - + "to be after or equal to %n" - + " <09:01:06.000000000>")); + + "Expecting:%n" + + " <09:01:05.000000000>%n" + + "to be after or equal to %n" + + " <09:01:06.000000000>")); } } @@ -86,17 +85,17 @@ public void should_fail_because_value_is_not_compatible() throws Exception { TableAssert tableAssert = assertThat(table); try { AssertionsOnValueChronology.isAfterOrEqualTo(tableAssert, info, - getValue(null, "test"), - TimeValue.of(9, 1, 5)); + getValue(null, "test"), + TimeValue.of(9, 1, 5)); fail("An exception must be raised"); } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[description] %n" - + "Expecting:%n" - + " <\"test\">%n" - + "to be of type%n" - + "
    constructor = Table.class.getDeclaredConstructor(); constructor.setAccessible(true); Table table = constructor.newInstance(); @@ -221,7 +206,7 @@ protected static Table getTable(List columnsNameList, List pksNa * @throws Exception Exception */ protected static Request getRequest(List columnsNameList, List pksNameList, List rowsList) - throws Exception { + throws Exception { Constructor constructor = Request.class.getDeclaredConstructor(); constructor.setAccessible(true); Request request = constructor.newInstance(); @@ -243,8 +228,8 @@ protected static Request getRequest(List columnsNameList, List p /** * Returns an instance of a {@code Value}. * - * @param columnName The name of the column. - * @param object The object in the value. + * @param columnName The name of the column. + * @param object The object in the value. * @return An instance. * @throws Exception Exception */ @@ -285,13 +270,13 @@ protected static Changes getChanges(List changesList) throws Exception { */ protected static Change getChange(DataType dataType, String dataName, ChangeType changeType, Row rowAtStartPoint, Row rowAtEndPoint) - throws Exception { + throws Exception { Constructor constructor = Change.class - .getDeclaredConstructor(DataType.class, String.class, ChangeType.class, Row.class, Row.class, - LetterCase.class, LetterCase.class, LetterCase.class); + .getDeclaredConstructor(DataType.class, String.class, ChangeType.class, Row.class, Row.class, + LetterCase.class, LetterCase.class, LetterCase.class); constructor.setAccessible(true); return constructor.newInstance(dataType, dataName, changeType, rowAtStartPoint, rowAtEndPoint, - LetterCase.TABLE_DEFAULT, LetterCase.COLUMN_DEFAULT, LetterCase.PRIMARY_KEY_DEFAULT); + LetterCase.TABLE_DEFAULT, LetterCase.COLUMN_DEFAULT, LetterCase.PRIMARY_KEY_DEFAULT); } /** @@ -316,7 +301,7 @@ protected static Change getTableCreationChange(String dataName, Row rowAtEndPoin * @throws Exception Exception */ protected static Change getTableModificationChange(String dataName, Row rowAtStartPoint, Row rowAtEndPoint) - throws Exception { + throws Exception { return getChange(DataType.TABLE, dataName, ChangeType.MODIFICATION, rowAtStartPoint, rowAtEndPoint); } @@ -332,6 +317,26 @@ protected static Change getTableDeletionChange(String dataName, Row rowAtStartPo return getChange(DataType.TABLE, dataName, ChangeType.DELETION, rowAtStartPoint, null); } + @Before + public void initiate() { + DB_SETUP_TRACKER.launchIfNecessary(DB_SETUP); + } + + @After + public void determineIfReloadIsNeeded() throws NoSuchMethodException, SecurityException { + Annotation classAnnotation = getClass().getAnnotation(NeedReload.class); + if (classAnnotation != null) { + return; + } + String methodName = testNameRule.getMethodName(); + Method method = getClass().getDeclaredMethod(methodName); + Annotation methodAnnotation = method.getAnnotation(NeedReload.class); + if (methodAnnotation != null) { + return; + } + DB_SETUP_TRACKER.skipNextLaunch(); + } + /** * Update the database. * @@ -357,7 +362,7 @@ protected void update(String request, Object... parameters) { protected void updateChangesForTests() { update("insert into movie values(4, 'Ghostbusters', 1984, '30B443AE-C0C9-4790-9BEC-CE1380808435')"); update( - "insert into actor values(4, 'Murray', 'Bill', PARSEDATETIME('21/09/1950', 'dd/MM/yyyy'), '30B443AE-C0C9-4790-9BEC-CE1380808435')"); + "insert into actor values(4, 'Murray', 'Bill', PARSEDATETIME('21/09/1950', 'dd/MM/yyyy'), '30B443AE-C0C9-4790-9BEC-CE1380808435')"); update("insert into interpretation values(6, 4, 4, 'Dr Peter Venkman')"); update("delete from interpretation where id = 5"); diff --git a/src/test/java/org/assertj/db/common/DefaultConnection.java b/src/test/java/org/assertj/db/common/DefaultConnection.java index d433df79..77cfc8d6 100644 --- a/src/test/java/org/assertj/db/common/DefaultConnection.java +++ b/src/test/java/org/assertj/db/common/DefaultConnection.java @@ -8,20 +8,33 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.common; -import java.sql.*; +import java.sql.Array; +import java.sql.Blob; +import java.sql.CallableStatement; +import java.sql.Clob; +import java.sql.Connection; +import java.sql.DatabaseMetaData; +import java.sql.NClob; +import java.sql.PreparedStatement; +import java.sql.SQLClientInfoException; +import java.sql.SQLException; +import java.sql.SQLWarning; +import java.sql.SQLXML; +import java.sql.Savepoint; +import java.sql.Statement; +import java.sql.Struct; import java.util.Map; import java.util.Properties; import java.util.concurrent.Executor; /** * Default Connection. - * + * * @author Régis Pouiller - * */ public class DefaultConnection implements Connection { @@ -41,16 +54,6 @@ public boolean isWrapperFor(Class iface) throws SQLException { return thisConnection.isWrapperFor(iface); } - @Override - public void setTypeMap(Map> map) throws SQLException { - thisConnection.setTypeMap(map); - } - - @Override - public void setTransactionIsolation(int level) throws SQLException { - thisConnection.setTransactionIsolation(level); - } - @Override public Savepoint setSavepoint(String name) throws SQLException { return thisConnection.setSavepoint(name); @@ -61,36 +64,11 @@ public Savepoint setSavepoint() throws SQLException { return thisConnection.setSavepoint(); } - @Override - public void setReadOnly(boolean readOnly) throws SQLException { - thisConnection.setReadOnly(readOnly); - } - - @Override - public void setHoldability(int holdability) throws SQLException { - thisConnection.setHoldability(holdability); - } - @Override public void setClientInfo(String name, String value) throws SQLClientInfoException { thisConnection.setClientInfo(name, value); } - @Override - public void setClientInfo(Properties properties) throws SQLClientInfoException { - thisConnection.setClientInfo(properties); - } - - @Override - public void setCatalog(String catalog) throws SQLException { - thisConnection.setCatalog(catalog); - } - - @Override - public void setAutoCommit(boolean autoCommit) throws SQLException { - thisConnection.setAutoCommit(autoCommit); - } - @Override public void rollback(Savepoint savepoint) throws SQLException { thisConnection.rollback(savepoint); @@ -108,13 +86,13 @@ public void releaseSavepoint(Savepoint savepoint) throws SQLException { @Override public PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency, - int resultSetHoldability) throws SQLException { + int resultSetHoldability) throws SQLException { return thisConnection.prepareStatement(sql, resultSetType, resultSetConcurrency, resultSetHoldability); } @Override public PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency) - throws SQLException { + throws SQLException { return thisConnection.prepareStatement(sql, resultSetType, resultSetConcurrency); } @@ -140,7 +118,7 @@ public PreparedStatement prepareStatement(String sql) throws SQLException { @Override public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) - throws SQLException { + throws SQLException { return thisConnection.prepareCall(sql, resultSetType, resultSetConcurrency, resultSetHoldability); } @@ -169,6 +147,11 @@ public boolean isReadOnly() throws SQLException { return thisConnection.isReadOnly(); } + @Override + public void setReadOnly(boolean readOnly) throws SQLException { + thisConnection.setReadOnly(readOnly); + } + @Override public boolean isClosed() throws SQLException { return thisConnection.isClosed(); @@ -184,11 +167,21 @@ public Map> getTypeMap() throws SQLException { return thisConnection.getTypeMap(); } + @Override + public void setTypeMap(Map> map) throws SQLException { + thisConnection.setTypeMap(map); + } + @Override public int getTransactionIsolation() throws SQLException { return thisConnection.getTransactionIsolation(); } + @Override + public void setTransactionIsolation(int level) throws SQLException { + thisConnection.setTransactionIsolation(level); + } + @Override public DatabaseMetaData getMetaData() throws SQLException { return thisConnection.getMetaData(); @@ -199,6 +192,11 @@ public int getHoldability() throws SQLException { return thisConnection.getHoldability(); } + @Override + public void setHoldability(int holdability) throws SQLException { + thisConnection.setHoldability(holdability); + } + @Override public String getClientInfo(String name) throws SQLException { return thisConnection.getClientInfo(name); @@ -209,16 +207,31 @@ public Properties getClientInfo() throws SQLException { return thisConnection.getClientInfo(); } + @Override + public void setClientInfo(Properties properties) throws SQLClientInfoException { + thisConnection.setClientInfo(properties); + } + @Override public String getCatalog() throws SQLException { return thisConnection.getCatalog(); } + @Override + public void setCatalog(String catalog) throws SQLException { + thisConnection.setCatalog(catalog); + } + @Override public boolean getAutoCommit() throws SQLException { return thisConnection.getAutoCommit(); } + @Override + public void setAutoCommit(boolean autoCommit) throws SQLException { + thisConnection.setAutoCommit(autoCommit); + } + @Override public Struct createStruct(String typeName, Object[] attributes) throws SQLException { return thisConnection.createStruct(typeName, attributes); @@ -226,7 +239,7 @@ public Struct createStruct(String typeName, Object[] attributes) throws SQLExcep @Override public Statement createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability) - throws SQLException { + throws SQLException { return thisConnection.createStatement(resultSetType, resultSetConcurrency, resultSetHoldability); } @@ -281,13 +294,13 @@ public void clearWarnings() throws SQLException { } @Override - public void setSchema(String schema) throws SQLException { - thisConnection.setSchema(schema); + public String getSchema() throws SQLException { + return thisConnection.getSchema(); } @Override - public String getSchema() throws SQLException { - return thisConnection.getSchema(); + public void setSchema(String schema) throws SQLException { + thisConnection.setSchema(schema); } @Override diff --git a/src/test/java/org/assertj/db/common/DefaultDataSource.java b/src/test/java/org/assertj/db/common/DefaultDataSource.java index b7a5890b..3ad15ee9 100644 --- a/src/test/java/org/assertj/db/common/DefaultDataSource.java +++ b/src/test/java/org/assertj/db/common/DefaultDataSource.java @@ -8,22 +8,21 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.common; -import javax.sql.DataSource; import java.io.PrintWriter; import java.sql.Connection; import java.sql.SQLException; import java.sql.SQLFeatureNotSupportedException; import java.util.logging.Logger; +import javax.sql.DataSource; /** * Default DataSource. - * + * * @author Régis Pouiller - * */ public class DefaultDataSource implements DataSource { @@ -44,13 +43,13 @@ public void setLogWriter(PrintWriter out) throws SQLException { } @Override - public void setLoginTimeout(int seconds) throws SQLException { - thisDataSource.setLoginTimeout(seconds); + public int getLoginTimeout() throws SQLException { + return thisDataSource.getLoginTimeout(); } @Override - public int getLoginTimeout() throws SQLException { - return thisDataSource.getLoginTimeout(); + public void setLoginTimeout(int seconds) throws SQLException { + thisDataSource.setLoginTimeout(seconds); } @Override diff --git a/src/test/java/org/assertj/db/common/DefaultPreparedStatement.java b/src/test/java/org/assertj/db/common/DefaultPreparedStatement.java index 2cab2ebc..569cbdbc 100644 --- a/src/test/java/org/assertj/db/common/DefaultPreparedStatement.java +++ b/src/test/java/org/assertj/db/common/DefaultPreparedStatement.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.common; @@ -16,14 +16,29 @@ import java.io.Reader; import java.math.BigDecimal; import java.net.URL; -import java.sql.*; +import java.sql.Array; +import java.sql.Blob; +import java.sql.Clob; +import java.sql.Connection; +import java.sql.Date; +import java.sql.NClob; +import java.sql.ParameterMetaData; +import java.sql.PreparedStatement; +import java.sql.Ref; +import java.sql.ResultSet; +import java.sql.ResultSetMetaData; +import java.sql.RowId; +import java.sql.SQLException; +import java.sql.SQLWarning; +import java.sql.SQLXML; +import java.sql.Time; +import java.sql.Timestamp; import java.util.Calendar; /** * Default PreparedStatement. - * + * * @author Régis Pouiller - * */ public class DefaultPreparedStatement implements PreparedStatement { @@ -123,19 +138,14 @@ public boolean getMoreResults() throws SQLException { return thisPreparedStatement.getMoreResults(); } - @Override - public void setFetchDirection(int direction) throws SQLException { - thisPreparedStatement.setFetchDirection(direction); - } - @Override public int getFetchDirection() throws SQLException { return thisPreparedStatement.getFetchDirection(); } @Override - public void setFetchSize(int rows) throws SQLException { - thisPreparedStatement.setFetchSize(rows); + public void setFetchDirection(int direction) throws SQLException { + thisPreparedStatement.setFetchDirection(direction); } @Override @@ -143,6 +153,11 @@ public int getFetchSize() throws SQLException { return thisPreparedStatement.getFetchSize(); } + @Override + public void setFetchSize(int rows) throws SQLException { + thisPreparedStatement.setFetchSize(rows); + } + @Override public int getResultSetConcurrency() throws SQLException { return thisPreparedStatement.getResultSetConcurrency(); @@ -224,13 +239,13 @@ public boolean isClosed() throws SQLException { } @Override - public void setPoolable(boolean poolable) throws SQLException { - thisPreparedStatement.setPoolable(poolable); + public boolean isPoolable() throws SQLException { + return thisPreparedStatement.isPoolable(); } @Override - public boolean isPoolable() throws SQLException { - return thisPreparedStatement.isPoolable(); + public void setPoolable(boolean poolable) throws SQLException { + thisPreparedStatement.setPoolable(poolable); } @Override diff --git a/src/test/java/org/assertj/db/common/DefaultResultSet.java b/src/test/java/org/assertj/db/common/DefaultResultSet.java index 59b99da1..ecbb4558 100644 --- a/src/test/java/org/assertj/db/common/DefaultResultSet.java +++ b/src/test/java/org/assertj/db/common/DefaultResultSet.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.common; @@ -16,15 +16,28 @@ import java.io.Reader; import java.math.BigDecimal; import java.net.URL; -import java.sql.*; +import java.sql.Array; +import java.sql.Blob; +import java.sql.Clob; +import java.sql.Date; +import java.sql.NClob; +import java.sql.Ref; +import java.sql.ResultSet; +import java.sql.ResultSetMetaData; +import java.sql.RowId; +import java.sql.SQLException; +import java.sql.SQLWarning; +import java.sql.SQLXML; +import java.sql.Statement; +import java.sql.Time; +import java.sql.Timestamp; import java.util.Calendar; import java.util.Map; /** * Default ResultSet with exception when getting an object. - * + * * @author Régis Pouiller - * */ public class DefaultResultSet implements ResultSet { @@ -328,17 +341,13 @@ public boolean previous() { return false; } - @Override - public void setFetchDirection(int direction) { - } - @Override public int getFetchDirection() { return ResultSet.FETCH_UNKNOWN; } @Override - public void setFetchSize(int rows) { + public void setFetchDirection(int direction) { } @Override @@ -346,6 +355,10 @@ public int getFetchSize() { return 0; } + @Override + public void setFetchSize(int rows) { + } + @Override public int getType() { return ResultSet.TYPE_FORWARD_ONLY; diff --git a/src/test/java/org/assertj/db/common/DefaultStatement.java b/src/test/java/org/assertj/db/common/DefaultStatement.java index af4f2f30..09e28eab 100644 --- a/src/test/java/org/assertj/db/common/DefaultStatement.java +++ b/src/test/java/org/assertj/db/common/DefaultStatement.java @@ -8,17 +8,20 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.common; -import java.sql.*; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.SQLWarning; +import java.sql.Statement; /** * Default Statement. - * + * * @author Régis Pouiller - * */ public class DefaultStatement implements Statement { @@ -128,19 +131,14 @@ public boolean getMoreResults() throws SQLException { return thisStatement.getMoreResults(); } - @Override - public void setFetchDirection(int direction) throws SQLException { - thisStatement.setFetchDirection(direction); - } - @Override public int getFetchDirection() throws SQLException { return thisStatement.getFetchDirection(); } @Override - public void setFetchSize(int rows) throws SQLException { - thisStatement.setFetchSize(rows); + public void setFetchDirection(int direction) throws SQLException { + thisStatement.setFetchDirection(direction); } @Override @@ -148,6 +146,11 @@ public int getFetchSize() throws SQLException { return thisStatement.getFetchSize(); } + @Override + public void setFetchSize(int rows) throws SQLException { + thisStatement.setFetchSize(rows); + } + @Override public int getResultSetConcurrency() throws SQLException { return thisStatement.getResultSetConcurrency(); @@ -229,13 +232,13 @@ public boolean isClosed() throws SQLException { } @Override - public void setPoolable(boolean poolable) throws SQLException { - thisStatement.setPoolable(poolable); + public boolean isPoolable() throws SQLException { + return thisStatement.isPoolable(); } @Override - public boolean isPoolable() throws SQLException { - return thisStatement.isPoolable(); + public void setPoolable(boolean poolable) throws SQLException { + thisStatement.setPoolable(poolable); } @Override diff --git a/src/test/java/org/assertj/db/common/NeedReload.java b/src/test/java/org/assertj/db/common/NeedReload.java index b36b6063..a895fb63 100644 --- a/src/test/java/org/assertj/db/common/NeedReload.java +++ b/src/test/java/org/assertj/db/common/NeedReload.java @@ -8,19 +8,22 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.common; -import java.lang.annotation.*; +import java.lang.annotation.Documented; +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; /** * Indicates that after the tests it need to reload the data. - * + * * @author Régis Pouiller - * */ -@Target({ ElementType.TYPE, ElementType.METHOD }) +@Target({ElementType.TYPE, ElementType.METHOD}) @Retention(RetentionPolicy.RUNTIME) @Documented public @interface NeedReload { diff --git a/src/test/java/org/assertj/db/configuration/TestsConfiguration.java b/src/test/java/org/assertj/db/configuration/TestsConfiguration.java index 45c81394..b49acc33 100644 --- a/src/test/java/org/assertj/db/configuration/TestsConfiguration.java +++ b/src/test/java/org/assertj/db/configuration/TestsConfiguration.java @@ -8,10 +8,12 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.configuration; +import javax.sql.DataSource; + import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.jdbc.datasource.DataSourceTransactionManager; @@ -19,13 +21,10 @@ import org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseType; import org.springframework.transaction.PlatformTransactionManager; -import javax.sql.DataSource; - /** * Provides the configuration for the tests. - * + * * @author Régis Pouiller - * */ @Configuration public class TestsConfiguration { @@ -33,7 +32,7 @@ public class TestsConfiguration { @Bean public DataSource dataSource() { return new EmbeddedDatabaseBuilder().setName("test").setType(EmbeddedDatabaseType.H2).addScript("schema.sql") - .build(); + .build(); } @Bean diff --git a/src/test/java/org/assertj/db/database/AbstractDatabaseTest.java b/src/test/java/org/assertj/db/database/AbstractDatabaseTest.java index 8126d8e7..e49c5a56 100644 --- a/src/test/java/org/assertj/db/database/AbstractDatabaseTest.java +++ b/src/test/java/org/assertj/db/database/AbstractDatabaseTest.java @@ -8,12 +8,20 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.database; -import com.ninja_squad.dbsetup.DbSetup; -import com.ninja_squad.dbsetup.DbSetupTracker; +import static org.assertj.db.type.lettercase.LetterCase.getLetterCase; + +import java.lang.annotation.Annotation; +import java.lang.reflect.Method; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.sql.DataSource; + import org.assertj.db.common.NeedReload; import org.assertj.db.type.lettercase.CaseComparisons; import org.assertj.db.type.lettercase.CaseConversions; @@ -27,21 +35,13 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.transaction.annotation.Transactional; -import javax.sql.DataSource; -import java.lang.annotation.Annotation; -import java.lang.reflect.Method; -import java.sql.Connection; -import java.sql.PreparedStatement; -import java.util.logging.Level; -import java.util.logging.Logger; - -import static org.assertj.db.type.lettercase.LetterCase.getLetterCase; +import com.ninja_squad.dbsetup.DbSetup; +import com.ninja_squad.dbsetup.DbSetupTracker; /** * Parent for all the tests which are specific for databases. * * @author Régis Pouiller - * */ @RunWith(SpringJUnit4ClassRunner.class) @Transactional @@ -85,7 +85,7 @@ public void determineIfReloadIsNeeded() throws NoSuchMethodException { /** * Update the database. * - * @param request Request to update. + * @param request Request to update. * @param parameters The parameters of the request. */ protected void update(String request, Object... parameters) { diff --git a/src/test/java/org/assertj/db/database/derby/DerbyConfiguration.java b/src/test/java/org/assertj/db/database/derby/DerbyConfiguration.java index 800cb7d2..7fb75efa 100644 --- a/src/test/java/org/assertj/db/database/derby/DerbyConfiguration.java +++ b/src/test/java/org/assertj/db/database/derby/DerbyConfiguration.java @@ -8,10 +8,12 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.database.derby; +import javax.sql.DataSource; + import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.jdbc.datasource.DataSourceTransactionManager; @@ -19,13 +21,10 @@ import org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseType; import org.springframework.transaction.PlatformTransactionManager; -import javax.sql.DataSource; - /** * Provides the configuration for the tests. * * @author Régis Pouiller - * */ @Configuration public class DerbyConfiguration { @@ -33,7 +32,7 @@ public class DerbyConfiguration { @Bean public DataSource dataSource() { return new EmbeddedDatabaseBuilder().setName("testDerby").setType(EmbeddedDatabaseType.DERBY).addScript("schemaDerby.sql") - .build(); + .build(); } @Bean diff --git a/src/test/java/org/assertj/db/database/h2/AbstractH2Test.java b/src/test/java/org/assertj/db/database/h2/AbstractH2Test.java index 5c1751a4..df53df8f 100644 --- a/src/test/java/org/assertj/db/database/h2/AbstractH2Test.java +++ b/src/test/java/org/assertj/db/database/h2/AbstractH2Test.java @@ -8,14 +8,21 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.database.h2; -import com.ninja_squad.dbsetup.DbSetup; -import com.ninja_squad.dbsetup.DbSetupTracker; -import com.ninja_squad.dbsetup.destination.DriverManagerDestination; -import com.ninja_squad.dbsetup.operation.Operation; +import static com.ninja_squad.dbsetup.Operations.deleteAllFrom; +import static com.ninja_squad.dbsetup.Operations.insertInto; +import static com.ninja_squad.dbsetup.Operations.sequenceOf; +import static com.ninja_squad.dbsetup.Operations.sql; + +import java.sql.Date; +import java.sql.Time; +import java.sql.Timestamp; +import java.util.Locale; +import javax.sql.DataSource; + import org.assertj.db.database.AbstractDatabaseTest; import org.assertj.db.type.DataSourceWithLetterCase; import org.assertj.db.type.SourceWithLetterCase; @@ -23,79 +30,69 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; -import javax.sql.DataSource; -import java.sql.Date; -import java.sql.Time; -import java.sql.Timestamp; -import java.util.Locale; - -import static com.ninja_squad.dbsetup.Operations.*; +import com.ninja_squad.dbsetup.DbSetup; +import com.ninja_squad.dbsetup.DbSetupTracker; +import com.ninja_squad.dbsetup.destination.DriverManagerDestination; +import com.ninja_squad.dbsetup.operation.Operation; /** * Parent for all the tests which are specific for H2 database. * * @author Régis Pouiller - * */ -@ContextConfiguration(classes = { H2Configuration.class }) +@ContextConfiguration(classes = {H2Configuration.class}) public abstract class AbstractH2Test extends AbstractDatabaseTest { - protected DataSource dataSource; - protected DataSourceWithLetterCase dataSourceDDD; - protected DataSourceWithLetterCase dataSourceUIUIUI; - protected DataSourceWithLetterCase dataSourceNSNSNS; - - protected final SourceWithLetterCase sourceDDD = new SourceWithLetterCase("jdbc:h2:mem:testH2", "sa", "", - LetterCase.TABLE_DEFAULT, - LetterCase.COLUMN_DEFAULT, - LetterCase.PRIMARY_KEY_DEFAULT); - protected final SourceWithLetterCase sourceUIUIUI = new SourceWithLetterCase("jdbc:h2:mem:testH2", "sa", "", - letterCaseUI, - letterCaseUI, - letterCaseUI); - protected final SourceWithLetterCase sourceNSNSNS = new SourceWithLetterCase("jdbc:h2:mem:testH2", "sa", "", - letterCaseNS, - letterCaseNS, - letterCaseNS); - private static final Operation DELETE_ALL = deleteAllFrom("teSt"); - private static final Operation INSERT_TEST = insertInto("teSt") - .columns("Var1", "vAr2", "vaR3", "var4", "var5", "var6", "var7", "var8", "var9", "var10", - "var11", "var12", "var13", "var14", "var15", "var16", "var17", "var18", "var19", "var20", - "var21", "var22", "var23", "var24", "var25", "var26", "var27", "var28", "var29", "var30", - "var31", "var32", "var33", "var34", "var35", "var36", "var37", "var38", "var39", "var40", - "var41", "var42", "var43", "var44", "var45", "var46", "var47", "var48", "var49", "var50", - "var51", "var52", "var53", "var54", "var55", "var56", "var57", "var58", "var59", "var60", - "var61") - .values(1, 2, 3, 4, 5, 6, true, false, true, 7, - 8, 9, 10, 11, 12, 13.13, 14.14, 15.15, 16.16, 17.17, - 18.18, 19.19, 20.20, 21.21, Time.valueOf("09:01:00"), - Date.valueOf("2007-12-23"), Timestamp.valueOf("2007-12-23 09:01:00"), - Timestamp.valueOf("2007-12-23 09:01:00"), Timestamp.valueOf("2007-12-23 09:01:00"), null, - null, null, null, null, Locale.FRENCH, "22", "23", "24", "25", "26", - "27", "28", "29", "30", "31", null, null, null, null, null, - null, "32", "33", "34", "35", "36", "37", "38", "30B443AE-C0C9-4790-9BEC-CE1380808435", null, - null).build(); - + .columns("Var1", "vAr2", "vaR3", "var4", "var5", "var6", "var7", "var8", "var9", "var10", + "var11", "var12", "var13", "var14", "var15", "var16", "var17", "var18", "var19", "var20", + "var21", "var22", "var23", "var24", "var25", "var26", "var27", "var28", "var29", "var30", + "var31", "var32", "var33", "var34", "var35", "var36", "var37", "var38", "var39", "var40", + "var41", "var42", "var43", "var44", "var45", "var46", "var47", "var48", "var49", "var50", + "var51", "var52", "var53", "var54", "var55", "var56", "var57", "var58", "var59", "var60", + "var61") + .values(1, 2, 3, 4, 5, 6, true, false, true, 7, + 8, 9, 10, 11, 12, 13.13, 14.14, 15.15, 16.16, 17.17, + 18.18, 19.19, 20.20, 21.21, Time.valueOf("09:01:00"), + Date.valueOf("2007-12-23"), Timestamp.valueOf("2007-12-23 09:01:00"), + Timestamp.valueOf("2007-12-23 09:01:00"), Timestamp.valueOf("2007-12-23 09:01:00"), null, + null, null, null, null, Locale.FRENCH, "22", "23", "24", "25", "26", + "27", "28", "29", "30", "31", null, null, null, null, null, + null, "32", "33", "34", "35", "36", "37", "38", "30B443AE-C0C9-4790-9BEC-CE1380808435", null, + null).build(); private static final Operation SQL = sql( - "update test set var30 = FILE_READ('classpath:h2-logo-2.png') where Var1 = 1", - "update test set var31 = FILE_READ('classpath:h2-logo-2.png') where Var1 = 1", - "update test set var32 = FILE_READ('classpath:h2-logo-2.png') where Var1 = 1", - "update test set var33 = FILE_READ('classpath:h2-logo-2.png') where Var1 = 1", - "update test set var34 = FILE_READ('classpath:h2-logo-2.png') where Var1 = 1", - "update test set var46 = FILE_READ('classpath:h2-logo-2.png') where Var1 = 1", - "update test set var47 = FILE_READ('classpath:h2-logo-2.png') where Var1 = 1", - "update test set var48 = FILE_READ('classpath:h2-logo-2.png') where Var1 = 1", - "update test set var49 = FILE_READ('classpath:h2-logo-2.png') where Var1 = 1", - "update test set var50 = FILE_READ('classpath:h2-logo-2.png') where Var1 = 1", - "update test set var51 = FILE_READ('classpath:h2-logo-2.png') where Var1 = 1" + "update test set var30 = FILE_READ('classpath:h2-logo-2.png') where Var1 = 1", + "update test set var31 = FILE_READ('classpath:h2-logo-2.png') where Var1 = 1", + "update test set var32 = FILE_READ('classpath:h2-logo-2.png') where Var1 = 1", + "update test set var33 = FILE_READ('classpath:h2-logo-2.png') where Var1 = 1", + "update test set var34 = FILE_READ('classpath:h2-logo-2.png') where Var1 = 1", + "update test set var46 = FILE_READ('classpath:h2-logo-2.png') where Var1 = 1", + "update test set var47 = FILE_READ('classpath:h2-logo-2.png') where Var1 = 1", + "update test set var48 = FILE_READ('classpath:h2-logo-2.png') where Var1 = 1", + "update test set var49 = FILE_READ('classpath:h2-logo-2.png') where Var1 = 1", + "update test set var50 = FILE_READ('classpath:h2-logo-2.png') where Var1 = 1", + "update test set var51 = FILE_READ('classpath:h2-logo-2.png') where Var1 = 1" ); - private static final Operation OPERATIONS = sequenceOf(DELETE_ALL, INSERT_TEST, SQL); - private static final DbSetup DB_SETUP = new DbSetup(new DriverManagerDestination("jdbc:h2:mem:testH2", "SA", ""), OPERATIONS); private static final DbSetupTracker DB_SETUP_TRACKER = new DbSetupTracker(); + protected final SourceWithLetterCase sourceDDD = new SourceWithLetterCase("jdbc:h2:mem:testH2", "sa", "", + LetterCase.TABLE_DEFAULT, + LetterCase.COLUMN_DEFAULT, + LetterCase.PRIMARY_KEY_DEFAULT); + protected final SourceWithLetterCase sourceUIUIUI = new SourceWithLetterCase("jdbc:h2:mem:testH2", "sa", "", + letterCaseUI, + letterCaseUI, + letterCaseUI); + protected final SourceWithLetterCase sourceNSNSNS = new SourceWithLetterCase("jdbc:h2:mem:testH2", "sa", "", + letterCaseNS, + letterCaseNS, + letterCaseNS); + protected DataSource dataSource; + protected DataSourceWithLetterCase dataSourceDDD; + protected DataSourceWithLetterCase dataSourceUIUIUI; + protected DataSourceWithLetterCase dataSourceNSNSNS; protected DbSetup getDbSetup() { return DB_SETUP; @@ -109,8 +106,8 @@ protected DbSetupTracker getDbSetupTracker() { protected void setDataSource(DataSource dataSource) { this.dataSource = dataSource; this.dataSourceDDD = new DataSourceWithLetterCase(dataSource, LetterCase.TABLE_DEFAULT, - LetterCase.COLUMN_DEFAULT, - LetterCase.PRIMARY_KEY_DEFAULT); + LetterCase.COLUMN_DEFAULT, + LetterCase.PRIMARY_KEY_DEFAULT); this.dataSourceUIUIUI = new DataSourceWithLetterCase(dataSource, letterCaseUI, letterCaseUI, letterCaseUI); this.dataSourceNSNSNS = new DataSourceWithLetterCase(dataSource, letterCaseNS, letterCaseNS, letterCaseNS); } diff --git a/src/test/java/org/assertj/db/database/h2/AbstractReservedH2Test.java b/src/test/java/org/assertj/db/database/h2/AbstractReservedH2Test.java index da465659..f3a5a31b 100644 --- a/src/test/java/org/assertj/db/database/h2/AbstractReservedH2Test.java +++ b/src/test/java/org/assertj/db/database/h2/AbstractReservedH2Test.java @@ -8,14 +8,16 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.database.h2; -import com.ninja_squad.dbsetup.DbSetup; -import com.ninja_squad.dbsetup.DbSetupTracker; -import com.ninja_squad.dbsetup.destination.DriverManagerDestination; -import com.ninja_squad.dbsetup.operation.Operation; +import static com.ninja_squad.dbsetup.Operations.deleteAllFrom; +import static com.ninja_squad.dbsetup.Operations.insertInto; +import static com.ninja_squad.dbsetup.Operations.sequenceOf; + +import javax.sql.DataSource; + import org.assertj.db.database.AbstractDatabaseTest; import org.assertj.db.type.DataSourceWithLetterCase; import org.assertj.db.type.SourceWithLetterCase; @@ -23,53 +25,47 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; -import javax.sql.DataSource; - -import static com.ninja_squad.dbsetup.Operations.*; +import com.ninja_squad.dbsetup.DbSetup; +import com.ninja_squad.dbsetup.DbSetupTracker; +import com.ninja_squad.dbsetup.destination.DriverManagerDestination; +import com.ninja_squad.dbsetup.operation.Operation; /** * Parent for all the tests which are specific for H2 database with reserved names in SQL structure. * * @author Régis Pouiller - * */ -@ContextConfiguration(classes = { ReservedH2Configuration.class }) +@ContextConfiguration(classes = {ReservedH2Configuration.class}) public abstract class AbstractReservedH2Test extends AbstractDatabaseTest { - protected DataSource dataSource; - protected DataSourceWithLetterCase dataSourceDDD; - protected DataSourceWithLetterCase dataSourceUIUIUI; - protected DataSourceWithLetterCase dataSourceNSNSNS; - - protected final SourceWithLetterCase sourceDDD = new SourceWithLetterCase("jdbc:h2:mem:testReservedH2", "sa", "", - LetterCase.TABLE_DEFAULT, - LetterCase.COLUMN_DEFAULT, - LetterCase.PRIMARY_KEY_DEFAULT); - protected final SourceWithLetterCase sourceUIUIUI = new SourceWithLetterCase("jdbc:h2:mem:testReservedH2", "sa", "", - letterCaseUI, - letterCaseUI, - letterCaseUI); - protected final SourceWithLetterCase sourceNSNSNS = new SourceWithLetterCase("jdbc:h2:mem:testReservedH2", "sa", "", - letterCaseNS, - letterCaseNS, - letterCaseNS); - private static final Operation DELETE_ALL = deleteAllFrom("`group`", "`Two Words`"); - private static final Operation INSERT_TEST = insertInto("`group`") - .columns("read", "by", "`select`", "`from`", "`where`", "`order`") - .values(1, 2, 3, 4, '5', '6').build(); - + .columns("read", "by", "`select`", "`from`", "`where`", "`order`") + .values(1, 2, 3, 4, '5', '6').build(); private static final Operation INSERT_TWO_WORDS = insertInto("`Two Words`") - .columns("`Primary Key`", "`Column Name`", "`Test%Test`") - .values(1, "Nom 1", "Test 1") - .values(2, "Nom 2", "Test 2").build(); - + .columns("`Primary Key`", "`Column Name`", "`Test%Test`") + .values(1, "Nom 1", "Test 1") + .values(2, "Nom 2", "Test 2").build(); private static final Operation OPERATIONS = sequenceOf(DELETE_ALL, INSERT_TEST, INSERT_TWO_WORDS); - private static final DbSetup DB_SETUP = new DbSetup(new DriverManagerDestination("jdbc:h2:mem:testReservedH2", "SA", ""), - OPERATIONS); + OPERATIONS); private static final DbSetupTracker DB_SETUP_TRACKER = new DbSetupTracker(); + protected final SourceWithLetterCase sourceDDD = new SourceWithLetterCase("jdbc:h2:mem:testReservedH2", "sa", "", + LetterCase.TABLE_DEFAULT, + LetterCase.COLUMN_DEFAULT, + LetterCase.PRIMARY_KEY_DEFAULT); + protected final SourceWithLetterCase sourceUIUIUI = new SourceWithLetterCase("jdbc:h2:mem:testReservedH2", "sa", "", + letterCaseUI, + letterCaseUI, + letterCaseUI); + protected final SourceWithLetterCase sourceNSNSNS = new SourceWithLetterCase("jdbc:h2:mem:testReservedH2", "sa", "", + letterCaseNS, + letterCaseNS, + letterCaseNS); + protected DataSource dataSource; + protected DataSourceWithLetterCase dataSourceDDD; + protected DataSourceWithLetterCase dataSourceUIUIUI; + protected DataSourceWithLetterCase dataSourceNSNSNS; protected DbSetup getDbSetup() { return DB_SETUP; @@ -83,8 +79,8 @@ protected DbSetupTracker getDbSetupTracker() { protected void setDataSource(DataSource dataSource) { this.dataSource = dataSource; this.dataSourceDDD = new DataSourceWithLetterCase(dataSource, LetterCase.TABLE_DEFAULT, - LetterCase.COLUMN_DEFAULT, - LetterCase.PRIMARY_KEY_DEFAULT); + LetterCase.COLUMN_DEFAULT, + LetterCase.PRIMARY_KEY_DEFAULT); this.dataSourceUIUIUI = new DataSourceWithLetterCase(dataSource, letterCaseUI, letterCaseUI, letterCaseUI); this.dataSourceNSNSNS = new DataSourceWithLetterCase(dataSource, letterCaseNS, letterCaseNS, letterCaseNS); } diff --git a/src/test/java/org/assertj/db/database/h2/H2Configuration.java b/src/test/java/org/assertj/db/database/h2/H2Configuration.java index 0c171f7f..32a3d964 100644 --- a/src/test/java/org/assertj/db/database/h2/H2Configuration.java +++ b/src/test/java/org/assertj/db/database/h2/H2Configuration.java @@ -8,10 +8,12 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.database.h2; +import javax.sql.DataSource; + import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.jdbc.datasource.DataSourceTransactionManager; @@ -19,13 +21,10 @@ import org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseType; import org.springframework.transaction.PlatformTransactionManager; -import javax.sql.DataSource; - /** * Provides the configuration for the tests. - * + * * @author Régis Pouiller - * */ @Configuration public class H2Configuration { @@ -33,7 +32,7 @@ public class H2Configuration { @Bean public DataSource dataSource() { return new EmbeddedDatabaseBuilder().setName("testH2").setType(EmbeddedDatabaseType.H2).addScript("schemaH2.sql") - .build(); + .build(); } @Bean diff --git a/src/test/java/org/assertj/db/database/h2/H2DataBase_Source_DDD_Test.java b/src/test/java/org/assertj/db/database/h2/H2DataBase_Source_DDD_Test.java index 92898f14..e4febd3e 100644 --- a/src/test/java/org/assertj/db/database/h2/H2DataBase_Source_DDD_Test.java +++ b/src/test/java/org/assertj/db/database/h2/H2DataBase_Source_DDD_Test.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.database.h2; @@ -78,111 +78,111 @@ public void test_Outputs_output() { ByteArrayOutputStream byteArrayOutputStream9 = new ByteArrayOutputStream(); ByteArrayOutputStream byteArrayOutputStream10 = new ByteArrayOutputStream(); Outputs.output(table).toStream(byteArrayOutputStream0) - .column().toStream(byteArrayOutputStream1) - .value().toStream(byteArrayOutputStream2) - .row().toStream(byteArrayOutputStream3) - .value().toStream(byteArrayOutputStream4) + .column().toStream(byteArrayOutputStream1) + .value().toStream(byteArrayOutputStream2) + .row().toStream(byteArrayOutputStream3) + .value().toStream(byteArrayOutputStream4) ; output(changes).toStream(byteArrayOutputStream5) - .change().toStream(byteArrayOutputStream6) - .rowAtEndPoint().toStream(byteArrayOutputStream7) - .value().toStream(byteArrayOutputStream8) - .column().toStream(byteArrayOutputStream9) - .valueAtEndPoint().toStream(byteArrayOutputStream10); + .change().toStream(byteArrayOutputStream6) + .rowAtEndPoint().toStream(byteArrayOutputStream7) + .value().toStream(byteArrayOutputStream8) + .column().toStream(byteArrayOutputStream9) + .valueAtEndPoint().toStream(byteArrayOutputStream10); Assertions.assertThat(byteArrayOutputStream0.toString()).isEqualTo(String.format("[TEST table]%n" - + "|-----------|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" - + "| | | * | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |%n" - + "| | PRIMARY | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 | VAR20 | VAR21 | VAR22 | VAR23 | VAR24 | VAR25 | VAR26 | VAR27 | VAR28 | VAR29 | VAR30 | VAR31 | VAR32 | VAR33 | VAR34 | VAR35 | VAR36 | VAR37 | VAR38 | VAR39 | VAR40 | VAR41 | VAR42 | VAR43 | VAR44 | VAR45 | VAR46 | VAR47 | VAR48 | VAR49 | VAR50 | VAR51 | VAR52 | VAR53 | VAR54 | VAR55 | VAR56 | VAR57 | VAR58 | VAR59 | VAR60 | VAR61 |%n" - + "| | KEY | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (BOOLEAN) | (BOOLEAN) | (BOOLEAN) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TIME) | (DATE) | (DATE_TIME) | (DATE_TIME) | (DATE_TIME) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (NOT_IDENTIFIED : class java.util.Locale) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (UUID) | (NOT_IDENTIFIED) | (NOT_IDENTIFIED) |%n" - + "| | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 | Index : 19 | Index : 20 | Index : 21 | Index : 22 | Index : 23 | Index : 24 | Index : 25 | Index : 26 | Index : 27 | Index : 28 | Index : 29 | Index : 30 | Index : 31 | Index : 32 | Index : 33 | Index : 34 | Index : 35 | Index : 36 | Index : 37 | Index : 38 | Index : 39 | Index : 40 | Index : 41 | Index : 42 | Index : 43 | Index : 44 | Index : 45 | Index : 46 | Index : 47 | Index : 48 | Index : 49 | Index : 50 | Index : 51 | Index : 52 | Index : 53 | Index : 54 | Index : 55 | Index : 56 | Index : 57 | Index : 58 | Index : 59 | Index : 60 |%n" - + "|-----------|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" - + "| Index : 0 | 1 | 1 | 20 | 3 | 4 | 5 | 6 | true | false | true | 7 | 8 | 9 | 10 | 11 | 12 | 13.13 | 14.14 | 15.15 | 16.16 | 17.17 | 18.18 | 19.19 | 20.2 | 21.21 | 09:01:00.000000000 | 2007-12-23 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | ... | ... | ... | ... | ... | fr | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | ... | ... | ... | ... | ... | ... | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 30b443ae-c0c9-4790-9bec-ce1380808435 | null | null |%n" - + "|-----------|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n")); + + "|-----------|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" + + "| | | * | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |%n" + + "| | PRIMARY | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 | VAR20 | VAR21 | VAR22 | VAR23 | VAR24 | VAR25 | VAR26 | VAR27 | VAR28 | VAR29 | VAR30 | VAR31 | VAR32 | VAR33 | VAR34 | VAR35 | VAR36 | VAR37 | VAR38 | VAR39 | VAR40 | VAR41 | VAR42 | VAR43 | VAR44 | VAR45 | VAR46 | VAR47 | VAR48 | VAR49 | VAR50 | VAR51 | VAR52 | VAR53 | VAR54 | VAR55 | VAR56 | VAR57 | VAR58 | VAR59 | VAR60 | VAR61 |%n" + + "| | KEY | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (BOOLEAN) | (BOOLEAN) | (BOOLEAN) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TIME) | (DATE) | (DATE_TIME) | (DATE_TIME) | (DATE_TIME) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (NOT_IDENTIFIED : class java.util.Locale) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (UUID) | (NOT_IDENTIFIED) | (NOT_IDENTIFIED) |%n" + + "| | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 | Index : 19 | Index : 20 | Index : 21 | Index : 22 | Index : 23 | Index : 24 | Index : 25 | Index : 26 | Index : 27 | Index : 28 | Index : 29 | Index : 30 | Index : 31 | Index : 32 | Index : 33 | Index : 34 | Index : 35 | Index : 36 | Index : 37 | Index : 38 | Index : 39 | Index : 40 | Index : 41 | Index : 42 | Index : 43 | Index : 44 | Index : 45 | Index : 46 | Index : 47 | Index : 48 | Index : 49 | Index : 50 | Index : 51 | Index : 52 | Index : 53 | Index : 54 | Index : 55 | Index : 56 | Index : 57 | Index : 58 | Index : 59 | Index : 60 |%n" + + "|-----------|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" + + "| Index : 0 | 1 | 1 | 20 | 3 | 4 | 5 | 6 | true | false | true | 7 | 8 | 9 | 10 | 11 | 12 | 13.13 | 14.14 | 15.15 | 16.16 | 17.17 | 18.18 | 19.19 | 20.2 | 21.21 | 09:01:00.000000000 | 2007-12-23 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | ... | ... | ... | ... | ... | fr | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | ... | ... | ... | ... | ... | ... | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 30b443ae-c0c9-4790-9bec-ce1380808435 | null | null |%n" + + "|-----------|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n")); Assertions.assertThat(byteArrayOutputStream1.toString()).isEqualTo(String.format("[Column at index 0 (column name : VAR1) of TEST table]%n" - + "|-----------|----------|%n" - + "| | VAR1 |%n" - + "| | (NUMBER) |%n" - + "|-----------|----------|%n" - + "| Index : 0 | 1 |%n" - + "|-----------|----------|%n")); + + "|-----------|----------|%n" + + "| | VAR1 |%n" + + "| | (NUMBER) |%n" + + "|-----------|----------|%n" + + "| Index : 0 | 1 |%n" + + "|-----------|----------|%n")); Assertions.assertThat(byteArrayOutputStream2.toString()).isEqualTo(String.format("[Value at index 0 of Column at index 0 (column name : VAR1) of TEST table]%n" - + "|----------|%n" - + "| VAR1 |%n" - + "| (NUMBER) |%n" - + "|----------|%n" - + "| 1 |%n" - + "|----------|%n")); + + "|----------|%n" + + "| VAR1 |%n" + + "| (NUMBER) |%n" + + "|----------|%n" + + "| 1 |%n" + + "|----------|%n")); Assertions.assertThat(byteArrayOutputStream3.toString()).isEqualTo(String.format("[Row at index 0 of TEST table]%n" - + "|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" - + "| | * | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |%n" - + "| PRIMARY | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 | VAR20 | VAR21 | VAR22 | VAR23 | VAR24 | VAR25 | VAR26 | VAR27 | VAR28 | VAR29 | VAR30 | VAR31 | VAR32 | VAR33 | VAR34 | VAR35 | VAR36 | VAR37 | VAR38 | VAR39 | VAR40 | VAR41 | VAR42 | VAR43 | VAR44 | VAR45 | VAR46 | VAR47 | VAR48 | VAR49 | VAR50 | VAR51 | VAR52 | VAR53 | VAR54 | VAR55 | VAR56 | VAR57 | VAR58 | VAR59 | VAR60 | VAR61 |%n" - + "| KEY | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (BOOLEAN) | (BOOLEAN) | (BOOLEAN) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TIME) | (DATE) | (DATE_TIME) | (DATE_TIME) | (DATE_TIME) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (NOT_IDENTIFIED : class java.util.Locale) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (UUID) | (NOT_IDENTIFIED) | (NOT_IDENTIFIED) |%n" - + "| | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 | Index : 19 | Index : 20 | Index : 21 | Index : 22 | Index : 23 | Index : 24 | Index : 25 | Index : 26 | Index : 27 | Index : 28 | Index : 29 | Index : 30 | Index : 31 | Index : 32 | Index : 33 | Index : 34 | Index : 35 | Index : 36 | Index : 37 | Index : 38 | Index : 39 | Index : 40 | Index : 41 | Index : 42 | Index : 43 | Index : 44 | Index : 45 | Index : 46 | Index : 47 | Index : 48 | Index : 49 | Index : 50 | Index : 51 | Index : 52 | Index : 53 | Index : 54 | Index : 55 | Index : 56 | Index : 57 | Index : 58 | Index : 59 | Index : 60 |%n" - + "|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" - + "| 1 | 1 | 20 | 3 | 4 | 5 | 6 | true | false | true | 7 | 8 | 9 | 10 | 11 | 12 | 13.13 | 14.14 | 15.15 | 16.16 | 17.17 | 18.18 | 19.19 | 20.2 | 21.21 | 09:01:00.000000000 | 2007-12-23 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | ... | ... | ... | ... | ... | fr | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | ... | ... | ... | ... | ... | ... | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 30b443ae-c0c9-4790-9bec-ce1380808435 | null | null |%n" - + "|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n")); + + "|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" + + "| | * | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |%n" + + "| PRIMARY | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 | VAR20 | VAR21 | VAR22 | VAR23 | VAR24 | VAR25 | VAR26 | VAR27 | VAR28 | VAR29 | VAR30 | VAR31 | VAR32 | VAR33 | VAR34 | VAR35 | VAR36 | VAR37 | VAR38 | VAR39 | VAR40 | VAR41 | VAR42 | VAR43 | VAR44 | VAR45 | VAR46 | VAR47 | VAR48 | VAR49 | VAR50 | VAR51 | VAR52 | VAR53 | VAR54 | VAR55 | VAR56 | VAR57 | VAR58 | VAR59 | VAR60 | VAR61 |%n" + + "| KEY | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (BOOLEAN) | (BOOLEAN) | (BOOLEAN) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TIME) | (DATE) | (DATE_TIME) | (DATE_TIME) | (DATE_TIME) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (NOT_IDENTIFIED : class java.util.Locale) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (UUID) | (NOT_IDENTIFIED) | (NOT_IDENTIFIED) |%n" + + "| | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 | Index : 19 | Index : 20 | Index : 21 | Index : 22 | Index : 23 | Index : 24 | Index : 25 | Index : 26 | Index : 27 | Index : 28 | Index : 29 | Index : 30 | Index : 31 | Index : 32 | Index : 33 | Index : 34 | Index : 35 | Index : 36 | Index : 37 | Index : 38 | Index : 39 | Index : 40 | Index : 41 | Index : 42 | Index : 43 | Index : 44 | Index : 45 | Index : 46 | Index : 47 | Index : 48 | Index : 49 | Index : 50 | Index : 51 | Index : 52 | Index : 53 | Index : 54 | Index : 55 | Index : 56 | Index : 57 | Index : 58 | Index : 59 | Index : 60 |%n" + + "|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" + + "| 1 | 1 | 20 | 3 | 4 | 5 | 6 | true | false | true | 7 | 8 | 9 | 10 | 11 | 12 | 13.13 | 14.14 | 15.15 | 16.16 | 17.17 | 18.18 | 19.19 | 20.2 | 21.21 | 09:01:00.000000000 | 2007-12-23 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | ... | ... | ... | ... | ... | fr | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | ... | ... | ... | ... | ... | ... | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 30b443ae-c0c9-4790-9bec-ce1380808435 | null | null |%n" + + "|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n")); Assertions.assertThat(byteArrayOutputStream4.toString()).isEqualTo(String.format("[Value at index 0 (column name : VAR1) of Row at index 0 of TEST table]%n" - + "|----------|%n" - + "| VAR1 |%n" - + "| (NUMBER) |%n" - + "|----------|%n" - + "| 1 |%n" - + "|----------|%n")); + + "|----------|%n" + + "| VAR1 |%n" + + "| (NUMBER) |%n" + + "|----------|%n" + + "| 1 |%n" + + "|----------|%n")); Assertions.assertThat(byteArrayOutputStream5.toString()).isEqualTo(String.format("[Changes on TEST table of 'sa/jdbc:h2:mem:testH2' source]%n" - + "|-----------|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" - + "| | | | | | * | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |%n" - + "| | TYPE | TABLE | PRIMARY | | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 | VAR20 | VAR21 | VAR22 | VAR23 | VAR24 | VAR25 | VAR26 | VAR27 | VAR28 | VAR29 | VAR30 | VAR31 | VAR32 | VAR33 | VAR34 | VAR35 | VAR36 | VAR37 | VAR38 | VAR39 | VAR40 | VAR41 | VAR42 | VAR43 | VAR44 | VAR45 | VAR46 | VAR47 | VAR48 | VAR49 | VAR50 | VAR51 | VAR52 | VAR53 | VAR54 | VAR55 | VAR56 | VAR57 | VAR58 | VAR59 | VAR60 | VAR61 |%n" - + "| | | | KEY | | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (BOOLEAN) | (BOOLEAN) | (BOOLEAN) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TIME) | (DATE) | (DATE_TIME) | (DATE_TIME) | (DATE_TIME) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (NOT_IDENTIFIED : class java.util.Locale) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (UUID) | (NOT_IDENTIFIED) | (NOT_IDENTIFIED) |%n" - + "| | | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 | Index : 19 | Index : 20 | Index : 21 | Index : 22 | Index : 23 | Index : 24 | Index : 25 | Index : 26 | Index : 27 | Index : 28 | Index : 29 | Index : 30 | Index : 31 | Index : 32 | Index : 33 | Index : 34 | Index : 35 | Index : 36 | Index : 37 | Index : 38 | Index : 39 | Index : 40 | Index : 41 | Index : 42 | Index : 43 | Index : 44 | Index : 45 | Index : 46 | Index : 47 | Index : 48 | Index : 49 | Index : 50 | Index : 51 | Index : 52 | Index : 53 | Index : 54 | Index : 55 | Index : 56 | Index : 57 | Index : 58 | Index : 59 | Index : 60 |%n" - + "|-----------|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" - + "| | | | | At start point | 1 | 2 | 3 | 4 | 5 | 6 | true | false | true | 7 | 8 | 9 | 10 | 11 | 12 | 13.13 | 14.14 | 15.15 | 16.16 | 17.17 | 18.18 | 19.19 | 20.2 | 21.21 | 09:01:00.000000000 | 2007-12-23 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | ... | ... | ... | ... | ... | fr | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | ... | ... | ... | ... | ... | ... | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 30b443ae-c0c9-4790-9bec-ce1380808435 | null | null |%n" - + "| Index : 0 | MODIFICATION | TEST | 1 |----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" - + "| | | | | At end point | 1 | 20 | 3 | 4 | 5 | 6 | true | false | true | 7 | 8 | 9 | 10 | 11 | 12 | 13.13 | 14.14 | 15.15 | 16.16 | 17.17 | 18.18 | 19.19 | 20.2 | 21.21 | 09:01:00.000000000 | 2007-12-23 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | ... | ... | ... | ... | ... | fr | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | ... | ... | ... | ... | ... | ... | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 30b443ae-c0c9-4790-9bec-ce1380808435 | null | null |%n" - + "|-----------|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n")); + + "|-----------|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" + + "| | | | | | * | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |%n" + + "| | TYPE | TABLE | PRIMARY | | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 | VAR20 | VAR21 | VAR22 | VAR23 | VAR24 | VAR25 | VAR26 | VAR27 | VAR28 | VAR29 | VAR30 | VAR31 | VAR32 | VAR33 | VAR34 | VAR35 | VAR36 | VAR37 | VAR38 | VAR39 | VAR40 | VAR41 | VAR42 | VAR43 | VAR44 | VAR45 | VAR46 | VAR47 | VAR48 | VAR49 | VAR50 | VAR51 | VAR52 | VAR53 | VAR54 | VAR55 | VAR56 | VAR57 | VAR58 | VAR59 | VAR60 | VAR61 |%n" + + "| | | | KEY | | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (BOOLEAN) | (BOOLEAN) | (BOOLEAN) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TIME) | (DATE) | (DATE_TIME) | (DATE_TIME) | (DATE_TIME) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (NOT_IDENTIFIED : class java.util.Locale) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (UUID) | (NOT_IDENTIFIED) | (NOT_IDENTIFIED) |%n" + + "| | | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 | Index : 19 | Index : 20 | Index : 21 | Index : 22 | Index : 23 | Index : 24 | Index : 25 | Index : 26 | Index : 27 | Index : 28 | Index : 29 | Index : 30 | Index : 31 | Index : 32 | Index : 33 | Index : 34 | Index : 35 | Index : 36 | Index : 37 | Index : 38 | Index : 39 | Index : 40 | Index : 41 | Index : 42 | Index : 43 | Index : 44 | Index : 45 | Index : 46 | Index : 47 | Index : 48 | Index : 49 | Index : 50 | Index : 51 | Index : 52 | Index : 53 | Index : 54 | Index : 55 | Index : 56 | Index : 57 | Index : 58 | Index : 59 | Index : 60 |%n" + + "|-----------|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" + + "| | | | | At start point | 1 | 2 | 3 | 4 | 5 | 6 | true | false | true | 7 | 8 | 9 | 10 | 11 | 12 | 13.13 | 14.14 | 15.15 | 16.16 | 17.17 | 18.18 | 19.19 | 20.2 | 21.21 | 09:01:00.000000000 | 2007-12-23 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | ... | ... | ... | ... | ... | fr | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | ... | ... | ... | ... | ... | ... | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 30b443ae-c0c9-4790-9bec-ce1380808435 | null | null |%n" + + "| Index : 0 | MODIFICATION | TEST | 1 |----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" + + "| | | | | At end point | 1 | 20 | 3 | 4 | 5 | 6 | true | false | true | 7 | 8 | 9 | 10 | 11 | 12 | 13.13 | 14.14 | 15.15 | 16.16 | 17.17 | 18.18 | 19.19 | 20.2 | 21.21 | 09:01:00.000000000 | 2007-12-23 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | ... | ... | ... | ... | ... | fr | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | ... | ... | ... | ... | ... | ... | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 30b443ae-c0c9-4790-9bec-ce1380808435 | null | null |%n" + + "|-----------|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n")); Assertions.assertThat(byteArrayOutputStream6.toString()).isEqualTo(String.format("[Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:testH2' source]%n" - + "|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" - + "| | | | | * | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |%n" - + "| TYPE | TABLE | PRIMARY | | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 | VAR20 | VAR21 | VAR22 | VAR23 | VAR24 | VAR25 | VAR26 | VAR27 | VAR28 | VAR29 | VAR30 | VAR31 | VAR32 | VAR33 | VAR34 | VAR35 | VAR36 | VAR37 | VAR38 | VAR39 | VAR40 | VAR41 | VAR42 | VAR43 | VAR44 | VAR45 | VAR46 | VAR47 | VAR48 | VAR49 | VAR50 | VAR51 | VAR52 | VAR53 | VAR54 | VAR55 | VAR56 | VAR57 | VAR58 | VAR59 | VAR60 | VAR61 |%n" - + "| | | KEY | | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (BOOLEAN) | (BOOLEAN) | (BOOLEAN) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TIME) | (DATE) | (DATE_TIME) | (DATE_TIME) | (DATE_TIME) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (NOT_IDENTIFIED : class java.util.Locale) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (UUID) | (NOT_IDENTIFIED) | (NOT_IDENTIFIED) |%n" - + "| | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 | Index : 19 | Index : 20 | Index : 21 | Index : 22 | Index : 23 | Index : 24 | Index : 25 | Index : 26 | Index : 27 | Index : 28 | Index : 29 | Index : 30 | Index : 31 | Index : 32 | Index : 33 | Index : 34 | Index : 35 | Index : 36 | Index : 37 | Index : 38 | Index : 39 | Index : 40 | Index : 41 | Index : 42 | Index : 43 | Index : 44 | Index : 45 | Index : 46 | Index : 47 | Index : 48 | Index : 49 | Index : 50 | Index : 51 | Index : 52 | Index : 53 | Index : 54 | Index : 55 | Index : 56 | Index : 57 | Index : 58 | Index : 59 | Index : 60 |%n" - + "|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" - + "| | | | At start point | 1 | 2 | 3 | 4 | 5 | 6 | true | false | true | 7 | 8 | 9 | 10 | 11 | 12 | 13.13 | 14.14 | 15.15 | 16.16 | 17.17 | 18.18 | 19.19 | 20.2 | 21.21 | 09:01:00.000000000 | 2007-12-23 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | ... | ... | ... | ... | ... | fr | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | ... | ... | ... | ... | ... | ... | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 30b443ae-c0c9-4790-9bec-ce1380808435 | null | null |%n" - + "| MODIFICATION | TEST | 1 |----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" - + "| | | | At end point | 1 | 20 | 3 | 4 | 5 | 6 | true | false | true | 7 | 8 | 9 | 10 | 11 | 12 | 13.13 | 14.14 | 15.15 | 16.16 | 17.17 | 18.18 | 19.19 | 20.2 | 21.21 | 09:01:00.000000000 | 2007-12-23 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | ... | ... | ... | ... | ... | fr | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | ... | ... | ... | ... | ... | ... | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 30b443ae-c0c9-4790-9bec-ce1380808435 | null | null |%n" - + "|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n")); + + "|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" + + "| | | | | * | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |%n" + + "| TYPE | TABLE | PRIMARY | | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 | VAR20 | VAR21 | VAR22 | VAR23 | VAR24 | VAR25 | VAR26 | VAR27 | VAR28 | VAR29 | VAR30 | VAR31 | VAR32 | VAR33 | VAR34 | VAR35 | VAR36 | VAR37 | VAR38 | VAR39 | VAR40 | VAR41 | VAR42 | VAR43 | VAR44 | VAR45 | VAR46 | VAR47 | VAR48 | VAR49 | VAR50 | VAR51 | VAR52 | VAR53 | VAR54 | VAR55 | VAR56 | VAR57 | VAR58 | VAR59 | VAR60 | VAR61 |%n" + + "| | | KEY | | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (BOOLEAN) | (BOOLEAN) | (BOOLEAN) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TIME) | (DATE) | (DATE_TIME) | (DATE_TIME) | (DATE_TIME) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (NOT_IDENTIFIED : class java.util.Locale) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (UUID) | (NOT_IDENTIFIED) | (NOT_IDENTIFIED) |%n" + + "| | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 | Index : 19 | Index : 20 | Index : 21 | Index : 22 | Index : 23 | Index : 24 | Index : 25 | Index : 26 | Index : 27 | Index : 28 | Index : 29 | Index : 30 | Index : 31 | Index : 32 | Index : 33 | Index : 34 | Index : 35 | Index : 36 | Index : 37 | Index : 38 | Index : 39 | Index : 40 | Index : 41 | Index : 42 | Index : 43 | Index : 44 | Index : 45 | Index : 46 | Index : 47 | Index : 48 | Index : 49 | Index : 50 | Index : 51 | Index : 52 | Index : 53 | Index : 54 | Index : 55 | Index : 56 | Index : 57 | Index : 58 | Index : 59 | Index : 60 |%n" + + "|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" + + "| | | | At start point | 1 | 2 | 3 | 4 | 5 | 6 | true | false | true | 7 | 8 | 9 | 10 | 11 | 12 | 13.13 | 14.14 | 15.15 | 16.16 | 17.17 | 18.18 | 19.19 | 20.2 | 21.21 | 09:01:00.000000000 | 2007-12-23 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | ... | ... | ... | ... | ... | fr | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | ... | ... | ... | ... | ... | ... | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 30b443ae-c0c9-4790-9bec-ce1380808435 | null | null |%n" + + "| MODIFICATION | TEST | 1 |----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" + + "| | | | At end point | 1 | 20 | 3 | 4 | 5 | 6 | true | false | true | 7 | 8 | 9 | 10 | 11 | 12 | 13.13 | 14.14 | 15.15 | 16.16 | 17.17 | 18.18 | 19.19 | 20.2 | 21.21 | 09:01:00.000000000 | 2007-12-23 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | ... | ... | ... | ... | ... | fr | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | ... | ... | ... | ... | ... | ... | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 30b443ae-c0c9-4790-9bec-ce1380808435 | null | null |%n" + + "|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n")); Assertions.assertThat(byteArrayOutputStream7.toString()).isEqualTo(String.format("[Row at end point of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:testH2' source]%n" - + "|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" - + "| | * | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |%n" - + "| PRIMARY | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 | VAR20 | VAR21 | VAR22 | VAR23 | VAR24 | VAR25 | VAR26 | VAR27 | VAR28 | VAR29 | VAR30 | VAR31 | VAR32 | VAR33 | VAR34 | VAR35 | VAR36 | VAR37 | VAR38 | VAR39 | VAR40 | VAR41 | VAR42 | VAR43 | VAR44 | VAR45 | VAR46 | VAR47 | VAR48 | VAR49 | VAR50 | VAR51 | VAR52 | VAR53 | VAR54 | VAR55 | VAR56 | VAR57 | VAR58 | VAR59 | VAR60 | VAR61 |%n" - + "| KEY | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (BOOLEAN) | (BOOLEAN) | (BOOLEAN) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TIME) | (DATE) | (DATE_TIME) | (DATE_TIME) | (DATE_TIME) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (NOT_IDENTIFIED : class java.util.Locale) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (UUID) | (NOT_IDENTIFIED) | (NOT_IDENTIFIED) |%n" - + "| | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 | Index : 19 | Index : 20 | Index : 21 | Index : 22 | Index : 23 | Index : 24 | Index : 25 | Index : 26 | Index : 27 | Index : 28 | Index : 29 | Index : 30 | Index : 31 | Index : 32 | Index : 33 | Index : 34 | Index : 35 | Index : 36 | Index : 37 | Index : 38 | Index : 39 | Index : 40 | Index : 41 | Index : 42 | Index : 43 | Index : 44 | Index : 45 | Index : 46 | Index : 47 | Index : 48 | Index : 49 | Index : 50 | Index : 51 | Index : 52 | Index : 53 | Index : 54 | Index : 55 | Index : 56 | Index : 57 | Index : 58 | Index : 59 | Index : 60 |%n" - + "|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" - + "| 1 | 1 | 20 | 3 | 4 | 5 | 6 | true | false | true | 7 | 8 | 9 | 10 | 11 | 12 | 13.13 | 14.14 | 15.15 | 16.16 | 17.17 | 18.18 | 19.19 | 20.2 | 21.21 | 09:01:00.000000000 | 2007-12-23 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | ... | ... | ... | ... | ... | fr | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | ... | ... | ... | ... | ... | ... | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 30b443ae-c0c9-4790-9bec-ce1380808435 | null | null |%n" - + "|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n")); + + "|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" + + "| | * | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |%n" + + "| PRIMARY | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 | VAR20 | VAR21 | VAR22 | VAR23 | VAR24 | VAR25 | VAR26 | VAR27 | VAR28 | VAR29 | VAR30 | VAR31 | VAR32 | VAR33 | VAR34 | VAR35 | VAR36 | VAR37 | VAR38 | VAR39 | VAR40 | VAR41 | VAR42 | VAR43 | VAR44 | VAR45 | VAR46 | VAR47 | VAR48 | VAR49 | VAR50 | VAR51 | VAR52 | VAR53 | VAR54 | VAR55 | VAR56 | VAR57 | VAR58 | VAR59 | VAR60 | VAR61 |%n" + + "| KEY | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (BOOLEAN) | (BOOLEAN) | (BOOLEAN) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TIME) | (DATE) | (DATE_TIME) | (DATE_TIME) | (DATE_TIME) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (NOT_IDENTIFIED : class java.util.Locale) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (UUID) | (NOT_IDENTIFIED) | (NOT_IDENTIFIED) |%n" + + "| | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 | Index : 19 | Index : 20 | Index : 21 | Index : 22 | Index : 23 | Index : 24 | Index : 25 | Index : 26 | Index : 27 | Index : 28 | Index : 29 | Index : 30 | Index : 31 | Index : 32 | Index : 33 | Index : 34 | Index : 35 | Index : 36 | Index : 37 | Index : 38 | Index : 39 | Index : 40 | Index : 41 | Index : 42 | Index : 43 | Index : 44 | Index : 45 | Index : 46 | Index : 47 | Index : 48 | Index : 49 | Index : 50 | Index : 51 | Index : 52 | Index : 53 | Index : 54 | Index : 55 | Index : 56 | Index : 57 | Index : 58 | Index : 59 | Index : 60 |%n" + + "|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" + + "| 1 | 1 | 20 | 3 | 4 | 5 | 6 | true | false | true | 7 | 8 | 9 | 10 | 11 | 12 | 13.13 | 14.14 | 15.15 | 16.16 | 17.17 | 18.18 | 19.19 | 20.2 | 21.21 | 09:01:00.000000000 | 2007-12-23 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | ... | ... | ... | ... | ... | fr | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | ... | ... | ... | ... | ... | ... | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 30b443ae-c0c9-4790-9bec-ce1380808435 | null | null |%n" + + "|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n")); Assertions.assertThat(byteArrayOutputStream8.toString()).isEqualTo(String.format("[Value at index 0 (column name : VAR1) of Row at end point of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:testH2' source]%n" - + "|----------|%n" - + "| VAR1 |%n" - + "| (NUMBER) |%n" - + "|----------|%n" - + "| 1 |%n" - + "|----------|%n")); + + "|----------|%n" + + "| VAR1 |%n" + + "| (NUMBER) |%n" + + "|----------|%n" + + "| 1 |%n" + + "|----------|%n")); Assertions.assertThat(byteArrayOutputStream9.toString()).isEqualTo(String.format("[Column at index 0 (column name : VAR1) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:testH2' source]%n" - + "|----------------|----------|%n" - + "| | VAR1 |%n" - + "| | (NUMBER) |%n" - + "|----------------|----------|%n" - + "| At start point | 1 |%n" - + "|----------------|----------|%n" - + "| At end point | 1 |%n" - + "|----------------|----------|%n")); + + "|----------------|----------|%n" + + "| | VAR1 |%n" + + "| | (NUMBER) |%n" + + "|----------------|----------|%n" + + "| At start point | 1 |%n" + + "|----------------|----------|%n" + + "| At end point | 1 |%n" + + "|----------------|----------|%n")); Assertions.assertThat(byteArrayOutputStream10.toString()).isEqualTo(String.format("[Value at end point of Column at index 0 (column name : VAR1) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:testH2' source]%n" - + "|----------|%n" - + "| VAR1 |%n" - + "| (NUMBER) |%n" - + "|----------|%n" - + "| 1 |%n" - + "|----------|%n")); + + "|----------|%n" + + "| VAR1 |%n" + + "| (NUMBER) |%n" + + "|----------|%n" + + "| 1 |%n" + + "|----------|%n")); } @Test @@ -206,131 +206,131 @@ public void test_ColumnName_hasColumnName() { changes.setEndPointNow(); assertThat(table) - .column().hasColumnName("var1") - .column().hasColumnName("var2") - .column().hasColumnName("var3") - .column().hasColumnName("var4") - .column().hasColumnName("var5") - .column().hasColumnName("var6") - .column().hasColumnName("var7") - .column().hasColumnName("var8") - .column().hasColumnName("var9") - .column().hasColumnName("var10") - .column().hasColumnName("var11") - .column().hasColumnName("var12") - .column().hasColumnName("var13") - .column().hasColumnName("var14") - .column().hasColumnName("var15") - .column().hasColumnName("var16") - .column().hasColumnName("var17") - .column().hasColumnName("var18") - .column().hasColumnName("var19") - .column().hasColumnName("var20") - .column().hasColumnName("var21") - .column().hasColumnName("var22") - .column().hasColumnName("var23") - .column().hasColumnName("var24") - .column().hasColumnName("var25") - .column().hasColumnName("var26") - .column().hasColumnName("var27") - .column().hasColumnName("var28") - .column().hasColumnName("var29") - .column().hasColumnName("var30") - .column().hasColumnName("var31") - .column().hasColumnName("var32") - .column().hasColumnName("var33") - .column().hasColumnName("var34") - .column().hasColumnName("var35") - .column().hasColumnName("var36") - .column().hasColumnName("var37") - .column().hasColumnName("var38") - .column().hasColumnName("var39") - .column().hasColumnName("var40") - .column().hasColumnName("var41") - .column().hasColumnName("var42") - .column().hasColumnName("var43") - .column().hasColumnName("var44") - .column().hasColumnName("var45") - .column().hasColumnName("var46") - .column().hasColumnName("var47") - .column().hasColumnName("var48") - .column().hasColumnName("var49") - .column().hasColumnName("var50") - .column().hasColumnName("var51") - .column().hasColumnName("var52") - .column().hasColumnName("var53") - .column().hasColumnName("var54") - .column().hasColumnName("var55") - .column().hasColumnName("var56") - .column().hasColumnName("var57") - .column().hasColumnName("var58") - .column().hasColumnName("var59") - .column().hasColumnName("var60") - .column().hasColumnName("var61") + .column().hasColumnName("var1") + .column().hasColumnName("var2") + .column().hasColumnName("var3") + .column().hasColumnName("var4") + .column().hasColumnName("var5") + .column().hasColumnName("var6") + .column().hasColumnName("var7") + .column().hasColumnName("var8") + .column().hasColumnName("var9") + .column().hasColumnName("var10") + .column().hasColumnName("var11") + .column().hasColumnName("var12") + .column().hasColumnName("var13") + .column().hasColumnName("var14") + .column().hasColumnName("var15") + .column().hasColumnName("var16") + .column().hasColumnName("var17") + .column().hasColumnName("var18") + .column().hasColumnName("var19") + .column().hasColumnName("var20") + .column().hasColumnName("var21") + .column().hasColumnName("var22") + .column().hasColumnName("var23") + .column().hasColumnName("var24") + .column().hasColumnName("var25") + .column().hasColumnName("var26") + .column().hasColumnName("var27") + .column().hasColumnName("var28") + .column().hasColumnName("var29") + .column().hasColumnName("var30") + .column().hasColumnName("var31") + .column().hasColumnName("var32") + .column().hasColumnName("var33") + .column().hasColumnName("var34") + .column().hasColumnName("var35") + .column().hasColumnName("var36") + .column().hasColumnName("var37") + .column().hasColumnName("var38") + .column().hasColumnName("var39") + .column().hasColumnName("var40") + .column().hasColumnName("var41") + .column().hasColumnName("var42") + .column().hasColumnName("var43") + .column().hasColumnName("var44") + .column().hasColumnName("var45") + .column().hasColumnName("var46") + .column().hasColumnName("var47") + .column().hasColumnName("var48") + .column().hasColumnName("var49") + .column().hasColumnName("var50") + .column().hasColumnName("var51") + .column().hasColumnName("var52") + .column().hasColumnName("var53") + .column().hasColumnName("var54") + .column().hasColumnName("var55") + .column().hasColumnName("var56") + .column().hasColumnName("var57") + .column().hasColumnName("var58") + .column().hasColumnName("var59") + .column().hasColumnName("var60") + .column().hasColumnName("var61") ; assertThat(changes).change() - .column().hasColumnName("var1") - .column().hasColumnName("var2") - .column().hasColumnName("var3") - .column().hasColumnName("var4") - .column().hasColumnName("var5") - .column().hasColumnName("var6") - .column().hasColumnName("var7") - .column().hasColumnName("var8") - .column().hasColumnName("var9") - .column().hasColumnName("var10") - .column().hasColumnName("var11") - .column().hasColumnName("var12") - .column().hasColumnName("var13") - .column().hasColumnName("var14") - .column().hasColumnName("var15") - .column().hasColumnName("var16") - .column().hasColumnName("var17") - .column().hasColumnName("var18") - .column().hasColumnName("var19") - .column().hasColumnName("var20") - .column().hasColumnName("var21") - .column().hasColumnName("var22") - .column().hasColumnName("var23") - .column().hasColumnName("var24") - .column().hasColumnName("var25") - .column().hasColumnName("var26") - .column().hasColumnName("var27") - .column().hasColumnName("var28") - .column().hasColumnName("var29") - .column().hasColumnName("var30") - .column().hasColumnName("var31") - .column().hasColumnName("var32") - .column().hasColumnName("var33") - .column().hasColumnName("var34") - .column().hasColumnName("var35") - .column().hasColumnName("var36") - .column().hasColumnName("var37") - .column().hasColumnName("var38") - .column().hasColumnName("var39") - .column().hasColumnName("var40") - .column().hasColumnName("var41") - .column().hasColumnName("var42") - .column().hasColumnName("var43") - .column().hasColumnName("var44") - .column().hasColumnName("var45") - .column().hasColumnName("var46") - .column().hasColumnName("var47") - .column().hasColumnName("var48") - .column().hasColumnName("var49") - .column().hasColumnName("var50") - .column().hasColumnName("var51") - .column().hasColumnName("var52") - .column().hasColumnName("var53") - .column().hasColumnName("var54") - .column().hasColumnName("var55") - .column().hasColumnName("var56") - .column().hasColumnName("var57") - .column().hasColumnName("var58") - .column().hasColumnName("var59") - .column().hasColumnName("var60") - .column().hasColumnName("var61") + .column().hasColumnName("var1") + .column().hasColumnName("var2") + .column().hasColumnName("var3") + .column().hasColumnName("var4") + .column().hasColumnName("var5") + .column().hasColumnName("var6") + .column().hasColumnName("var7") + .column().hasColumnName("var8") + .column().hasColumnName("var9") + .column().hasColumnName("var10") + .column().hasColumnName("var11") + .column().hasColumnName("var12") + .column().hasColumnName("var13") + .column().hasColumnName("var14") + .column().hasColumnName("var15") + .column().hasColumnName("var16") + .column().hasColumnName("var17") + .column().hasColumnName("var18") + .column().hasColumnName("var19") + .column().hasColumnName("var20") + .column().hasColumnName("var21") + .column().hasColumnName("var22") + .column().hasColumnName("var23") + .column().hasColumnName("var24") + .column().hasColumnName("var25") + .column().hasColumnName("var26") + .column().hasColumnName("var27") + .column().hasColumnName("var28") + .column().hasColumnName("var29") + .column().hasColumnName("var30") + .column().hasColumnName("var31") + .column().hasColumnName("var32") + .column().hasColumnName("var33") + .column().hasColumnName("var34") + .column().hasColumnName("var35") + .column().hasColumnName("var36") + .column().hasColumnName("var37") + .column().hasColumnName("var38") + .column().hasColumnName("var39") + .column().hasColumnName("var40") + .column().hasColumnName("var41") + .column().hasColumnName("var42") + .column().hasColumnName("var43") + .column().hasColumnName("var44") + .column().hasColumnName("var45") + .column().hasColumnName("var46") + .column().hasColumnName("var47") + .column().hasColumnName("var48") + .column().hasColumnName("var49") + .column().hasColumnName("var50") + .column().hasColumnName("var51") + .column().hasColumnName("var52") + .column().hasColumnName("var53") + .column().hasColumnName("var54") + .column().hasColumnName("var55") + .column().hasColumnName("var56") + .column().hasColumnName("var57") + .column().hasColumnName("var58") + .column().hasColumnName("var59") + .column().hasColumnName("var60") + .column().hasColumnName("var61") ; } @@ -343,131 +343,131 @@ public void test_ColumnClass_isOfClass() { changes.setEndPointNow(); assertThat(table) - .column("var1").isOfClass(Long.class, false) - .column("var2").isOfClass(Integer.class, false) - .column("var3").isOfClass(Integer.class, false) - .column("var4").isOfClass(Integer.class, false) - .column("var5").isOfClass(Integer.class, false) - .column("var6").isOfClass(Integer.class, false) - .column("var7").isOfClass(Boolean.class, false) - .column("var8").isOfClass(Boolean.class, false) - .column("var9").isOfClass(Boolean.class, false) - .column("var10").isOfClass(Byte.class, false) - .column("var11").isOfClass(Short.class, false) - .column("var12").isOfClass(Short.class, false) - .column("var13").isOfClass(Short.class, false) - .column("var14").isOfClass(Long.class, false) - .column("var15").isOfClass(Long.class, false) - .column("var16").isOfClass(BigDecimal.class, false) - .column("var17").isOfClass(BigDecimal.class, false) - .column("var18").isOfClass(BigDecimal.class, false) - .column("var19").isOfClass(BigDecimal.class, false) - .column("var20").isOfClass(Double.class, false) - .column("var21").isOfClass(Double.class, false) - .column("var22").isOfClass(Double.class, false) - .column("var23").isOfClass(Float.class, false) - .column("var24").isOfClass(Float.class, false) - .column("var25").isOfClass(Time.class, false) - .column("var26").isOfClass(Date.class, false) - .column("var27").isOfClass(Timestamp.class, false) - .column("var28").isOfClass(Timestamp.class, false) - .column("var29").isOfClass(Timestamp.class, false) - .column("var30").isOfClass(byte[].class, false) - .column("var31").isOfClass(byte[].class, false) - .column("var32").isOfClass(byte[].class, false) - .column("var33").isOfClass(byte[].class, false) - .column("var34").isOfClass(byte[].class, false) - .column("var35").isOfClass(Locale.class, false) - .column("var36").isOfClass(String.class, false) - .column("var37").isOfClass(String.class, false) - .column("var38").isOfClass(String.class, false) - .column("var39").isOfClass(String.class, false) - .column("var40").isOfClass(String.class, false) - .column("var41").isOfClass(String.class, false) - .column("var42").isOfClass(String.class, false) - .column("var43").isOfClass(String.class, false) - .column("var44").isOfClass(String.class, false) - .column("var45").isOfClass(String.class, false) - .column("var46").isOfClass(byte[].class, false) - .column("var47").isOfClass(byte[].class, false) - .column("var48").isOfClass(byte[].class, false) - .column("var49").isOfClass(byte[].class, false) - .column("var50").isOfClass(byte[].class, false) - .column("var51").isOfClass(byte[].class, false) - .column("var52").isOfClass(String.class, false) - .column("var53").isOfClass(String.class, false) - .column("var54").isOfClass(String.class, false) - .column("var55").isOfClass(String.class, false) - .column("var56").isOfClass(String.class, false) - .column("var57").isOfClass(String.class, false) - .column("var58").isOfClass(String.class, false) - .column("var59").isOfClass(UUID.class, false) - .column("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) - .column("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) + .column("var1").isOfClass(Long.class, false) + .column("var2").isOfClass(Integer.class, false) + .column("var3").isOfClass(Integer.class, false) + .column("var4").isOfClass(Integer.class, false) + .column("var5").isOfClass(Integer.class, false) + .column("var6").isOfClass(Integer.class, false) + .column("var7").isOfClass(Boolean.class, false) + .column("var8").isOfClass(Boolean.class, false) + .column("var9").isOfClass(Boolean.class, false) + .column("var10").isOfClass(Byte.class, false) + .column("var11").isOfClass(Short.class, false) + .column("var12").isOfClass(Short.class, false) + .column("var13").isOfClass(Short.class, false) + .column("var14").isOfClass(Long.class, false) + .column("var15").isOfClass(Long.class, false) + .column("var16").isOfClass(BigDecimal.class, false) + .column("var17").isOfClass(BigDecimal.class, false) + .column("var18").isOfClass(BigDecimal.class, false) + .column("var19").isOfClass(BigDecimal.class, false) + .column("var20").isOfClass(Double.class, false) + .column("var21").isOfClass(Double.class, false) + .column("var22").isOfClass(Double.class, false) + .column("var23").isOfClass(Float.class, false) + .column("var24").isOfClass(Float.class, false) + .column("var25").isOfClass(Time.class, false) + .column("var26").isOfClass(Date.class, false) + .column("var27").isOfClass(Timestamp.class, false) + .column("var28").isOfClass(Timestamp.class, false) + .column("var29").isOfClass(Timestamp.class, false) + .column("var30").isOfClass(byte[].class, false) + .column("var31").isOfClass(byte[].class, false) + .column("var32").isOfClass(byte[].class, false) + .column("var33").isOfClass(byte[].class, false) + .column("var34").isOfClass(byte[].class, false) + .column("var35").isOfClass(Locale.class, false) + .column("var36").isOfClass(String.class, false) + .column("var37").isOfClass(String.class, false) + .column("var38").isOfClass(String.class, false) + .column("var39").isOfClass(String.class, false) + .column("var40").isOfClass(String.class, false) + .column("var41").isOfClass(String.class, false) + .column("var42").isOfClass(String.class, false) + .column("var43").isOfClass(String.class, false) + .column("var44").isOfClass(String.class, false) + .column("var45").isOfClass(String.class, false) + .column("var46").isOfClass(byte[].class, false) + .column("var47").isOfClass(byte[].class, false) + .column("var48").isOfClass(byte[].class, false) + .column("var49").isOfClass(byte[].class, false) + .column("var50").isOfClass(byte[].class, false) + .column("var51").isOfClass(byte[].class, false) + .column("var52").isOfClass(String.class, false) + .column("var53").isOfClass(String.class, false) + .column("var54").isOfClass(String.class, false) + .column("var55").isOfClass(String.class, false) + .column("var56").isOfClass(String.class, false) + .column("var57").isOfClass(String.class, false) + .column("var58").isOfClass(String.class, false) + .column("var59").isOfClass(UUID.class, false) + .column("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) + .column("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) ; assertThat(changes).change() - .column("var1").isOfClass(Long.class, false) - .column("var2").isOfClass(Integer.class, false) - .column("var3").isOfClass(Integer.class, false) - .column("var4").isOfClass(Integer.class, false) - .column("var5").isOfClass(Integer.class, false) - .column("var6").isOfClass(Integer.class, false) - .column("var7").isOfClass(Boolean.class, false) - .column("var8").isOfClass(Boolean.class, false) - .column("var9").isOfClass(Boolean.class, false) - .column("var10").isOfClass(Byte.class, false) - .column("var11").isOfClass(Short.class, false) - .column("var12").isOfClass(Short.class, false) - .column("var13").isOfClass(Short.class, false) - .column("var14").isOfClass(Long.class, false) - .column("var15").isOfClass(Long.class, false) - .column("var16").isOfClass(BigDecimal.class, false) - .column("var17").isOfClass(BigDecimal.class, false) - .column("var18").isOfClass(BigDecimal.class, false) - .column("var19").isOfClass(BigDecimal.class, false) - .column("var20").isOfClass(Double.class, false) - .column("var21").isOfClass(Double.class, false) - .column("var22").isOfClass(Double.class, false) - .column("var23").isOfClass(Float.class, false) - .column("var24").isOfClass(Float.class, false) - .column("var25").isOfClass(Time.class, false) - .column("var26").isOfClass(Date.class, false) - .column("var27").isOfClass(Timestamp.class, false) - .column("var28").isOfClass(Timestamp.class, false) - .column("var29").isOfClass(Timestamp.class, false) - .column("var30").isOfClass(byte[].class, false) - .column("var31").isOfClass(byte[].class, false) - .column("var32").isOfClass(byte[].class, false) - .column("var33").isOfClass(byte[].class, false) - .column("var34").isOfClass(byte[].class, false) - .column("var35").isOfClass(Locale.class, false) - .column("var36").isOfClass(String.class, false) - .column("var37").isOfClass(String.class, false) - .column("var38").isOfClass(String.class, false) - .column("var39").isOfClass(String.class, false) - .column("var40").isOfClass(String.class, false) - .column("var41").isOfClass(String.class, false) - .column("var42").isOfClass(String.class, false) - .column("var43").isOfClass(String.class, false) - .column("var44").isOfClass(String.class, false) - .column("var45").isOfClass(String.class, false) - .column("var46").isOfClass(byte[].class, false) - .column("var47").isOfClass(byte[].class, false) - .column("var48").isOfClass(byte[].class, false) - .column("var49").isOfClass(byte[].class, false) - .column("var50").isOfClass(byte[].class, false) - .column("var51").isOfClass(byte[].class, false) - .column("var52").isOfClass(String.class, false) - .column("var53").isOfClass(String.class, false) - .column("var54").isOfClass(String.class, false) - .column("var55").isOfClass(String.class, false) - .column("var56").isOfClass(String.class, false) - .column("var57").isOfClass(String.class, false) - .column("var58").isOfClass(String.class, false) - .column("var59").isOfClass(UUID.class, false) - .column("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) - .column("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) + .column("var1").isOfClass(Long.class, false) + .column("var2").isOfClass(Integer.class, false) + .column("var3").isOfClass(Integer.class, false) + .column("var4").isOfClass(Integer.class, false) + .column("var5").isOfClass(Integer.class, false) + .column("var6").isOfClass(Integer.class, false) + .column("var7").isOfClass(Boolean.class, false) + .column("var8").isOfClass(Boolean.class, false) + .column("var9").isOfClass(Boolean.class, false) + .column("var10").isOfClass(Byte.class, false) + .column("var11").isOfClass(Short.class, false) + .column("var12").isOfClass(Short.class, false) + .column("var13").isOfClass(Short.class, false) + .column("var14").isOfClass(Long.class, false) + .column("var15").isOfClass(Long.class, false) + .column("var16").isOfClass(BigDecimal.class, false) + .column("var17").isOfClass(BigDecimal.class, false) + .column("var18").isOfClass(BigDecimal.class, false) + .column("var19").isOfClass(BigDecimal.class, false) + .column("var20").isOfClass(Double.class, false) + .column("var21").isOfClass(Double.class, false) + .column("var22").isOfClass(Double.class, false) + .column("var23").isOfClass(Float.class, false) + .column("var24").isOfClass(Float.class, false) + .column("var25").isOfClass(Time.class, false) + .column("var26").isOfClass(Date.class, false) + .column("var27").isOfClass(Timestamp.class, false) + .column("var28").isOfClass(Timestamp.class, false) + .column("var29").isOfClass(Timestamp.class, false) + .column("var30").isOfClass(byte[].class, false) + .column("var31").isOfClass(byte[].class, false) + .column("var32").isOfClass(byte[].class, false) + .column("var33").isOfClass(byte[].class, false) + .column("var34").isOfClass(byte[].class, false) + .column("var35").isOfClass(Locale.class, false) + .column("var36").isOfClass(String.class, false) + .column("var37").isOfClass(String.class, false) + .column("var38").isOfClass(String.class, false) + .column("var39").isOfClass(String.class, false) + .column("var40").isOfClass(String.class, false) + .column("var41").isOfClass(String.class, false) + .column("var42").isOfClass(String.class, false) + .column("var43").isOfClass(String.class, false) + .column("var44").isOfClass(String.class, false) + .column("var45").isOfClass(String.class, false) + .column("var46").isOfClass(byte[].class, false) + .column("var47").isOfClass(byte[].class, false) + .column("var48").isOfClass(byte[].class, false) + .column("var49").isOfClass(byte[].class, false) + .column("var50").isOfClass(byte[].class, false) + .column("var51").isOfClass(byte[].class, false) + .column("var52").isOfClass(String.class, false) + .column("var53").isOfClass(String.class, false) + .column("var54").isOfClass(String.class, false) + .column("var55").isOfClass(String.class, false) + .column("var56").isOfClass(String.class, false) + .column("var57").isOfClass(String.class, false) + .column("var58").isOfClass(String.class, false) + .column("var59").isOfClass(UUID.class, false) + .column("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) + .column("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) ; } @@ -480,130 +480,130 @@ public void test_ColumnEquality_hasValues() { changes.setEndPointNow(); assertThat(table).column("var1").hasValues(1) - .column("var2").hasValues(20) - .column("var3").hasValues(3) - .column("var4").hasValues(4) - .column("var5").hasValues(5) - .column("var6").hasValues(6) - .column("var7").hasValues(true) - .column("var8").hasValues(false) - .column("var9").hasValues(true) - .column("var10").hasValues(7) - .column("var11").hasValues(8) - .column("var12").hasValues(9) - .column("var13").hasValues(10) - .column("var14").hasValues(11) - .column("var15").hasValues(12) - .column("var16").hasValues(13.13) - .column("var17").hasValues(14.14) - .column("var18").hasValues(15.15) - .column("var19").hasValues(16.16) - .column("var20").hasValues(17.17) - .column("var21").hasValues(18.18) - .column("var22").hasValues(19.19) - .column("var23").hasValues(20.20) - .column("var24").hasValues(21.21) - .column("var25").hasValues(TimeValue.of(9, 1)) - .column("var26").hasValues(DateValue.of(2007, 12, 23)) - .column("var27").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .column("var28").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .column("var29").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .column("var30").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var31").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var32").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var33").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var34").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var35").hasValues(Locale.FRENCH) - .column("var36").hasValues("22") - .column("var37").hasValues("23") - .column("var38").hasValues("24") - .column("var39").hasValues("25") - .column("var40").hasValues("26") - .column("var41").hasValues("27") - .column("var42").hasValues("28") - .column("var43").hasValues("29") - .column("var44").hasValues("30") - .column("var45").hasValues("31") - .column("var46").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var47").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var48").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var49").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var50").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var51").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var52").hasValues("32") - .column("var53").hasValues("33") - .column("var54").hasValues("34") - .column("var55").hasValues("35") - .column("var56").hasValues("36") - .column("var57").hasValues("37") - .column("var58").hasValues("38") - .column("var59").hasValues(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")) - .column("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) - .column("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) + .column("var2").hasValues(20) + .column("var3").hasValues(3) + .column("var4").hasValues(4) + .column("var5").hasValues(5) + .column("var6").hasValues(6) + .column("var7").hasValues(true) + .column("var8").hasValues(false) + .column("var9").hasValues(true) + .column("var10").hasValues(7) + .column("var11").hasValues(8) + .column("var12").hasValues(9) + .column("var13").hasValues(10) + .column("var14").hasValues(11) + .column("var15").hasValues(12) + .column("var16").hasValues(13.13) + .column("var17").hasValues(14.14) + .column("var18").hasValues(15.15) + .column("var19").hasValues(16.16) + .column("var20").hasValues(17.17) + .column("var21").hasValues(18.18) + .column("var22").hasValues(19.19) + .column("var23").hasValues(20.20) + .column("var24").hasValues(21.21) + .column("var25").hasValues(TimeValue.of(9, 1)) + .column("var26").hasValues(DateValue.of(2007, 12, 23)) + .column("var27").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .column("var28").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .column("var29").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .column("var30").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var31").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var32").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var33").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var34").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var35").hasValues(Locale.FRENCH) + .column("var36").hasValues("22") + .column("var37").hasValues("23") + .column("var38").hasValues("24") + .column("var39").hasValues("25") + .column("var40").hasValues("26") + .column("var41").hasValues("27") + .column("var42").hasValues("28") + .column("var43").hasValues("29") + .column("var44").hasValues("30") + .column("var45").hasValues("31") + .column("var46").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var47").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var48").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var49").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var50").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var51").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var52").hasValues("32") + .column("var53").hasValues("33") + .column("var54").hasValues("34") + .column("var55").hasValues("35") + .column("var56").hasValues("36") + .column("var57").hasValues("37") + .column("var58").hasValues("38") + .column("var59").hasValues(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")) + .column("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) + .column("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) ; assertThat(changes).change() - .column("var1").hasValues(1) - .column("var2").hasValues(2, 20) - .column("var3").hasValues(3) - .column("var4").hasValues(4) - .column("var5").hasValues(5) - .column("var6").hasValues(6) - .column("var7").hasValues(true) - .column("var8").hasValues(false) - .column("var9").hasValues(true) - .column("var10").hasValues(7) - .column("var11").hasValues(8) - .column("var12").hasValues(9) - .column("var13").hasValues(10) - .column("var14").hasValues(11) - .column("var15").hasValues(12) - .column("var16").hasValues(13.13) - .column("var17").hasValues(14.14) - .column("var18").hasValues(15.15) - .column("var19").hasValues(16.16) - .column("var20").hasValues(17.17) - .column("var21").hasValues(18.18) - .column("var22").hasValues(19.19) - .column("var23").hasValues(20.20) - .column("var24").hasValues(21.21) - .column("var25").hasValues(TimeValue.of(9, 1)) - .column("var26").hasValues(DateValue.of(2007, 12, 23)) - .column("var27").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .column("var28").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .column("var29").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .column("var30").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var31").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var32").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var33").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var34").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var35").hasValues(Locale.FRENCH) - .column("var36").hasValues("22") - .column("var37").hasValues("23") - .column("var38").hasValues("24") - .column("var39").hasValues("25") - .column("var40").hasValues("26") - .column("var41").hasValues("27") - .column("var42").hasValues("28") - .column("var43").hasValues("29") - .column("var44").hasValues("30") - .column("var45").hasValues("31") - .column("var46").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var47").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var48").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var49").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var50").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var51").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var52").hasValues("32") - .column("var53").hasValues("33") - .column("var54").hasValues("34") - .column("var55").hasValues("35") - .column("var56").hasValues("36") - .column("var57").hasValues("37") - .column("var58").hasValues("38") - .column("var59").hasValues(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")) - .column("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) - .column("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) + .column("var1").hasValues(1) + .column("var2").hasValues(2, 20) + .column("var3").hasValues(3) + .column("var4").hasValues(4) + .column("var5").hasValues(5) + .column("var6").hasValues(6) + .column("var7").hasValues(true) + .column("var8").hasValues(false) + .column("var9").hasValues(true) + .column("var10").hasValues(7) + .column("var11").hasValues(8) + .column("var12").hasValues(9) + .column("var13").hasValues(10) + .column("var14").hasValues(11) + .column("var15").hasValues(12) + .column("var16").hasValues(13.13) + .column("var17").hasValues(14.14) + .column("var18").hasValues(15.15) + .column("var19").hasValues(16.16) + .column("var20").hasValues(17.17) + .column("var21").hasValues(18.18) + .column("var22").hasValues(19.19) + .column("var23").hasValues(20.20) + .column("var24").hasValues(21.21) + .column("var25").hasValues(TimeValue.of(9, 1)) + .column("var26").hasValues(DateValue.of(2007, 12, 23)) + .column("var27").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .column("var28").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .column("var29").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .column("var30").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var31").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var32").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var33").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var34").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var35").hasValues(Locale.FRENCH) + .column("var36").hasValues("22") + .column("var37").hasValues("23") + .column("var38").hasValues("24") + .column("var39").hasValues("25") + .column("var40").hasValues("26") + .column("var41").hasValues("27") + .column("var42").hasValues("28") + .column("var43").hasValues("29") + .column("var44").hasValues("30") + .column("var45").hasValues("31") + .column("var46").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var47").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var48").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var49").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var50").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var51").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var52").hasValues("32") + .column("var53").hasValues("33") + .column("var54").hasValues("34") + .column("var55").hasValues("35") + .column("var56").hasValues("36") + .column("var57").hasValues("37") + .column("var58").hasValues("38") + .column("var59").hasValues(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")) + .column("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) + .column("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) ; } @@ -616,66 +616,66 @@ public void test_ColumnEquality_containsValues() { changes.setEndPointNow(); assertThat(table).column("var1").containsValues(1) - .column("var2").containsValues(20) - .column("var3").containsValues(3) - .column("var4").containsValues(4) - .column("var5").containsValues(5) - .column("var6").containsValues(6) - .column("var7").containsValues(true) - .column("var8").containsValues(false) - .column("var9").containsValues(true) - .column("var10").containsValues(7) - .column("var11").containsValues(8) - .column("var12").containsValues(9) - .column("var13").containsValues(10) - .column("var14").containsValues(11) - .column("var15").containsValues(12) - .column("var16").containsValues(13.13) - .column("var17").containsValues(14.14) - .column("var18").containsValues(15.15) - .column("var19").containsValues(16.16) - .column("var20").containsValues(17.17) - .column("var21").containsValues(18.18) - .column("var22").containsValues(19.19) - .column("var23").containsValues(20.20) - .column("var24").containsValues(21.21) - .column("var25").containsValues(TimeValue.of(9, 1)) - .column("var26").containsValues(DateValue.of(2007, 12, 23)) - .column("var27").containsValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .column("var28").containsValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .column("var29").containsValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .column("var30").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var31").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var32").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var33").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var34").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var35").containsValues(Locale.FRENCH) - .column("var36").containsValues("22") - .column("var37").containsValues("23") - .column("var38").containsValues("24") - .column("var39").containsValues("25") - .column("var40").containsValues("26") - .column("var41").containsValues("27") - .column("var42").containsValues("28") - .column("var43").containsValues("29") - .column("var44").containsValues("30") - .column("var45").containsValues("31") - .column("var46").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var47").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var48").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var49").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var50").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var51").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var52").containsValues("32") - .column("var53").containsValues("33") - .column("var54").containsValues("34") - .column("var55").containsValues("35") - .column("var56").containsValues("36") - .column("var57").containsValues("37") - .column("var58").containsValues("38") - .column("var59").containsValues(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")) - .column("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) - .column("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) + .column("var2").containsValues(20) + .column("var3").containsValues(3) + .column("var4").containsValues(4) + .column("var5").containsValues(5) + .column("var6").containsValues(6) + .column("var7").containsValues(true) + .column("var8").containsValues(false) + .column("var9").containsValues(true) + .column("var10").containsValues(7) + .column("var11").containsValues(8) + .column("var12").containsValues(9) + .column("var13").containsValues(10) + .column("var14").containsValues(11) + .column("var15").containsValues(12) + .column("var16").containsValues(13.13) + .column("var17").containsValues(14.14) + .column("var18").containsValues(15.15) + .column("var19").containsValues(16.16) + .column("var20").containsValues(17.17) + .column("var21").containsValues(18.18) + .column("var22").containsValues(19.19) + .column("var23").containsValues(20.20) + .column("var24").containsValues(21.21) + .column("var25").containsValues(TimeValue.of(9, 1)) + .column("var26").containsValues(DateValue.of(2007, 12, 23)) + .column("var27").containsValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .column("var28").containsValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .column("var29").containsValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .column("var30").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var31").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var32").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var33").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var34").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var35").containsValues(Locale.FRENCH) + .column("var36").containsValues("22") + .column("var37").containsValues("23") + .column("var38").containsValues("24") + .column("var39").containsValues("25") + .column("var40").containsValues("26") + .column("var41").containsValues("27") + .column("var42").containsValues("28") + .column("var43").containsValues("29") + .column("var44").containsValues("30") + .column("var45").containsValues("31") + .column("var46").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var47").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var48").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var49").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var50").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var51").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var52").containsValues("32") + .column("var53").containsValues("33") + .column("var54").containsValues("34") + .column("var55").containsValues("35") + .column("var56").containsValues("36") + .column("var57").containsValues("37") + .column("var58").containsValues("38") + .column("var59").containsValues(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")) + .column("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) + .column("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) ; } @@ -688,130 +688,130 @@ public void test_ColumnType_isOfType() { changes.setEndPointNow(); assertThat(table).column("var1").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var2").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var3").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var4").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var5").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var6").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var7").isBoolean(false).isOfType(ValueType.BOOLEAN, false) - .column("var8").isBoolean(false).isOfType(ValueType.BOOLEAN, false) - .column("var9").isBoolean(false).isOfType(ValueType.BOOLEAN, false) - .column("var10").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var11").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var12").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var13").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var14").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var15").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var16").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var17").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var18").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var19").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var20").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var21").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var22").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var23").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var24").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var25").isTime(false).isOfType(ValueType.TIME, false) - .column("var26").isDate(false).isOfType(ValueType.DATE, false) - .column("var27").isDateTime(false).isOfType(ValueType.DATE_TIME, false) - .column("var28").isDateTime(false).isOfType(ValueType.DATE_TIME, false) - .column("var29").isDateTime(false).isOfType(ValueType.DATE_TIME, false) - .column("var30").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var31").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var32").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var33").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var34").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var35") - .column("var36").isText(false).isOfType(ValueType.TEXT, false) - .column("var37").isText(false).isOfType(ValueType.TEXT, false) - .column("var38").isText(false).isOfType(ValueType.TEXT, false) - .column("var39").isText(false).isOfType(ValueType.TEXT, false) - .column("var40").isText(false).isOfType(ValueType.TEXT, false) - .column("var41").isText(false).isOfType(ValueType.TEXT, false) - .column("var42").isText(false).isOfType(ValueType.TEXT, false) - .column("var43").isText(false).isOfType(ValueType.TEXT, false) - .column("var44").isText(false).isOfType(ValueType.TEXT, false) - .column("var45").isText(false).isOfType(ValueType.TEXT, false) - .column("var46").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var47").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var48").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var49").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var50").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var51").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var52").isText(false).isOfType(ValueType.TEXT, false) - .column("var53").isText(false).isOfType(ValueType.TEXT, false) - .column("var54").isText(false).isOfType(ValueType.TEXT, false) - .column("var55").isText(false).isOfType(ValueType.TEXT, false) - .column("var56").isText(false).isOfType(ValueType.TEXT, false) - .column("var57").isText(false).isOfType(ValueType.TEXT, false) - .column("var58").isText(false).isOfType(ValueType.TEXT, false) - .column("var59").isUUID(false).isOfType(ValueType.UUID, false) - .column("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) - .column("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) + .column("var2").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var3").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var4").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var5").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var6").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var7").isBoolean(false).isOfType(ValueType.BOOLEAN, false) + .column("var8").isBoolean(false).isOfType(ValueType.BOOLEAN, false) + .column("var9").isBoolean(false).isOfType(ValueType.BOOLEAN, false) + .column("var10").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var11").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var12").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var13").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var14").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var15").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var16").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var17").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var18").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var19").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var20").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var21").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var22").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var23").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var24").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var25").isTime(false).isOfType(ValueType.TIME, false) + .column("var26").isDate(false).isOfType(ValueType.DATE, false) + .column("var27").isDateTime(false).isOfType(ValueType.DATE_TIME, false) + .column("var28").isDateTime(false).isOfType(ValueType.DATE_TIME, false) + .column("var29").isDateTime(false).isOfType(ValueType.DATE_TIME, false) + .column("var30").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var31").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var32").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var33").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var34").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var35") + .column("var36").isText(false).isOfType(ValueType.TEXT, false) + .column("var37").isText(false).isOfType(ValueType.TEXT, false) + .column("var38").isText(false).isOfType(ValueType.TEXT, false) + .column("var39").isText(false).isOfType(ValueType.TEXT, false) + .column("var40").isText(false).isOfType(ValueType.TEXT, false) + .column("var41").isText(false).isOfType(ValueType.TEXT, false) + .column("var42").isText(false).isOfType(ValueType.TEXT, false) + .column("var43").isText(false).isOfType(ValueType.TEXT, false) + .column("var44").isText(false).isOfType(ValueType.TEXT, false) + .column("var45").isText(false).isOfType(ValueType.TEXT, false) + .column("var46").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var47").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var48").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var49").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var50").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var51").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var52").isText(false).isOfType(ValueType.TEXT, false) + .column("var53").isText(false).isOfType(ValueType.TEXT, false) + .column("var54").isText(false).isOfType(ValueType.TEXT, false) + .column("var55").isText(false).isOfType(ValueType.TEXT, false) + .column("var56").isText(false).isOfType(ValueType.TEXT, false) + .column("var57").isText(false).isOfType(ValueType.TEXT, false) + .column("var58").isText(false).isOfType(ValueType.TEXT, false) + .column("var59").isUUID(false).isOfType(ValueType.UUID, false) + .column("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) + .column("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) ; assertThat(changes).change() - .column("var1").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var2").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var3").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var4").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var5").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var6").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var7").isBoolean(false).isOfType(ValueType.BOOLEAN, false) - .column("var8").isBoolean(false).isOfType(ValueType.BOOLEAN, false) - .column("var9").isBoolean(false).isOfType(ValueType.BOOLEAN, false) - .column("var10").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var11").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var12").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var13").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var14").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var15").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var16").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var17").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var18").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var19").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var20").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var21").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var22").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var23").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var24").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var25").isTime(false).isOfType(ValueType.TIME, false) - .column("var26").isDate(false).isOfType(ValueType.DATE, false) - .column("var27").isDateTime(false).isOfType(ValueType.DATE_TIME, false) - .column("var28").isDateTime(false).isOfType(ValueType.DATE_TIME, false) - .column("var29").isDateTime(false).isOfType(ValueType.DATE_TIME, false) - .column("var30").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var31").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var32").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var33").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var34").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var35") - .column("var36").isText(false).isOfType(ValueType.TEXT, false) - .column("var37").isText(false).isOfType(ValueType.TEXT, false) - .column("var38").isText(false).isOfType(ValueType.TEXT, false) - .column("var39").isText(false).isOfType(ValueType.TEXT, false) - .column("var40").isText(false).isOfType(ValueType.TEXT, false) - .column("var41").isText(false).isOfType(ValueType.TEXT, false) - .column("var42").isText(false).isOfType(ValueType.TEXT, false) - .column("var43").isText(false).isOfType(ValueType.TEXT, false) - .column("var44").isText(false).isOfType(ValueType.TEXT, false) - .column("var45").isText(false).isOfType(ValueType.TEXT, false) - .column("var46").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var47").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var48").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var49").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var50").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var51").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var52").isText(false).isOfType(ValueType.TEXT, false) - .column("var53").isText(false).isOfType(ValueType.TEXT, false) - .column("var54").isText(false).isOfType(ValueType.TEXT, false) - .column("var55").isText(false).isOfType(ValueType.TEXT, false) - .column("var56").isText(false).isOfType(ValueType.TEXT, false) - .column("var57").isText(false).isOfType(ValueType.TEXT, false) - .column("var58").isText(false).isOfType(ValueType.TEXT, false) - .column("var59").isUUID(false).isOfType(ValueType.UUID, false) - .column("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) - .column("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) + .column("var1").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var2").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var3").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var4").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var5").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var6").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var7").isBoolean(false).isOfType(ValueType.BOOLEAN, false) + .column("var8").isBoolean(false).isOfType(ValueType.BOOLEAN, false) + .column("var9").isBoolean(false).isOfType(ValueType.BOOLEAN, false) + .column("var10").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var11").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var12").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var13").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var14").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var15").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var16").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var17").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var18").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var19").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var20").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var21").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var22").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var23").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var24").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var25").isTime(false).isOfType(ValueType.TIME, false) + .column("var26").isDate(false).isOfType(ValueType.DATE, false) + .column("var27").isDateTime(false).isOfType(ValueType.DATE_TIME, false) + .column("var28").isDateTime(false).isOfType(ValueType.DATE_TIME, false) + .column("var29").isDateTime(false).isOfType(ValueType.DATE_TIME, false) + .column("var30").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var31").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var32").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var33").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var34").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var35") + .column("var36").isText(false).isOfType(ValueType.TEXT, false) + .column("var37").isText(false).isOfType(ValueType.TEXT, false) + .column("var38").isText(false).isOfType(ValueType.TEXT, false) + .column("var39").isText(false).isOfType(ValueType.TEXT, false) + .column("var40").isText(false).isOfType(ValueType.TEXT, false) + .column("var41").isText(false).isOfType(ValueType.TEXT, false) + .column("var42").isText(false).isOfType(ValueType.TEXT, false) + .column("var43").isText(false).isOfType(ValueType.TEXT, false) + .column("var44").isText(false).isOfType(ValueType.TEXT, false) + .column("var45").isText(false).isOfType(ValueType.TEXT, false) + .column("var46").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var47").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var48").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var49").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var50").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var51").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var52").isText(false).isOfType(ValueType.TEXT, false) + .column("var53").isText(false).isOfType(ValueType.TEXT, false) + .column("var54").isText(false).isOfType(ValueType.TEXT, false) + .column("var55").isText(false).isOfType(ValueType.TEXT, false) + .column("var56").isText(false).isOfType(ValueType.TEXT, false) + .column("var57").isText(false).isOfType(ValueType.TEXT, false) + .column("var58").isText(false).isOfType(ValueType.TEXT, false) + .column("var59").isUUID(false).isOfType(ValueType.UUID, false) + .column("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) + .column("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) ; } @@ -824,146 +824,146 @@ public void test_ColumnOfChangeEquality_hasValues() { changes.setEndPointNow(); assertThat(changes).change() - .column("var1").hasValues(1) - .column("var2").hasValues(2, 20) - .column("var3").hasValues(3) - .column("var4").hasValues(4) - .column("var5").hasValues(5) - .column("var6").hasValues(6) - .column("var7").hasValues(true) - .column("var8").hasValues(false) - .column("var9").hasValues(true) - .column("var10").hasValues(7) - .column("var11").hasValues(8) - .column("var12").hasValues(9) - .column("var13").hasValues(10) - .column("var14").hasValues(11) - .column("var15").hasValues(12) - .column("var16").hasValues(13.13) - .column("var17").hasValues(14.14) - .column("var18").hasValues(15.15) - .column("var19").hasValues(16.16) - .column("var20").hasValues(17.17) - .column("var21").hasValues(18.18) - .column("var22").hasValues(19.19) - .column("var23").hasValues(20.20) - .column("var24").hasValues(21.21) - .column("var25").hasValues(TimeValue.of(9, 1)) - .column("var26").hasValues(DateValue.of(2007, 12, 23)) - .column("var27").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .column("var28").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .column("var29").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .column("var30").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var31").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var32").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var33").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var34").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var35").hasValues(Locale.FRENCH) - .column("var36").hasValues("22") - .column("var37").hasValues("23") - .column("var38").hasValues("24") - .column("var39").hasValues("25") - .column("var40").hasValues("26") - .column("var41").hasValues("27") - .column("var42").hasValues("28") - .column("var43").hasValues("29") - .column("var44").hasValues("30") - .column("var45").hasValues("31") - .column("var46").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var47").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var48").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var49").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var50").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var51").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var52").hasValues("32") - .column("var53").hasValues("33") - .column("var54").hasValues("34") - .column("var55").hasValues("35") - .column("var56").hasValues("36") - .column("var57").hasValues("37") - .column("var58").hasValues("38") - .column("var59").hasValues(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")) - .column("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) - .column("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) + .column("var1").hasValues(1) + .column("var2").hasValues(2, 20) + .column("var3").hasValues(3) + .column("var4").hasValues(4) + .column("var5").hasValues(5) + .column("var6").hasValues(6) + .column("var7").hasValues(true) + .column("var8").hasValues(false) + .column("var9").hasValues(true) + .column("var10").hasValues(7) + .column("var11").hasValues(8) + .column("var12").hasValues(9) + .column("var13").hasValues(10) + .column("var14").hasValues(11) + .column("var15").hasValues(12) + .column("var16").hasValues(13.13) + .column("var17").hasValues(14.14) + .column("var18").hasValues(15.15) + .column("var19").hasValues(16.16) + .column("var20").hasValues(17.17) + .column("var21").hasValues(18.18) + .column("var22").hasValues(19.19) + .column("var23").hasValues(20.20) + .column("var24").hasValues(21.21) + .column("var25").hasValues(TimeValue.of(9, 1)) + .column("var26").hasValues(DateValue.of(2007, 12, 23)) + .column("var27").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .column("var28").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .column("var29").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .column("var30").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var31").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var32").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var33").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var34").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var35").hasValues(Locale.FRENCH) + .column("var36").hasValues("22") + .column("var37").hasValues("23") + .column("var38").hasValues("24") + .column("var39").hasValues("25") + .column("var40").hasValues("26") + .column("var41").hasValues("27") + .column("var42").hasValues("28") + .column("var43").hasValues("29") + .column("var44").hasValues("30") + .column("var45").hasValues("31") + .column("var46").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var47").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var48").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var49").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var50").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var51").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var52").hasValues("32") + .column("var53").hasValues("33") + .column("var54").hasValues("34") + .column("var55").hasValues("35") + .column("var56").hasValues("36") + .column("var57").hasValues("37") + .column("var58").hasValues("38") + .column("var59").hasValues(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")) + .column("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) + .column("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) ; assertThat(changes).change() - .column("var1").hasValues(1, 1) - .column("var2").hasValues(2, 20) - .column("var3").hasValues(3, 3) - .column("var4").hasValues(4, 4) - .column("var5").hasValues(5, 5) - .column("var6").hasValues(6, 6) - .column("var7").hasValues(true, true) - .column("var8").hasValues(false, false) - .column("var9").hasValues(true, true) - .column("var10").hasValues(7, 7) - .column("var11").hasValues(8, 8) - .column("var12").hasValues(9, 9) - .column("var13").hasValues(10, 10) - .column("var14").hasValues(11, 11) - .column("var15").hasValues(12, 12) - .column("var16").hasValues(13.13, 13.13) - .column("var17").hasValues(14.14, 14.14) - .column("var18").hasValues(15.15, 15.15) - .column("var19").hasValues(16.16, 16.16) - .column("var20").hasValues(17.17, 17.17) - .column("var21").hasValues(18.18, 18.18) - .column("var22").hasValues(19.19, 19.19) - .column("var23").hasValues(20.20, 20.20) - .column("var24").hasValues(21.21, 21.21) - .column("var25").hasValues(TimeValue.of(9, 1), TimeValue.of(9, 1)) - .column("var26").hasValues(DateValue.of(2007, 12, 23), DateValue.of(2007, 12, 23)) - .column("var27").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .column("var28").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .column("var29").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .column("var30").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var31").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var32").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var33").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var34").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var35").hasValues(Locale.FRENCH, Locale.FRENCH) - .column("var36").hasValues("22", "22") - .column("var37").hasValues("23", "23") - .column("var38").hasValues("24", "24") - .column("var39").hasValues("25", "25") - .column("var40").hasValues("26", "26") - .column("var41").hasValues("27", "27") - .column("var42").hasValues("28", "28") - .column("var43").hasValues("29", "29") - .column("var44").hasValues("30", "30") - .column("var45").hasValues("31", "31") - .column("var46").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var47").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var48").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var49").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var50").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var51").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var52").hasValues("32", "32") - .column("var53").hasValues("33", "33") - .column("var54").hasValues("34", "34") - .column("var55").hasValues("35", "35") - .column("var56").hasValues("36", "36") - .column("var57").hasValues("37", "37") - .column("var58").hasValues("38", "38") - .column("var59").hasValues(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435"), - UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")) - .column("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) - .column("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) + .column("var1").hasValues(1, 1) + .column("var2").hasValues(2, 20) + .column("var3").hasValues(3, 3) + .column("var4").hasValues(4, 4) + .column("var5").hasValues(5, 5) + .column("var6").hasValues(6, 6) + .column("var7").hasValues(true, true) + .column("var8").hasValues(false, false) + .column("var9").hasValues(true, true) + .column("var10").hasValues(7, 7) + .column("var11").hasValues(8, 8) + .column("var12").hasValues(9, 9) + .column("var13").hasValues(10, 10) + .column("var14").hasValues(11, 11) + .column("var15").hasValues(12, 12) + .column("var16").hasValues(13.13, 13.13) + .column("var17").hasValues(14.14, 14.14) + .column("var18").hasValues(15.15, 15.15) + .column("var19").hasValues(16.16, 16.16) + .column("var20").hasValues(17.17, 17.17) + .column("var21").hasValues(18.18, 18.18) + .column("var22").hasValues(19.19, 19.19) + .column("var23").hasValues(20.20, 20.20) + .column("var24").hasValues(21.21, 21.21) + .column("var25").hasValues(TimeValue.of(9, 1), TimeValue.of(9, 1)) + .column("var26").hasValues(DateValue.of(2007, 12, 23), DateValue.of(2007, 12, 23)) + .column("var27").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .column("var28").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .column("var29").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .column("var30").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var31").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var32").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var33").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var34").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var35").hasValues(Locale.FRENCH, Locale.FRENCH) + .column("var36").hasValues("22", "22") + .column("var37").hasValues("23", "23") + .column("var38").hasValues("24", "24") + .column("var39").hasValues("25", "25") + .column("var40").hasValues("26", "26") + .column("var41").hasValues("27", "27") + .column("var42").hasValues("28", "28") + .column("var43").hasValues("29", "29") + .column("var44").hasValues("30", "30") + .column("var45").hasValues("31", "31") + .column("var46").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var47").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var48").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var49").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var50").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var51").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var52").hasValues("32", "32") + .column("var53").hasValues("33", "33") + .column("var54").hasValues("34", "34") + .column("var55").hasValues("35", "35") + .column("var56").hasValues("36", "36") + .column("var57").hasValues("37", "37") + .column("var58").hasValues("38", "38") + .column("var59").hasValues(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435"), + UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")) + .column("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) + .column("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) ; } @@ -976,131 +976,131 @@ public void test_RowEquality_hasValues() { changes.setEndPointNow(); assertThat(table).row() - .hasValues(1, - 20, - 3, - 4, - 5, - 6, - true, - false, - true, - 7, - 8, - 9, - 10, - 11, - 12, - 13.13, - 14.14, - 15.15, - 16.16, - 17.17, - 18.18, - 19.19, - 20.20, - 21.21, - TimeValue.of(9, 1), - DateValue.of(2007, 12, 23), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)), - bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png"), - Locale.FRENCH, - "22", - "23", - "24", - "25", - "26", - "27", - "28", - "29", - "30", - "31", - bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png"), - "32", - "33", - "34", - "35", - "36", - "37", - "38", - UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435"), - null, - null) + .hasValues(1, + 20, + 3, + 4, + 5, + 6, + true, + false, + true, + 7, + 8, + 9, + 10, + 11, + 12, + 13.13, + 14.14, + 15.15, + 16.16, + 17.17, + 18.18, + 19.19, + 20.20, + 21.21, + TimeValue.of(9, 1), + DateValue.of(2007, 12, 23), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)), + bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png"), + Locale.FRENCH, + "22", + "23", + "24", + "25", + "26", + "27", + "28", + "29", + "30", + "31", + bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png"), + "32", + "33", + "34", + "35", + "36", + "37", + "38", + UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435"), + null, + null) ; assertThat(changes).change().rowAtStartPoint() - .hasValues(1, - 2, - 3, - 4, - 5, - 6, - true, - false, - true, - 7, - 8, - 9, - 10, - 11, - 12, - 13.13, - 14.14, - 15.15, - 16.16, - 17.17, - 18.18, - 19.19, - 20.20, - 21.21, - TimeValue.of(9, 1), - DateValue.of(2007, 12, 23), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)), - bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png"), - Locale.FRENCH, - "22", - "23", - "24", - "25", - "26", - "27", - "28", - "29", - "30", - "31", - bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png"), - "32", - "33", - "34", - "35", - "36", - "37", - "38", - UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435"), - null, - null) + .hasValues(1, + 2, + 3, + 4, + 5, + 6, + true, + false, + true, + 7, + 8, + 9, + 10, + 11, + 12, + 13.13, + 14.14, + 15.15, + 16.16, + 17.17, + 18.18, + 19.19, + 20.20, + 21.21, + TimeValue.of(9, 1), + DateValue.of(2007, 12, 23), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)), + bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png"), + Locale.FRENCH, + "22", + "23", + "24", + "25", + "26", + "27", + "28", + "29", + "30", + "31", + bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png"), + "32", + "33", + "34", + "35", + "36", + "37", + "38", + UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435"), + null, + null) ; } @@ -1113,131 +1113,131 @@ public void test_ValueClass_isOfClass() { changes.setEndPointNow(); assertThat(table).row() - .value("var1").isOfClass(Long.class) - .value("var2").isOfClass(Integer.class) - .value("var3").isOfClass(Integer.class) - .value("var4").isOfClass(Integer.class) - .value("var5").isOfClass(Integer.class) - .value("var6").isOfClass(Integer.class) - .value("var7").isOfClass(Boolean.class) - .value("var8").isOfClass(Boolean.class) - .value("var9").isOfClass(Boolean.class) - .value("var10").isOfClass(Byte.class) - .value("var11").isOfClass(Short.class) - .value("var12").isOfClass(Short.class) - .value("var13").isOfClass(Short.class) - .value("var14").isOfClass(Long.class) - .value("var15").isOfClass(Long.class) - .value("var16").isOfClass(BigDecimal.class) - .value("var17").isOfClass(BigDecimal.class) - .value("var18").isOfClass(BigDecimal.class) - .value("var19").isOfClass(BigDecimal.class) - .value("var20").isOfClass(Double.class) - .value("var21").isOfClass(Double.class) - .value("var22").isOfClass(Double.class) - .value("var23").isOfClass(Float.class) - .value("var24").isOfClass(Float.class) - .value("var25").isOfClass(Time.class) - .value("var26").isOfClass(Date.class) - .value("var27").isOfClass(Timestamp.class) - .value("var28").isOfClass(Timestamp.class) - .value("var29").isOfClass(Timestamp.class) - .value("var30").isOfClass(byte[].class) - .value("var31").isOfClass(byte[].class) - .value("var32").isOfClass(byte[].class) - .value("var33").isOfClass(byte[].class) - .value("var34").isOfClass(byte[].class) - .value("var35").isOfClass(Locale.class) - .value("var36").isOfClass(String.class) - .value("var37").isOfClass(String.class) - .value("var38").isOfClass(String.class) - .value("var39").isOfClass(String.class) - .value("var40").isOfClass(String.class) - .value("var41").isOfClass(String.class) - .value("var42").isOfClass(String.class) - .value("var43").isOfClass(String.class) - .value("var44").isOfClass(String.class) - .value("var45").isOfClass(String.class) - .value("var46").isOfClass(byte[].class) - .value("var47").isOfClass(byte[].class) - .value("var48").isOfClass(byte[].class) - .value("var49").isOfClass(byte[].class) - .value("var50").isOfClass(byte[].class) - .value("var51").isOfClass(byte[].class) - .value("var52").isOfClass(String.class) - .value("var53").isOfClass(String.class) - .value("var54").isOfClass(String.class) - .value("var55").isOfClass(String.class) - .value("var56").isOfClass(String.class) - .value("var57").isOfClass(String.class) - .value("var58").isOfClass(String.class) - .value("var59").isOfClass(UUID.class) - .value("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) - .value("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) + .value("var1").isOfClass(Long.class) + .value("var2").isOfClass(Integer.class) + .value("var3").isOfClass(Integer.class) + .value("var4").isOfClass(Integer.class) + .value("var5").isOfClass(Integer.class) + .value("var6").isOfClass(Integer.class) + .value("var7").isOfClass(Boolean.class) + .value("var8").isOfClass(Boolean.class) + .value("var9").isOfClass(Boolean.class) + .value("var10").isOfClass(Byte.class) + .value("var11").isOfClass(Short.class) + .value("var12").isOfClass(Short.class) + .value("var13").isOfClass(Short.class) + .value("var14").isOfClass(Long.class) + .value("var15").isOfClass(Long.class) + .value("var16").isOfClass(BigDecimal.class) + .value("var17").isOfClass(BigDecimal.class) + .value("var18").isOfClass(BigDecimal.class) + .value("var19").isOfClass(BigDecimal.class) + .value("var20").isOfClass(Double.class) + .value("var21").isOfClass(Double.class) + .value("var22").isOfClass(Double.class) + .value("var23").isOfClass(Float.class) + .value("var24").isOfClass(Float.class) + .value("var25").isOfClass(Time.class) + .value("var26").isOfClass(Date.class) + .value("var27").isOfClass(Timestamp.class) + .value("var28").isOfClass(Timestamp.class) + .value("var29").isOfClass(Timestamp.class) + .value("var30").isOfClass(byte[].class) + .value("var31").isOfClass(byte[].class) + .value("var32").isOfClass(byte[].class) + .value("var33").isOfClass(byte[].class) + .value("var34").isOfClass(byte[].class) + .value("var35").isOfClass(Locale.class) + .value("var36").isOfClass(String.class) + .value("var37").isOfClass(String.class) + .value("var38").isOfClass(String.class) + .value("var39").isOfClass(String.class) + .value("var40").isOfClass(String.class) + .value("var41").isOfClass(String.class) + .value("var42").isOfClass(String.class) + .value("var43").isOfClass(String.class) + .value("var44").isOfClass(String.class) + .value("var45").isOfClass(String.class) + .value("var46").isOfClass(byte[].class) + .value("var47").isOfClass(byte[].class) + .value("var48").isOfClass(byte[].class) + .value("var49").isOfClass(byte[].class) + .value("var50").isOfClass(byte[].class) + .value("var51").isOfClass(byte[].class) + .value("var52").isOfClass(String.class) + .value("var53").isOfClass(String.class) + .value("var54").isOfClass(String.class) + .value("var55").isOfClass(String.class) + .value("var56").isOfClass(String.class) + .value("var57").isOfClass(String.class) + .value("var58").isOfClass(String.class) + .value("var59").isOfClass(UUID.class) + .value("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) + .value("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) ; assertThat(changes).change().rowAtStartPoint() - .value("var1").isOfClass(Long.class) - .value("var2").isOfClass(Integer.class) - .value("var3").isOfClass(Integer.class) - .value("var4").isOfClass(Integer.class) - .value("var5").isOfClass(Integer.class) - .value("var6").isOfClass(Integer.class) - .value("var7").isOfClass(Boolean.class) - .value("var8").isOfClass(Boolean.class) - .value("var9").isOfClass(Boolean.class) - .value("var10").isOfClass(Byte.class) - .value("var11").isOfClass(Short.class) - .value("var12").isOfClass(Short.class) - .value("var13").isOfClass(Short.class) - .value("var14").isOfClass(Long.class) - .value("var15").isOfClass(Long.class) - .value("var16").isOfClass(BigDecimal.class) - .value("var17").isOfClass(BigDecimal.class) - .value("var18").isOfClass(BigDecimal.class) - .value("var19").isOfClass(BigDecimal.class) - .value("var20").isOfClass(Double.class) - .value("var21").isOfClass(Double.class) - .value("var22").isOfClass(Double.class) - .value("var23").isOfClass(Float.class) - .value("var24").isOfClass(Float.class) - .value("var25").isOfClass(Time.class) - .value("var26").isOfClass(Date.class) - .value("var27").isOfClass(Timestamp.class) - .value("var28").isOfClass(Timestamp.class) - .value("var29").isOfClass(Timestamp.class) - .value("var30").isOfClass(byte[].class) - .value("var31").isOfClass(byte[].class) - .value("var32").isOfClass(byte[].class) - .value("var33").isOfClass(byte[].class) - .value("var34").isOfClass(byte[].class) - .value("var35").isOfClass(Locale.class) - .value("var36").isOfClass(String.class) - .value("var37").isOfClass(String.class) - .value("var38").isOfClass(String.class) - .value("var39").isOfClass(String.class) - .value("var40").isOfClass(String.class) - .value("var41").isOfClass(String.class) - .value("var42").isOfClass(String.class) - .value("var43").isOfClass(String.class) - .value("var44").isOfClass(String.class) - .value("var45").isOfClass(String.class) - .value("var46").isOfClass(byte[].class) - .value("var47").isOfClass(byte[].class) - .value("var48").isOfClass(byte[].class) - .value("var49").isOfClass(byte[].class) - .value("var50").isOfClass(byte[].class) - .value("var51").isOfClass(byte[].class) - .value("var52").isOfClass(String.class) - .value("var53").isOfClass(String.class) - .value("var54").isOfClass(String.class) - .value("var55").isOfClass(String.class) - .value("var56").isOfClass(String.class) - .value("var57").isOfClass(String.class) - .value("var58").isOfClass(String.class) - .value("var59").isOfClass(UUID.class) - .value("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) - .value("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) + .value("var1").isOfClass(Long.class) + .value("var2").isOfClass(Integer.class) + .value("var3").isOfClass(Integer.class) + .value("var4").isOfClass(Integer.class) + .value("var5").isOfClass(Integer.class) + .value("var6").isOfClass(Integer.class) + .value("var7").isOfClass(Boolean.class) + .value("var8").isOfClass(Boolean.class) + .value("var9").isOfClass(Boolean.class) + .value("var10").isOfClass(Byte.class) + .value("var11").isOfClass(Short.class) + .value("var12").isOfClass(Short.class) + .value("var13").isOfClass(Short.class) + .value("var14").isOfClass(Long.class) + .value("var15").isOfClass(Long.class) + .value("var16").isOfClass(BigDecimal.class) + .value("var17").isOfClass(BigDecimal.class) + .value("var18").isOfClass(BigDecimal.class) + .value("var19").isOfClass(BigDecimal.class) + .value("var20").isOfClass(Double.class) + .value("var21").isOfClass(Double.class) + .value("var22").isOfClass(Double.class) + .value("var23").isOfClass(Float.class) + .value("var24").isOfClass(Float.class) + .value("var25").isOfClass(Time.class) + .value("var26").isOfClass(Date.class) + .value("var27").isOfClass(Timestamp.class) + .value("var28").isOfClass(Timestamp.class) + .value("var29").isOfClass(Timestamp.class) + .value("var30").isOfClass(byte[].class) + .value("var31").isOfClass(byte[].class) + .value("var32").isOfClass(byte[].class) + .value("var33").isOfClass(byte[].class) + .value("var34").isOfClass(byte[].class) + .value("var35").isOfClass(Locale.class) + .value("var36").isOfClass(String.class) + .value("var37").isOfClass(String.class) + .value("var38").isOfClass(String.class) + .value("var39").isOfClass(String.class) + .value("var40").isOfClass(String.class) + .value("var41").isOfClass(String.class) + .value("var42").isOfClass(String.class) + .value("var43").isOfClass(String.class) + .value("var44").isOfClass(String.class) + .value("var45").isOfClass(String.class) + .value("var46").isOfClass(byte[].class) + .value("var47").isOfClass(byte[].class) + .value("var48").isOfClass(byte[].class) + .value("var49").isOfClass(byte[].class) + .value("var50").isOfClass(byte[].class) + .value("var51").isOfClass(byte[].class) + .value("var52").isOfClass(String.class) + .value("var53").isOfClass(String.class) + .value("var54").isOfClass(String.class) + .value("var55").isOfClass(String.class) + .value("var56").isOfClass(String.class) + .value("var57").isOfClass(String.class) + .value("var58").isOfClass(String.class) + .value("var59").isOfClass(UUID.class) + .value("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) + .value("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) ; } @@ -1250,131 +1250,131 @@ public void test_ValueEquality_isEqualTo() { changes.setEndPointNow(); assertThat(table).row() - .value("var1").isEqualTo(1) - .value("var2").isEqualTo(20) - .value("var3").isEqualTo(3) - .value("var4").isEqualTo(4) - .value("var5").isEqualTo(5) - .value("var6").isEqualTo(6) - .value("var7").isEqualTo(true) - .value("var8").isEqualTo(false) - .value("var9").isEqualTo(true) - .value("var10").isEqualTo(7) - .value("var11").isEqualTo(8) - .value("var12").isEqualTo(9) - .value("var13").isEqualTo(10) - .value("var14").isEqualTo(11) - .value("var15").isEqualTo(12) - .value("var16").isEqualTo(13.13) - .value("var17").isEqualTo(14.14) - .value("var18").isEqualTo(15.15) - .value("var19").isEqualTo(16.16) - .value("var20").isEqualTo(17.17) - .value("var21").isEqualTo(18.18) - .value("var22").isEqualTo(19.19) - .value("var23").isEqualTo(20.20) - .value("var24").isEqualTo(21.21) - .value("var25").isEqualTo(TimeValue.of(9, 1)) - .value("var26").isEqualTo(DateValue.of(2007, 12, 23)) - .value("var27").isEqualTo(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .value("var28").isEqualTo(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .value("var29").isEqualTo(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .value("var30").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var31").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var32").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var33").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var34").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var35").isEqualTo(Locale.FRENCH) - .value("var36").isEqualTo("22") - .value("var37").isEqualTo("23") - .value("var38").isEqualTo("24") - .value("var39").isEqualTo("25") - .value("var40").isEqualTo("26") - .value("var41").isEqualTo("27") - .value("var42").isEqualTo("28") - .value("var43").isEqualTo("29") - .value("var44").isEqualTo("30") - .value("var45").isEqualTo("31") - .value("var46").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var47").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var48").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var49").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var50").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var51").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var52").isEqualTo("32") - .value("var53").isEqualTo("33") - .value("var54").isEqualTo("34") - .value("var55").isEqualTo("35") - .value("var56").isEqualTo("36") - .value("var57").isEqualTo("37") - .value("var58").isEqualTo("38") - .value("var59").isEqualTo(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")) - .value("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) - .value("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) + .value("var1").isEqualTo(1) + .value("var2").isEqualTo(20) + .value("var3").isEqualTo(3) + .value("var4").isEqualTo(4) + .value("var5").isEqualTo(5) + .value("var6").isEqualTo(6) + .value("var7").isEqualTo(true) + .value("var8").isEqualTo(false) + .value("var9").isEqualTo(true) + .value("var10").isEqualTo(7) + .value("var11").isEqualTo(8) + .value("var12").isEqualTo(9) + .value("var13").isEqualTo(10) + .value("var14").isEqualTo(11) + .value("var15").isEqualTo(12) + .value("var16").isEqualTo(13.13) + .value("var17").isEqualTo(14.14) + .value("var18").isEqualTo(15.15) + .value("var19").isEqualTo(16.16) + .value("var20").isEqualTo(17.17) + .value("var21").isEqualTo(18.18) + .value("var22").isEqualTo(19.19) + .value("var23").isEqualTo(20.20) + .value("var24").isEqualTo(21.21) + .value("var25").isEqualTo(TimeValue.of(9, 1)) + .value("var26").isEqualTo(DateValue.of(2007, 12, 23)) + .value("var27").isEqualTo(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .value("var28").isEqualTo(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .value("var29").isEqualTo(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .value("var30").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var31").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var32").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var33").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var34").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var35").isEqualTo(Locale.FRENCH) + .value("var36").isEqualTo("22") + .value("var37").isEqualTo("23") + .value("var38").isEqualTo("24") + .value("var39").isEqualTo("25") + .value("var40").isEqualTo("26") + .value("var41").isEqualTo("27") + .value("var42").isEqualTo("28") + .value("var43").isEqualTo("29") + .value("var44").isEqualTo("30") + .value("var45").isEqualTo("31") + .value("var46").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var47").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var48").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var49").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var50").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var51").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var52").isEqualTo("32") + .value("var53").isEqualTo("33") + .value("var54").isEqualTo("34") + .value("var55").isEqualTo("35") + .value("var56").isEqualTo("36") + .value("var57").isEqualTo("37") + .value("var58").isEqualTo("38") + .value("var59").isEqualTo(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")) + .value("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) + .value("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) ; assertThat(changes).change().rowAtStartPoint() - .value("var1").isEqualTo(1) - .value("var2").isEqualTo(2) - .value("var3").isEqualTo(3) - .value("var4").isEqualTo(4) - .value("var5").isEqualTo(5) - .value("var6").isEqualTo(6) - .value("var7").isEqualTo(true) - .value("var8").isEqualTo(false) - .value("var9").isEqualTo(true) - .value("var10").isEqualTo(7) - .value("var11").isEqualTo(8) - .value("var12").isEqualTo(9) - .value("var13").isEqualTo(10) - .value("var14").isEqualTo(11) - .value("var15").isEqualTo(12) - .value("var16").isEqualTo(13.13) - .value("var17").isEqualTo(14.14) - .value("var18").isEqualTo(15.15) - .value("var19").isEqualTo(16.16) - .value("var20").isEqualTo(17.17) - .value("var21").isEqualTo(18.18) - .value("var22").isEqualTo(19.19) - .value("var23").isEqualTo(20.20) - .value("var24").isEqualTo(21.21) - .value("var25").isEqualTo(TimeValue.of(9, 1)) - .value("var26").isEqualTo(DateValue.of(2007, 12, 23)) - .value("var27").isEqualTo(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .value("var28").isEqualTo(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .value("var29").isEqualTo(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .value("var30").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var31").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var32").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var33").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var34").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var35").isEqualTo(Locale.FRENCH) - .value("var36").isEqualTo("22") - .value("var37").isEqualTo("23") - .value("var38").isEqualTo("24") - .value("var39").isEqualTo("25") - .value("var40").isEqualTo("26") - .value("var41").isEqualTo("27") - .value("var42").isEqualTo("28") - .value("var43").isEqualTo("29") - .value("var44").isEqualTo("30") - .value("var45").isEqualTo("31") - .value("var46").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var47").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var48").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var49").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var50").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var51").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var52").isEqualTo("32") - .value("var53").isEqualTo("33") - .value("var54").isEqualTo("34") - .value("var55").isEqualTo("35") - .value("var56").isEqualTo("36") - .value("var57").isEqualTo("37") - .value("var58").isEqualTo("38") - .value("var59").isEqualTo(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")) - .value("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) - .value("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) + .value("var1").isEqualTo(1) + .value("var2").isEqualTo(2) + .value("var3").isEqualTo(3) + .value("var4").isEqualTo(4) + .value("var5").isEqualTo(5) + .value("var6").isEqualTo(6) + .value("var7").isEqualTo(true) + .value("var8").isEqualTo(false) + .value("var9").isEqualTo(true) + .value("var10").isEqualTo(7) + .value("var11").isEqualTo(8) + .value("var12").isEqualTo(9) + .value("var13").isEqualTo(10) + .value("var14").isEqualTo(11) + .value("var15").isEqualTo(12) + .value("var16").isEqualTo(13.13) + .value("var17").isEqualTo(14.14) + .value("var18").isEqualTo(15.15) + .value("var19").isEqualTo(16.16) + .value("var20").isEqualTo(17.17) + .value("var21").isEqualTo(18.18) + .value("var22").isEqualTo(19.19) + .value("var23").isEqualTo(20.20) + .value("var24").isEqualTo(21.21) + .value("var25").isEqualTo(TimeValue.of(9, 1)) + .value("var26").isEqualTo(DateValue.of(2007, 12, 23)) + .value("var27").isEqualTo(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .value("var28").isEqualTo(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .value("var29").isEqualTo(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .value("var30").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var31").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var32").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var33").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var34").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var35").isEqualTo(Locale.FRENCH) + .value("var36").isEqualTo("22") + .value("var37").isEqualTo("23") + .value("var38").isEqualTo("24") + .value("var39").isEqualTo("25") + .value("var40").isEqualTo("26") + .value("var41").isEqualTo("27") + .value("var42").isEqualTo("28") + .value("var43").isEqualTo("29") + .value("var44").isEqualTo("30") + .value("var45").isEqualTo("31") + .value("var46").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var47").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var48").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var49").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var50").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var51").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var52").isEqualTo("32") + .value("var53").isEqualTo("33") + .value("var54").isEqualTo("34") + .value("var55").isEqualTo("35") + .value("var56").isEqualTo("36") + .value("var57").isEqualTo("37") + .value("var58").isEqualTo("38") + .value("var59").isEqualTo(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")) + .value("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) + .value("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) ; } @@ -1387,131 +1387,131 @@ public void test_ValueNonEquality_isNotEqualTo() { changes.setEndPointNow(); assertThat(table).row() - .value("var1").isNotEqualTo(10) - .value("var2").isNotEqualTo(200) - .value("var3").isNotEqualTo(30) - .value("var4").isNotEqualTo(40) - .value("var5").isNotEqualTo(50) - .value("var6").isNotEqualTo(60) - .value("var7").isNotEqualTo(false) - .value("var8").isNotEqualTo(true) - .value("var9").isNotEqualTo(false) - .value("var10").isNotEqualTo(70) - .value("var11").isNotEqualTo(80) - .value("var12").isNotEqualTo(90) - .value("var13").isNotEqualTo(100) - .value("var14").isNotEqualTo(110) - .value("var15").isNotEqualTo(120) - .value("var16").isNotEqualTo(130.13) - .value("var17").isNotEqualTo(140.14) - .value("var18").isNotEqualTo(150.15) - .value("var19").isNotEqualTo(160.16) - .value("var20").isNotEqualTo(170.17) - .value("var21").isNotEqualTo(180.18) - .value("var22").isNotEqualTo(190.19) - .value("var23").isNotEqualTo(200.20) - .value("var24").isNotEqualTo(210.21) - .value("var25").isNotEqualTo(TimeValue.of(9, 10)) - .value("var26").isNotEqualTo(DateValue.of(2006, 12, 23)) - .value("var27").isNotEqualTo(DateTimeValue.of(DateValue.of(2006, 12, 23), TimeValue.of(9, 1))) - .value("var28").isNotEqualTo(DateTimeValue.of(DateValue.of(2006, 12, 23), TimeValue.of(9, 1))) - .value("var29").isNotEqualTo(DateTimeValue.of(DateValue.of(2006, 12, 23), TimeValue.of(9, 1))) - .value("var30").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var31").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var32").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var33").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var34").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var35").isNotEqualTo(Locale.ENGLISH) - .value("var36").isNotEqualTo("220") - .value("var37").isNotEqualTo("230") - .value("var38").isNotEqualTo("240") - .value("var39").isNotEqualTo("250") - .value("var40").isNotEqualTo("260") - .value("var41").isNotEqualTo("270") - .value("var42").isNotEqualTo("280") - .value("var43").isNotEqualTo("290") - .value("var44").isNotEqualTo("300") - .value("var45").isNotEqualTo("310") - .value("var46").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var47").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var48").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var49").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var50").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var51").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var52").isNotEqualTo("320") - .value("var53").isNotEqualTo("330") - .value("var54").isNotEqualTo("340") - .value("var55").isNotEqualTo("350") - .value("var56").isNotEqualTo("360") - .value("var57").isNotEqualTo("370") - .value("var58").isNotEqualTo("380") - .value("var59").isNotEqualTo(UUID.fromString("16319617-AE95-4087-9264-D3D21BF611B6")) - .value("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) - .value("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) + .value("var1").isNotEqualTo(10) + .value("var2").isNotEqualTo(200) + .value("var3").isNotEqualTo(30) + .value("var4").isNotEqualTo(40) + .value("var5").isNotEqualTo(50) + .value("var6").isNotEqualTo(60) + .value("var7").isNotEqualTo(false) + .value("var8").isNotEqualTo(true) + .value("var9").isNotEqualTo(false) + .value("var10").isNotEqualTo(70) + .value("var11").isNotEqualTo(80) + .value("var12").isNotEqualTo(90) + .value("var13").isNotEqualTo(100) + .value("var14").isNotEqualTo(110) + .value("var15").isNotEqualTo(120) + .value("var16").isNotEqualTo(130.13) + .value("var17").isNotEqualTo(140.14) + .value("var18").isNotEqualTo(150.15) + .value("var19").isNotEqualTo(160.16) + .value("var20").isNotEqualTo(170.17) + .value("var21").isNotEqualTo(180.18) + .value("var22").isNotEqualTo(190.19) + .value("var23").isNotEqualTo(200.20) + .value("var24").isNotEqualTo(210.21) + .value("var25").isNotEqualTo(TimeValue.of(9, 10)) + .value("var26").isNotEqualTo(DateValue.of(2006, 12, 23)) + .value("var27").isNotEqualTo(DateTimeValue.of(DateValue.of(2006, 12, 23), TimeValue.of(9, 1))) + .value("var28").isNotEqualTo(DateTimeValue.of(DateValue.of(2006, 12, 23), TimeValue.of(9, 1))) + .value("var29").isNotEqualTo(DateTimeValue.of(DateValue.of(2006, 12, 23), TimeValue.of(9, 1))) + .value("var30").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var31").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var32").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var33").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var34").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var35").isNotEqualTo(Locale.ENGLISH) + .value("var36").isNotEqualTo("220") + .value("var37").isNotEqualTo("230") + .value("var38").isNotEqualTo("240") + .value("var39").isNotEqualTo("250") + .value("var40").isNotEqualTo("260") + .value("var41").isNotEqualTo("270") + .value("var42").isNotEqualTo("280") + .value("var43").isNotEqualTo("290") + .value("var44").isNotEqualTo("300") + .value("var45").isNotEqualTo("310") + .value("var46").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var47").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var48").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var49").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var50").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var51").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var52").isNotEqualTo("320") + .value("var53").isNotEqualTo("330") + .value("var54").isNotEqualTo("340") + .value("var55").isNotEqualTo("350") + .value("var56").isNotEqualTo("360") + .value("var57").isNotEqualTo("370") + .value("var58").isNotEqualTo("380") + .value("var59").isNotEqualTo(UUID.fromString("16319617-AE95-4087-9264-D3D21BF611B6")) + .value("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) + .value("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) ; assertThat(changes).change().rowAtStartPoint() - .value("var1").isNotEqualTo(10) - .value("var2").isNotEqualTo(20) - .value("var3").isNotEqualTo(30) - .value("var4").isNotEqualTo(40) - .value("var5").isNotEqualTo(50) - .value("var6").isNotEqualTo(60) - .value("var7").isNotEqualTo(false) - .value("var8").isNotEqualTo(true) - .value("var9").isNotEqualTo(false) - .value("var10").isNotEqualTo(70) - .value("var11").isNotEqualTo(80) - .value("var12").isNotEqualTo(90) - .value("var13").isNotEqualTo(100) - .value("var14").isNotEqualTo(110) - .value("var15").isNotEqualTo(120) - .value("var16").isNotEqualTo(130.13) - .value("var17").isNotEqualTo(140.14) - .value("var18").isNotEqualTo(150.15) - .value("var19").isNotEqualTo(160.16) - .value("var20").isNotEqualTo(170.17) - .value("var21").isNotEqualTo(180.18) - .value("var22").isNotEqualTo(190.19) - .value("var23").isNotEqualTo(200.20) - .value("var24").isNotEqualTo(210.21) - .value("var25").isNotEqualTo(TimeValue.of(9, 10)) - .value("var26").isNotEqualTo(DateValue.of(2006, 12, 23)) - .value("var27").isNotEqualTo(DateTimeValue.of(DateValue.of(2006, 12, 23), TimeValue.of(9, 1))) - .value("var28").isNotEqualTo(DateTimeValue.of(DateValue.of(2006, 12, 23), TimeValue.of(9, 1))) - .value("var29").isNotEqualTo(DateTimeValue.of(DateValue.of(2006, 12, 23), TimeValue.of(9, 1))) - .value("var30").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var31").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var32").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var33").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var34").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var35").isNotEqualTo(Locale.ENGLISH) - .value("var36").isNotEqualTo("220") - .value("var37").isNotEqualTo("230") - .value("var38").isNotEqualTo("240") - .value("var39").isNotEqualTo("250") - .value("var40").isNotEqualTo("260") - .value("var41").isNotEqualTo("270") - .value("var42").isNotEqualTo("280") - .value("var43").isNotEqualTo("290") - .value("var44").isNotEqualTo("300") - .value("var45").isNotEqualTo("310") - .value("var46").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var47").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var48").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var49").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var50").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var51").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var52").isNotEqualTo("320") - .value("var53").isNotEqualTo("330") - .value("var54").isNotEqualTo("340") - .value("var55").isNotEqualTo("350") - .value("var56").isNotEqualTo("360") - .value("var57").isNotEqualTo("370") - .value("var58").isNotEqualTo("380") - .value("var59").isNotEqualTo(UUID.fromString("16319617-AE95-4087-9264-D3D21BF611B6")) - .value("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) - .value("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) + .value("var1").isNotEqualTo(10) + .value("var2").isNotEqualTo(20) + .value("var3").isNotEqualTo(30) + .value("var4").isNotEqualTo(40) + .value("var5").isNotEqualTo(50) + .value("var6").isNotEqualTo(60) + .value("var7").isNotEqualTo(false) + .value("var8").isNotEqualTo(true) + .value("var9").isNotEqualTo(false) + .value("var10").isNotEqualTo(70) + .value("var11").isNotEqualTo(80) + .value("var12").isNotEqualTo(90) + .value("var13").isNotEqualTo(100) + .value("var14").isNotEqualTo(110) + .value("var15").isNotEqualTo(120) + .value("var16").isNotEqualTo(130.13) + .value("var17").isNotEqualTo(140.14) + .value("var18").isNotEqualTo(150.15) + .value("var19").isNotEqualTo(160.16) + .value("var20").isNotEqualTo(170.17) + .value("var21").isNotEqualTo(180.18) + .value("var22").isNotEqualTo(190.19) + .value("var23").isNotEqualTo(200.20) + .value("var24").isNotEqualTo(210.21) + .value("var25").isNotEqualTo(TimeValue.of(9, 10)) + .value("var26").isNotEqualTo(DateValue.of(2006, 12, 23)) + .value("var27").isNotEqualTo(DateTimeValue.of(DateValue.of(2006, 12, 23), TimeValue.of(9, 1))) + .value("var28").isNotEqualTo(DateTimeValue.of(DateValue.of(2006, 12, 23), TimeValue.of(9, 1))) + .value("var29").isNotEqualTo(DateTimeValue.of(DateValue.of(2006, 12, 23), TimeValue.of(9, 1))) + .value("var30").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var31").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var32").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var33").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var34").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var35").isNotEqualTo(Locale.ENGLISH) + .value("var36").isNotEqualTo("220") + .value("var37").isNotEqualTo("230") + .value("var38").isNotEqualTo("240") + .value("var39").isNotEqualTo("250") + .value("var40").isNotEqualTo("260") + .value("var41").isNotEqualTo("270") + .value("var42").isNotEqualTo("280") + .value("var43").isNotEqualTo("290") + .value("var44").isNotEqualTo("300") + .value("var45").isNotEqualTo("310") + .value("var46").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var47").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var48").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var49").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var50").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var51").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var52").isNotEqualTo("320") + .value("var53").isNotEqualTo("330") + .value("var54").isNotEqualTo("340") + .value("var55").isNotEqualTo("350") + .value("var56").isNotEqualTo("360") + .value("var57").isNotEqualTo("370") + .value("var58").isNotEqualTo("380") + .value("var59").isNotEqualTo(UUID.fromString("16319617-AE95-4087-9264-D3D21BF611B6")) + .value("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) + .value("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) ; } @@ -1524,131 +1524,131 @@ public void test_ValueType_isOfType() { changes.setEndPointNow(); assertThat(table).row() - .value("var1").isNumber().isOfType(ValueType.NUMBER) - .value("var2").isNumber().isOfType(ValueType.NUMBER) - .value("var3").isNumber().isOfType(ValueType.NUMBER) - .value("var4").isNumber().isOfType(ValueType.NUMBER) - .value("var5").isNumber().isOfType(ValueType.NUMBER) - .value("var6").isNumber().isOfType(ValueType.NUMBER) - .value("var7").isBoolean().isOfType(ValueType.BOOLEAN) - .value("var8").isBoolean().isOfType(ValueType.BOOLEAN) - .value("var9").isBoolean().isOfType(ValueType.BOOLEAN) - .value("var10").isNumber().isOfType(ValueType.NUMBER) - .value("var11").isNumber().isOfType(ValueType.NUMBER) - .value("var12").isNumber().isOfType(ValueType.NUMBER) - .value("var13").isNumber().isOfType(ValueType.NUMBER) - .value("var14").isNumber().isOfType(ValueType.NUMBER) - .value("var15").isNumber().isOfType(ValueType.NUMBER) - .value("var16").isNumber().isOfType(ValueType.NUMBER) - .value("var17").isNumber().isOfType(ValueType.NUMBER) - .value("var18").isNumber().isOfType(ValueType.NUMBER) - .value("var19").isNumber().isOfType(ValueType.NUMBER) - .value("var20").isNumber().isOfType(ValueType.NUMBER) - .value("var21").isNumber().isOfType(ValueType.NUMBER) - .value("var22").isNumber().isOfType(ValueType.NUMBER) - .value("var23").isNumber().isOfType(ValueType.NUMBER) - .value("var24").isNumber().isOfType(ValueType.NUMBER) - .value("var25").isTime().isOfType(ValueType.TIME) - .value("var26").isDate().isOfType(ValueType.DATE) - .value("var27").isDateTime().isOfType(ValueType.DATE_TIME) - .value("var28").isDateTime().isOfType(ValueType.DATE_TIME) - .value("var29").isDateTime().isOfType(ValueType.DATE_TIME) - .value("var30").isBytes().isOfType(ValueType.BYTES) - .value("var31").isBytes().isOfType(ValueType.BYTES) - .value("var32").isBytes().isOfType(ValueType.BYTES) - .value("var33").isBytes().isOfType(ValueType.BYTES) - .value("var34").isBytes().isOfType(ValueType.BYTES) - .value("var35") - .value("var36").isText().isOfType(ValueType.TEXT) - .value("var37").isText().isOfType(ValueType.TEXT) - .value("var38").isText().isOfType(ValueType.TEXT) - .value("var39").isText().isOfType(ValueType.TEXT) - .value("var40").isText().isOfType(ValueType.TEXT) - .value("var41").isText().isOfType(ValueType.TEXT) - .value("var42").isText().isOfType(ValueType.TEXT) - .value("var43").isText().isOfType(ValueType.TEXT) - .value("var44").isText().isOfType(ValueType.TEXT) - .value("var45").isText().isOfType(ValueType.TEXT) - .value("var46").isBytes().isOfType(ValueType.BYTES) - .value("var47").isBytes().isOfType(ValueType.BYTES) - .value("var48").isBytes().isOfType(ValueType.BYTES) - .value("var49").isBytes().isOfType(ValueType.BYTES) - .value("var50").isBytes().isOfType(ValueType.BYTES) - .value("var51").isBytes().isOfType(ValueType.BYTES) - .value("var52").isText().isOfType(ValueType.TEXT) - .value("var53").isText().isOfType(ValueType.TEXT) - .value("var54").isText().isOfType(ValueType.TEXT) - .value("var55").isText().isOfType(ValueType.TEXT) - .value("var56").isText().isOfType(ValueType.TEXT) - .value("var57").isText().isOfType(ValueType.TEXT) - .value("var58").isText().isOfType(ValueType.TEXT) - .value("var59").isUUID().isOfType(ValueType.UUID) - .value("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) - .value("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) + .value("var1").isNumber().isOfType(ValueType.NUMBER) + .value("var2").isNumber().isOfType(ValueType.NUMBER) + .value("var3").isNumber().isOfType(ValueType.NUMBER) + .value("var4").isNumber().isOfType(ValueType.NUMBER) + .value("var5").isNumber().isOfType(ValueType.NUMBER) + .value("var6").isNumber().isOfType(ValueType.NUMBER) + .value("var7").isBoolean().isOfType(ValueType.BOOLEAN) + .value("var8").isBoolean().isOfType(ValueType.BOOLEAN) + .value("var9").isBoolean().isOfType(ValueType.BOOLEAN) + .value("var10").isNumber().isOfType(ValueType.NUMBER) + .value("var11").isNumber().isOfType(ValueType.NUMBER) + .value("var12").isNumber().isOfType(ValueType.NUMBER) + .value("var13").isNumber().isOfType(ValueType.NUMBER) + .value("var14").isNumber().isOfType(ValueType.NUMBER) + .value("var15").isNumber().isOfType(ValueType.NUMBER) + .value("var16").isNumber().isOfType(ValueType.NUMBER) + .value("var17").isNumber().isOfType(ValueType.NUMBER) + .value("var18").isNumber().isOfType(ValueType.NUMBER) + .value("var19").isNumber().isOfType(ValueType.NUMBER) + .value("var20").isNumber().isOfType(ValueType.NUMBER) + .value("var21").isNumber().isOfType(ValueType.NUMBER) + .value("var22").isNumber().isOfType(ValueType.NUMBER) + .value("var23").isNumber().isOfType(ValueType.NUMBER) + .value("var24").isNumber().isOfType(ValueType.NUMBER) + .value("var25").isTime().isOfType(ValueType.TIME) + .value("var26").isDate().isOfType(ValueType.DATE) + .value("var27").isDateTime().isOfType(ValueType.DATE_TIME) + .value("var28").isDateTime().isOfType(ValueType.DATE_TIME) + .value("var29").isDateTime().isOfType(ValueType.DATE_TIME) + .value("var30").isBytes().isOfType(ValueType.BYTES) + .value("var31").isBytes().isOfType(ValueType.BYTES) + .value("var32").isBytes().isOfType(ValueType.BYTES) + .value("var33").isBytes().isOfType(ValueType.BYTES) + .value("var34").isBytes().isOfType(ValueType.BYTES) + .value("var35") + .value("var36").isText().isOfType(ValueType.TEXT) + .value("var37").isText().isOfType(ValueType.TEXT) + .value("var38").isText().isOfType(ValueType.TEXT) + .value("var39").isText().isOfType(ValueType.TEXT) + .value("var40").isText().isOfType(ValueType.TEXT) + .value("var41").isText().isOfType(ValueType.TEXT) + .value("var42").isText().isOfType(ValueType.TEXT) + .value("var43").isText().isOfType(ValueType.TEXT) + .value("var44").isText().isOfType(ValueType.TEXT) + .value("var45").isText().isOfType(ValueType.TEXT) + .value("var46").isBytes().isOfType(ValueType.BYTES) + .value("var47").isBytes().isOfType(ValueType.BYTES) + .value("var48").isBytes().isOfType(ValueType.BYTES) + .value("var49").isBytes().isOfType(ValueType.BYTES) + .value("var50").isBytes().isOfType(ValueType.BYTES) + .value("var51").isBytes().isOfType(ValueType.BYTES) + .value("var52").isText().isOfType(ValueType.TEXT) + .value("var53").isText().isOfType(ValueType.TEXT) + .value("var54").isText().isOfType(ValueType.TEXT) + .value("var55").isText().isOfType(ValueType.TEXT) + .value("var56").isText().isOfType(ValueType.TEXT) + .value("var57").isText().isOfType(ValueType.TEXT) + .value("var58").isText().isOfType(ValueType.TEXT) + .value("var59").isUUID().isOfType(ValueType.UUID) + .value("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) + .value("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) ; assertThat(changes).change().rowAtStartPoint() - .value("var1").isNumber().isOfType(ValueType.NUMBER) - .value("var2").isNumber().isOfType(ValueType.NUMBER) - .value("var3").isNumber().isOfType(ValueType.NUMBER) - .value("var4").isNumber().isOfType(ValueType.NUMBER) - .value("var5").isNumber().isOfType(ValueType.NUMBER) - .value("var6").isNumber().isOfType(ValueType.NUMBER) - .value("var7").isBoolean().isOfType(ValueType.BOOLEAN) - .value("var8").isBoolean().isOfType(ValueType.BOOLEAN) - .value("var9").isBoolean().isOfType(ValueType.BOOLEAN) - .value("var10").isNumber().isOfType(ValueType.NUMBER) - .value("var11").isNumber().isOfType(ValueType.NUMBER) - .value("var12").isNumber().isOfType(ValueType.NUMBER) - .value("var13").isNumber().isOfType(ValueType.NUMBER) - .value("var14").isNumber().isOfType(ValueType.NUMBER) - .value("var15").isNumber().isOfType(ValueType.NUMBER) - .value("var16").isNumber().isOfType(ValueType.NUMBER) - .value("var17").isNumber().isOfType(ValueType.NUMBER) - .value("var18").isNumber().isOfType(ValueType.NUMBER) - .value("var19").isNumber().isOfType(ValueType.NUMBER) - .value("var20").isNumber().isOfType(ValueType.NUMBER) - .value("var21").isNumber().isOfType(ValueType.NUMBER) - .value("var22").isNumber().isOfType(ValueType.NUMBER) - .value("var23").isNumber().isOfType(ValueType.NUMBER) - .value("var24").isNumber().isOfType(ValueType.NUMBER) - .value("var25").isTime().isOfType(ValueType.TIME) - .value("var26").isDate().isOfType(ValueType.DATE) - .value("var27").isDateTime().isOfType(ValueType.DATE_TIME) - .value("var28").isDateTime().isOfType(ValueType.DATE_TIME) - .value("var29").isDateTime().isOfType(ValueType.DATE_TIME) - .value("var30").isBytes().isOfType(ValueType.BYTES) - .value("var31").isBytes().isOfType(ValueType.BYTES) - .value("var32").isBytes().isOfType(ValueType.BYTES) - .value("var33").isBytes().isOfType(ValueType.BYTES) - .value("var34").isBytes().isOfType(ValueType.BYTES) - .value("var35") - .value("var36").isText().isOfType(ValueType.TEXT) - .value("var37").isText().isOfType(ValueType.TEXT) - .value("var38").isText().isOfType(ValueType.TEXT) - .value("var39").isText().isOfType(ValueType.TEXT) - .value("var40").isText().isOfType(ValueType.TEXT) - .value("var41").isText().isOfType(ValueType.TEXT) - .value("var42").isText().isOfType(ValueType.TEXT) - .value("var43").isText().isOfType(ValueType.TEXT) - .value("var44").isText().isOfType(ValueType.TEXT) - .value("var45").isText().isOfType(ValueType.TEXT) - .value("var46").isBytes().isOfType(ValueType.BYTES) - .value("var47").isBytes().isOfType(ValueType.BYTES) - .value("var48").isBytes().isOfType(ValueType.BYTES) - .value("var49").isBytes().isOfType(ValueType.BYTES) - .value("var50").isBytes().isOfType(ValueType.BYTES) - .value("var51").isBytes().isOfType(ValueType.BYTES) - .value("var52").isText().isOfType(ValueType.TEXT) - .value("var53").isText().isOfType(ValueType.TEXT) - .value("var54").isText().isOfType(ValueType.TEXT) - .value("var55").isText().isOfType(ValueType.TEXT) - .value("var56").isText().isOfType(ValueType.TEXT) - .value("var57").isText().isOfType(ValueType.TEXT) - .value("var58").isText().isOfType(ValueType.TEXT) - .value("var59").isUUID().isOfType(ValueType.UUID) - .value("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) - .value("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) + .value("var1").isNumber().isOfType(ValueType.NUMBER) + .value("var2").isNumber().isOfType(ValueType.NUMBER) + .value("var3").isNumber().isOfType(ValueType.NUMBER) + .value("var4").isNumber().isOfType(ValueType.NUMBER) + .value("var5").isNumber().isOfType(ValueType.NUMBER) + .value("var6").isNumber().isOfType(ValueType.NUMBER) + .value("var7").isBoolean().isOfType(ValueType.BOOLEAN) + .value("var8").isBoolean().isOfType(ValueType.BOOLEAN) + .value("var9").isBoolean().isOfType(ValueType.BOOLEAN) + .value("var10").isNumber().isOfType(ValueType.NUMBER) + .value("var11").isNumber().isOfType(ValueType.NUMBER) + .value("var12").isNumber().isOfType(ValueType.NUMBER) + .value("var13").isNumber().isOfType(ValueType.NUMBER) + .value("var14").isNumber().isOfType(ValueType.NUMBER) + .value("var15").isNumber().isOfType(ValueType.NUMBER) + .value("var16").isNumber().isOfType(ValueType.NUMBER) + .value("var17").isNumber().isOfType(ValueType.NUMBER) + .value("var18").isNumber().isOfType(ValueType.NUMBER) + .value("var19").isNumber().isOfType(ValueType.NUMBER) + .value("var20").isNumber().isOfType(ValueType.NUMBER) + .value("var21").isNumber().isOfType(ValueType.NUMBER) + .value("var22").isNumber().isOfType(ValueType.NUMBER) + .value("var23").isNumber().isOfType(ValueType.NUMBER) + .value("var24").isNumber().isOfType(ValueType.NUMBER) + .value("var25").isTime().isOfType(ValueType.TIME) + .value("var26").isDate().isOfType(ValueType.DATE) + .value("var27").isDateTime().isOfType(ValueType.DATE_TIME) + .value("var28").isDateTime().isOfType(ValueType.DATE_TIME) + .value("var29").isDateTime().isOfType(ValueType.DATE_TIME) + .value("var30").isBytes().isOfType(ValueType.BYTES) + .value("var31").isBytes().isOfType(ValueType.BYTES) + .value("var32").isBytes().isOfType(ValueType.BYTES) + .value("var33").isBytes().isOfType(ValueType.BYTES) + .value("var34").isBytes().isOfType(ValueType.BYTES) + .value("var35") + .value("var36").isText().isOfType(ValueType.TEXT) + .value("var37").isText().isOfType(ValueType.TEXT) + .value("var38").isText().isOfType(ValueType.TEXT) + .value("var39").isText().isOfType(ValueType.TEXT) + .value("var40").isText().isOfType(ValueType.TEXT) + .value("var41").isText().isOfType(ValueType.TEXT) + .value("var42").isText().isOfType(ValueType.TEXT) + .value("var43").isText().isOfType(ValueType.TEXT) + .value("var44").isText().isOfType(ValueType.TEXT) + .value("var45").isText().isOfType(ValueType.TEXT) + .value("var46").isBytes().isOfType(ValueType.BYTES) + .value("var47").isBytes().isOfType(ValueType.BYTES) + .value("var48").isBytes().isOfType(ValueType.BYTES) + .value("var49").isBytes().isOfType(ValueType.BYTES) + .value("var50").isBytes().isOfType(ValueType.BYTES) + .value("var51").isBytes().isOfType(ValueType.BYTES) + .value("var52").isText().isOfType(ValueType.TEXT) + .value("var53").isText().isOfType(ValueType.TEXT) + .value("var54").isText().isOfType(ValueType.TEXT) + .value("var55").isText().isOfType(ValueType.TEXT) + .value("var56").isText().isOfType(ValueType.TEXT) + .value("var57").isText().isOfType(ValueType.TEXT) + .value("var58").isText().isOfType(ValueType.TEXT) + .value("var59").isUUID().isOfType(ValueType.UUID) + .value("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) + .value("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) ; } diff --git a/src/test/java/org/assertj/db/database/h2/H2DataBase_Test.java b/src/test/java/org/assertj/db/database/h2/H2DataBase_Test.java index 8f820ff1..b0514fe7 100644 --- a/src/test/java/org/assertj/db/database/h2/H2DataBase_Test.java +++ b/src/test/java/org/assertj/db/database/h2/H2DataBase_Test.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.database.h2; @@ -71,7 +71,7 @@ public void test_schema_for_source() throws SQLException { public void test_tables_for_data_source() throws SQLException { try (Connection connection = dataSource.getConnection()) { DatabaseMetaData databaseMetaData = connection.getMetaData(); - ResultSet resultSet = databaseMetaData.getTables("TESTH2", null, null, new String[] { "TABLE" }); + ResultSet resultSet = databaseMetaData.getTables("TESTH2", null, null, new String[]{"TABLE"}); assertThat(resultSet.next()).isTrue(); assertThat(resultSet.getString("TABLE_NAME")).isEqualTo("TEST"); assertThat(resultSet.next()).isFalse(); @@ -82,7 +82,7 @@ public void test_tables_for_data_source() throws SQLException { public void test_tables_for_source() throws SQLException { try (Connection connection = DriverManager.getConnection(URL, USER, PASSWORD)) { DatabaseMetaData databaseMetaData = connection.getMetaData(); - ResultSet resultSet = databaseMetaData.getTables("TESTH2", null, null, new String[] { "TABLE" }); + ResultSet resultSet = databaseMetaData.getTables("TESTH2", null, null, new String[]{"TABLE"}); assertThat(resultSet.next()).isTrue(); assertThat(resultSet.getString("TABLE_NAME")).isEqualTo("TEST"); assertThat(resultSet.next()).isFalse(); diff --git a/src/test/java/org/assertj/db/database/h2/H2Database_DataSource_DDD_Test.java b/src/test/java/org/assertj/db/database/h2/H2Database_DataSource_DDD_Test.java index ec0995d3..f8babf80 100644 --- a/src/test/java/org/assertj/db/database/h2/H2Database_DataSource_DDD_Test.java +++ b/src/test/java/org/assertj/db/database/h2/H2Database_DataSource_DDD_Test.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.database.h2; @@ -23,7 +23,6 @@ import java.sql.Timestamp; import java.util.Locale; import java.util.UUID; - import javax.sql.DataSource; import org.assertj.core.api.Assertions; @@ -79,111 +78,111 @@ public void test_Outputs_output() { ByteArrayOutputStream byteArrayOutputStream9 = new ByteArrayOutputStream(); ByteArrayOutputStream byteArrayOutputStream10 = new ByteArrayOutputStream(); Outputs.output(table).toStream(byteArrayOutputStream0) - .column().toStream(byteArrayOutputStream1) - .value().toStream(byteArrayOutputStream2) - .row().toStream(byteArrayOutputStream3) - .value().toStream(byteArrayOutputStream4) + .column().toStream(byteArrayOutputStream1) + .value().toStream(byteArrayOutputStream2) + .row().toStream(byteArrayOutputStream3) + .value().toStream(byteArrayOutputStream4) ; output(changes).toStream(byteArrayOutputStream5) - .change().toStream(byteArrayOutputStream6) - .rowAtEndPoint().toStream(byteArrayOutputStream7) - .value().toStream(byteArrayOutputStream8) - .column().toStream(byteArrayOutputStream9) - .valueAtEndPoint().toStream(byteArrayOutputStream10); + .change().toStream(byteArrayOutputStream6) + .rowAtEndPoint().toStream(byteArrayOutputStream7) + .value().toStream(byteArrayOutputStream8) + .column().toStream(byteArrayOutputStream9) + .valueAtEndPoint().toStream(byteArrayOutputStream10); Assertions.assertThat(byteArrayOutputStream0.toString()).isEqualTo(String.format("[TEST table]%n" - + "|-----------|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" - + "| | | * | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |%n" - + "| | PRIMARY | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 | VAR20 | VAR21 | VAR22 | VAR23 | VAR24 | VAR25 | VAR26 | VAR27 | VAR28 | VAR29 | VAR30 | VAR31 | VAR32 | VAR33 | VAR34 | VAR35 | VAR36 | VAR37 | VAR38 | VAR39 | VAR40 | VAR41 | VAR42 | VAR43 | VAR44 | VAR45 | VAR46 | VAR47 | VAR48 | VAR49 | VAR50 | VAR51 | VAR52 | VAR53 | VAR54 | VAR55 | VAR56 | VAR57 | VAR58 | VAR59 | VAR60 | VAR61 |%n" - + "| | KEY | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (BOOLEAN) | (BOOLEAN) | (BOOLEAN) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TIME) | (DATE) | (DATE_TIME) | (DATE_TIME) | (DATE_TIME) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (NOT_IDENTIFIED : class java.util.Locale) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (UUID) | (NOT_IDENTIFIED) | (NOT_IDENTIFIED) |%n" - + "| | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 | Index : 19 | Index : 20 | Index : 21 | Index : 22 | Index : 23 | Index : 24 | Index : 25 | Index : 26 | Index : 27 | Index : 28 | Index : 29 | Index : 30 | Index : 31 | Index : 32 | Index : 33 | Index : 34 | Index : 35 | Index : 36 | Index : 37 | Index : 38 | Index : 39 | Index : 40 | Index : 41 | Index : 42 | Index : 43 | Index : 44 | Index : 45 | Index : 46 | Index : 47 | Index : 48 | Index : 49 | Index : 50 | Index : 51 | Index : 52 | Index : 53 | Index : 54 | Index : 55 | Index : 56 | Index : 57 | Index : 58 | Index : 59 | Index : 60 |%n" - + "|-----------|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" - + "| Index : 0 | 1 | 1 | 20 | 3 | 4 | 5 | 6 | true | false | true | 7 | 8 | 9 | 10 | 11 | 12 | 13.13 | 14.14 | 15.15 | 16.16 | 17.17 | 18.18 | 19.19 | 20.2 | 21.21 | 09:01:00.000000000 | 2007-12-23 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | ... | ... | ... | ... | ... | fr | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | ... | ... | ... | ... | ... | ... | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 30b443ae-c0c9-4790-9bec-ce1380808435 | null | null |%n" - + "|-----------|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n")); + + "|-----------|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" + + "| | | * | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |%n" + + "| | PRIMARY | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 | VAR20 | VAR21 | VAR22 | VAR23 | VAR24 | VAR25 | VAR26 | VAR27 | VAR28 | VAR29 | VAR30 | VAR31 | VAR32 | VAR33 | VAR34 | VAR35 | VAR36 | VAR37 | VAR38 | VAR39 | VAR40 | VAR41 | VAR42 | VAR43 | VAR44 | VAR45 | VAR46 | VAR47 | VAR48 | VAR49 | VAR50 | VAR51 | VAR52 | VAR53 | VAR54 | VAR55 | VAR56 | VAR57 | VAR58 | VAR59 | VAR60 | VAR61 |%n" + + "| | KEY | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (BOOLEAN) | (BOOLEAN) | (BOOLEAN) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TIME) | (DATE) | (DATE_TIME) | (DATE_TIME) | (DATE_TIME) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (NOT_IDENTIFIED : class java.util.Locale) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (UUID) | (NOT_IDENTIFIED) | (NOT_IDENTIFIED) |%n" + + "| | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 | Index : 19 | Index : 20 | Index : 21 | Index : 22 | Index : 23 | Index : 24 | Index : 25 | Index : 26 | Index : 27 | Index : 28 | Index : 29 | Index : 30 | Index : 31 | Index : 32 | Index : 33 | Index : 34 | Index : 35 | Index : 36 | Index : 37 | Index : 38 | Index : 39 | Index : 40 | Index : 41 | Index : 42 | Index : 43 | Index : 44 | Index : 45 | Index : 46 | Index : 47 | Index : 48 | Index : 49 | Index : 50 | Index : 51 | Index : 52 | Index : 53 | Index : 54 | Index : 55 | Index : 56 | Index : 57 | Index : 58 | Index : 59 | Index : 60 |%n" + + "|-----------|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" + + "| Index : 0 | 1 | 1 | 20 | 3 | 4 | 5 | 6 | true | false | true | 7 | 8 | 9 | 10 | 11 | 12 | 13.13 | 14.14 | 15.15 | 16.16 | 17.17 | 18.18 | 19.19 | 20.2 | 21.21 | 09:01:00.000000000 | 2007-12-23 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | ... | ... | ... | ... | ... | fr | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | ... | ... | ... | ... | ... | ... | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 30b443ae-c0c9-4790-9bec-ce1380808435 | null | null |%n" + + "|-----------|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n")); Assertions.assertThat(byteArrayOutputStream1.toString()).isEqualTo(String.format("[Column at index 0 (column name : VAR1) of TEST table]%n" - + "|-----------|----------|%n" - + "| | VAR1 |%n" - + "| | (NUMBER) |%n" - + "|-----------|----------|%n" - + "| Index : 0 | 1 |%n" - + "|-----------|----------|%n")); + + "|-----------|----------|%n" + + "| | VAR1 |%n" + + "| | (NUMBER) |%n" + + "|-----------|----------|%n" + + "| Index : 0 | 1 |%n" + + "|-----------|----------|%n")); Assertions.assertThat(byteArrayOutputStream2.toString()).isEqualTo(String.format("[Value at index 0 of Column at index 0 (column name : VAR1) of TEST table]%n" - + "|----------|%n" - + "| VAR1 |%n" - + "| (NUMBER) |%n" - + "|----------|%n" - + "| 1 |%n" - + "|----------|%n")); + + "|----------|%n" + + "| VAR1 |%n" + + "| (NUMBER) |%n" + + "|----------|%n" + + "| 1 |%n" + + "|----------|%n")); Assertions.assertThat(byteArrayOutputStream3.toString()).isEqualTo(String.format("[Row at index 0 of TEST table]%n" - + "|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" - + "| | * | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |%n" - + "| PRIMARY | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 | VAR20 | VAR21 | VAR22 | VAR23 | VAR24 | VAR25 | VAR26 | VAR27 | VAR28 | VAR29 | VAR30 | VAR31 | VAR32 | VAR33 | VAR34 | VAR35 | VAR36 | VAR37 | VAR38 | VAR39 | VAR40 | VAR41 | VAR42 | VAR43 | VAR44 | VAR45 | VAR46 | VAR47 | VAR48 | VAR49 | VAR50 | VAR51 | VAR52 | VAR53 | VAR54 | VAR55 | VAR56 | VAR57 | VAR58 | VAR59 | VAR60 | VAR61 |%n" - + "| KEY | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (BOOLEAN) | (BOOLEAN) | (BOOLEAN) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TIME) | (DATE) | (DATE_TIME) | (DATE_TIME) | (DATE_TIME) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (NOT_IDENTIFIED : class java.util.Locale) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (UUID) | (NOT_IDENTIFIED) | (NOT_IDENTIFIED) |%n" - + "| | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 | Index : 19 | Index : 20 | Index : 21 | Index : 22 | Index : 23 | Index : 24 | Index : 25 | Index : 26 | Index : 27 | Index : 28 | Index : 29 | Index : 30 | Index : 31 | Index : 32 | Index : 33 | Index : 34 | Index : 35 | Index : 36 | Index : 37 | Index : 38 | Index : 39 | Index : 40 | Index : 41 | Index : 42 | Index : 43 | Index : 44 | Index : 45 | Index : 46 | Index : 47 | Index : 48 | Index : 49 | Index : 50 | Index : 51 | Index : 52 | Index : 53 | Index : 54 | Index : 55 | Index : 56 | Index : 57 | Index : 58 | Index : 59 | Index : 60 |%n" - + "|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" - + "| 1 | 1 | 20 | 3 | 4 | 5 | 6 | true | false | true | 7 | 8 | 9 | 10 | 11 | 12 | 13.13 | 14.14 | 15.15 | 16.16 | 17.17 | 18.18 | 19.19 | 20.2 | 21.21 | 09:01:00.000000000 | 2007-12-23 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | ... | ... | ... | ... | ... | fr | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | ... | ... | ... | ... | ... | ... | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 30b443ae-c0c9-4790-9bec-ce1380808435 | null | null |%n" - + "|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n")); + + "|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" + + "| | * | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |%n" + + "| PRIMARY | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 | VAR20 | VAR21 | VAR22 | VAR23 | VAR24 | VAR25 | VAR26 | VAR27 | VAR28 | VAR29 | VAR30 | VAR31 | VAR32 | VAR33 | VAR34 | VAR35 | VAR36 | VAR37 | VAR38 | VAR39 | VAR40 | VAR41 | VAR42 | VAR43 | VAR44 | VAR45 | VAR46 | VAR47 | VAR48 | VAR49 | VAR50 | VAR51 | VAR52 | VAR53 | VAR54 | VAR55 | VAR56 | VAR57 | VAR58 | VAR59 | VAR60 | VAR61 |%n" + + "| KEY | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (BOOLEAN) | (BOOLEAN) | (BOOLEAN) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TIME) | (DATE) | (DATE_TIME) | (DATE_TIME) | (DATE_TIME) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (NOT_IDENTIFIED : class java.util.Locale) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (UUID) | (NOT_IDENTIFIED) | (NOT_IDENTIFIED) |%n" + + "| | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 | Index : 19 | Index : 20 | Index : 21 | Index : 22 | Index : 23 | Index : 24 | Index : 25 | Index : 26 | Index : 27 | Index : 28 | Index : 29 | Index : 30 | Index : 31 | Index : 32 | Index : 33 | Index : 34 | Index : 35 | Index : 36 | Index : 37 | Index : 38 | Index : 39 | Index : 40 | Index : 41 | Index : 42 | Index : 43 | Index : 44 | Index : 45 | Index : 46 | Index : 47 | Index : 48 | Index : 49 | Index : 50 | Index : 51 | Index : 52 | Index : 53 | Index : 54 | Index : 55 | Index : 56 | Index : 57 | Index : 58 | Index : 59 | Index : 60 |%n" + + "|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" + + "| 1 | 1 | 20 | 3 | 4 | 5 | 6 | true | false | true | 7 | 8 | 9 | 10 | 11 | 12 | 13.13 | 14.14 | 15.15 | 16.16 | 17.17 | 18.18 | 19.19 | 20.2 | 21.21 | 09:01:00.000000000 | 2007-12-23 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | ... | ... | ... | ... | ... | fr | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | ... | ... | ... | ... | ... | ... | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 30b443ae-c0c9-4790-9bec-ce1380808435 | null | null |%n" + + "|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n")); Assertions.assertThat(byteArrayOutputStream4.toString()).isEqualTo(String.format("[Value at index 0 (column name : VAR1) of Row at index 0 of TEST table]%n" - + "|----------|%n" - + "| VAR1 |%n" - + "| (NUMBER) |%n" - + "|----------|%n" - + "| 1 |%n" - + "|----------|%n")); + + "|----------|%n" + + "| VAR1 |%n" + + "| (NUMBER) |%n" + + "|----------|%n" + + "| 1 |%n" + + "|----------|%n")); Assertions.assertThat(byteArrayOutputStream5.toString()).isEqualTo(String.format("[Changes on TEST table of a data source]%n" - + "|-----------|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" - + "| | | | | | * | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |%n" - + "| | TYPE | TABLE | PRIMARY | | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 | VAR20 | VAR21 | VAR22 | VAR23 | VAR24 | VAR25 | VAR26 | VAR27 | VAR28 | VAR29 | VAR30 | VAR31 | VAR32 | VAR33 | VAR34 | VAR35 | VAR36 | VAR37 | VAR38 | VAR39 | VAR40 | VAR41 | VAR42 | VAR43 | VAR44 | VAR45 | VAR46 | VAR47 | VAR48 | VAR49 | VAR50 | VAR51 | VAR52 | VAR53 | VAR54 | VAR55 | VAR56 | VAR57 | VAR58 | VAR59 | VAR60 | VAR61 |%n" - + "| | | | KEY | | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (BOOLEAN) | (BOOLEAN) | (BOOLEAN) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TIME) | (DATE) | (DATE_TIME) | (DATE_TIME) | (DATE_TIME) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (NOT_IDENTIFIED : class java.util.Locale) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (UUID) | (NOT_IDENTIFIED) | (NOT_IDENTIFIED) |%n" - + "| | | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 | Index : 19 | Index : 20 | Index : 21 | Index : 22 | Index : 23 | Index : 24 | Index : 25 | Index : 26 | Index : 27 | Index : 28 | Index : 29 | Index : 30 | Index : 31 | Index : 32 | Index : 33 | Index : 34 | Index : 35 | Index : 36 | Index : 37 | Index : 38 | Index : 39 | Index : 40 | Index : 41 | Index : 42 | Index : 43 | Index : 44 | Index : 45 | Index : 46 | Index : 47 | Index : 48 | Index : 49 | Index : 50 | Index : 51 | Index : 52 | Index : 53 | Index : 54 | Index : 55 | Index : 56 | Index : 57 | Index : 58 | Index : 59 | Index : 60 |%n" - + "|-----------|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" - + "| | | | | At start point | 1 | 2 | 3 | 4 | 5 | 6 | true | false | true | 7 | 8 | 9 | 10 | 11 | 12 | 13.13 | 14.14 | 15.15 | 16.16 | 17.17 | 18.18 | 19.19 | 20.2 | 21.21 | 09:01:00.000000000 | 2007-12-23 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | ... | ... | ... | ... | ... | fr | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | ... | ... | ... | ... | ... | ... | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 30b443ae-c0c9-4790-9bec-ce1380808435 | null | null |%n" - + "| Index : 0 | MODIFICATION | TEST | 1 |----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" - + "| | | | | At end point | 1 | 20 | 3 | 4 | 5 | 6 | true | false | true | 7 | 8 | 9 | 10 | 11 | 12 | 13.13 | 14.14 | 15.15 | 16.16 | 17.17 | 18.18 | 19.19 | 20.2 | 21.21 | 09:01:00.000000000 | 2007-12-23 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | ... | ... | ... | ... | ... | fr | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | ... | ... | ... | ... | ... | ... | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 30b443ae-c0c9-4790-9bec-ce1380808435 | null | null |%n" - + "|-----------|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n")); + + "|-----------|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" + + "| | | | | | * | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |%n" + + "| | TYPE | TABLE | PRIMARY | | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 | VAR20 | VAR21 | VAR22 | VAR23 | VAR24 | VAR25 | VAR26 | VAR27 | VAR28 | VAR29 | VAR30 | VAR31 | VAR32 | VAR33 | VAR34 | VAR35 | VAR36 | VAR37 | VAR38 | VAR39 | VAR40 | VAR41 | VAR42 | VAR43 | VAR44 | VAR45 | VAR46 | VAR47 | VAR48 | VAR49 | VAR50 | VAR51 | VAR52 | VAR53 | VAR54 | VAR55 | VAR56 | VAR57 | VAR58 | VAR59 | VAR60 | VAR61 |%n" + + "| | | | KEY | | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (BOOLEAN) | (BOOLEAN) | (BOOLEAN) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TIME) | (DATE) | (DATE_TIME) | (DATE_TIME) | (DATE_TIME) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (NOT_IDENTIFIED : class java.util.Locale) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (UUID) | (NOT_IDENTIFIED) | (NOT_IDENTIFIED) |%n" + + "| | | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 | Index : 19 | Index : 20 | Index : 21 | Index : 22 | Index : 23 | Index : 24 | Index : 25 | Index : 26 | Index : 27 | Index : 28 | Index : 29 | Index : 30 | Index : 31 | Index : 32 | Index : 33 | Index : 34 | Index : 35 | Index : 36 | Index : 37 | Index : 38 | Index : 39 | Index : 40 | Index : 41 | Index : 42 | Index : 43 | Index : 44 | Index : 45 | Index : 46 | Index : 47 | Index : 48 | Index : 49 | Index : 50 | Index : 51 | Index : 52 | Index : 53 | Index : 54 | Index : 55 | Index : 56 | Index : 57 | Index : 58 | Index : 59 | Index : 60 |%n" + + "|-----------|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" + + "| | | | | At start point | 1 | 2 | 3 | 4 | 5 | 6 | true | false | true | 7 | 8 | 9 | 10 | 11 | 12 | 13.13 | 14.14 | 15.15 | 16.16 | 17.17 | 18.18 | 19.19 | 20.2 | 21.21 | 09:01:00.000000000 | 2007-12-23 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | ... | ... | ... | ... | ... | fr | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | ... | ... | ... | ... | ... | ... | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 30b443ae-c0c9-4790-9bec-ce1380808435 | null | null |%n" + + "| Index : 0 | MODIFICATION | TEST | 1 |----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" + + "| | | | | At end point | 1 | 20 | 3 | 4 | 5 | 6 | true | false | true | 7 | 8 | 9 | 10 | 11 | 12 | 13.13 | 14.14 | 15.15 | 16.16 | 17.17 | 18.18 | 19.19 | 20.2 | 21.21 | 09:01:00.000000000 | 2007-12-23 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | ... | ... | ... | ... | ... | fr | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | ... | ... | ... | ... | ... | ... | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 30b443ae-c0c9-4790-9bec-ce1380808435 | null | null |%n" + + "|-----------|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n")); Assertions.assertThat(byteArrayOutputStream6.toString()).isEqualTo(String.format("[Change at index 0 (with primary key : [1]) of Changes on TEST table of a data source]%n" - + "|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" - + "| | | | | * | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |%n" - + "| TYPE | TABLE | PRIMARY | | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 | VAR20 | VAR21 | VAR22 | VAR23 | VAR24 | VAR25 | VAR26 | VAR27 | VAR28 | VAR29 | VAR30 | VAR31 | VAR32 | VAR33 | VAR34 | VAR35 | VAR36 | VAR37 | VAR38 | VAR39 | VAR40 | VAR41 | VAR42 | VAR43 | VAR44 | VAR45 | VAR46 | VAR47 | VAR48 | VAR49 | VAR50 | VAR51 | VAR52 | VAR53 | VAR54 | VAR55 | VAR56 | VAR57 | VAR58 | VAR59 | VAR60 | VAR61 |%n" - + "| | | KEY | | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (BOOLEAN) | (BOOLEAN) | (BOOLEAN) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TIME) | (DATE) | (DATE_TIME) | (DATE_TIME) | (DATE_TIME) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (NOT_IDENTIFIED : class java.util.Locale) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (UUID) | (NOT_IDENTIFIED) | (NOT_IDENTIFIED) |%n" - + "| | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 | Index : 19 | Index : 20 | Index : 21 | Index : 22 | Index : 23 | Index : 24 | Index : 25 | Index : 26 | Index : 27 | Index : 28 | Index : 29 | Index : 30 | Index : 31 | Index : 32 | Index : 33 | Index : 34 | Index : 35 | Index : 36 | Index : 37 | Index : 38 | Index : 39 | Index : 40 | Index : 41 | Index : 42 | Index : 43 | Index : 44 | Index : 45 | Index : 46 | Index : 47 | Index : 48 | Index : 49 | Index : 50 | Index : 51 | Index : 52 | Index : 53 | Index : 54 | Index : 55 | Index : 56 | Index : 57 | Index : 58 | Index : 59 | Index : 60 |%n" - + "|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" - + "| | | | At start point | 1 | 2 | 3 | 4 | 5 | 6 | true | false | true | 7 | 8 | 9 | 10 | 11 | 12 | 13.13 | 14.14 | 15.15 | 16.16 | 17.17 | 18.18 | 19.19 | 20.2 | 21.21 | 09:01:00.000000000 | 2007-12-23 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | ... | ... | ... | ... | ... | fr | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | ... | ... | ... | ... | ... | ... | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 30b443ae-c0c9-4790-9bec-ce1380808435 | null | null |%n" - + "| MODIFICATION | TEST | 1 |----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" - + "| | | | At end point | 1 | 20 | 3 | 4 | 5 | 6 | true | false | true | 7 | 8 | 9 | 10 | 11 | 12 | 13.13 | 14.14 | 15.15 | 16.16 | 17.17 | 18.18 | 19.19 | 20.2 | 21.21 | 09:01:00.000000000 | 2007-12-23 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | ... | ... | ... | ... | ... | fr | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | ... | ... | ... | ... | ... | ... | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 30b443ae-c0c9-4790-9bec-ce1380808435 | null | null |%n" - + "|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n")); + + "|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" + + "| | | | | * | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |%n" + + "| TYPE | TABLE | PRIMARY | | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 | VAR20 | VAR21 | VAR22 | VAR23 | VAR24 | VAR25 | VAR26 | VAR27 | VAR28 | VAR29 | VAR30 | VAR31 | VAR32 | VAR33 | VAR34 | VAR35 | VAR36 | VAR37 | VAR38 | VAR39 | VAR40 | VAR41 | VAR42 | VAR43 | VAR44 | VAR45 | VAR46 | VAR47 | VAR48 | VAR49 | VAR50 | VAR51 | VAR52 | VAR53 | VAR54 | VAR55 | VAR56 | VAR57 | VAR58 | VAR59 | VAR60 | VAR61 |%n" + + "| | | KEY | | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (BOOLEAN) | (BOOLEAN) | (BOOLEAN) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TIME) | (DATE) | (DATE_TIME) | (DATE_TIME) | (DATE_TIME) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (NOT_IDENTIFIED : class java.util.Locale) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (UUID) | (NOT_IDENTIFIED) | (NOT_IDENTIFIED) |%n" + + "| | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 | Index : 19 | Index : 20 | Index : 21 | Index : 22 | Index : 23 | Index : 24 | Index : 25 | Index : 26 | Index : 27 | Index : 28 | Index : 29 | Index : 30 | Index : 31 | Index : 32 | Index : 33 | Index : 34 | Index : 35 | Index : 36 | Index : 37 | Index : 38 | Index : 39 | Index : 40 | Index : 41 | Index : 42 | Index : 43 | Index : 44 | Index : 45 | Index : 46 | Index : 47 | Index : 48 | Index : 49 | Index : 50 | Index : 51 | Index : 52 | Index : 53 | Index : 54 | Index : 55 | Index : 56 | Index : 57 | Index : 58 | Index : 59 | Index : 60 |%n" + + "|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" + + "| | | | At start point | 1 | 2 | 3 | 4 | 5 | 6 | true | false | true | 7 | 8 | 9 | 10 | 11 | 12 | 13.13 | 14.14 | 15.15 | 16.16 | 17.17 | 18.18 | 19.19 | 20.2 | 21.21 | 09:01:00.000000000 | 2007-12-23 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | ... | ... | ... | ... | ... | fr | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | ... | ... | ... | ... | ... | ... | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 30b443ae-c0c9-4790-9bec-ce1380808435 | null | null |%n" + + "| MODIFICATION | TEST | 1 |----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" + + "| | | | At end point | 1 | 20 | 3 | 4 | 5 | 6 | true | false | true | 7 | 8 | 9 | 10 | 11 | 12 | 13.13 | 14.14 | 15.15 | 16.16 | 17.17 | 18.18 | 19.19 | 20.2 | 21.21 | 09:01:00.000000000 | 2007-12-23 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | ... | ... | ... | ... | ... | fr | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | ... | ... | ... | ... | ... | ... | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 30b443ae-c0c9-4790-9bec-ce1380808435 | null | null |%n" + + "|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n")); Assertions.assertThat(byteArrayOutputStream7.toString()).isEqualTo(String.format("[Row at end point of Change at index 0 (with primary key : [1]) of Changes on TEST table of a data source]%n" - + "|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" - + "| | * | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |%n" - + "| PRIMARY | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 | VAR20 | VAR21 | VAR22 | VAR23 | VAR24 | VAR25 | VAR26 | VAR27 | VAR28 | VAR29 | VAR30 | VAR31 | VAR32 | VAR33 | VAR34 | VAR35 | VAR36 | VAR37 | VAR38 | VAR39 | VAR40 | VAR41 | VAR42 | VAR43 | VAR44 | VAR45 | VAR46 | VAR47 | VAR48 | VAR49 | VAR50 | VAR51 | VAR52 | VAR53 | VAR54 | VAR55 | VAR56 | VAR57 | VAR58 | VAR59 | VAR60 | VAR61 |%n" - + "| KEY | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (BOOLEAN) | (BOOLEAN) | (BOOLEAN) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TIME) | (DATE) | (DATE_TIME) | (DATE_TIME) | (DATE_TIME) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (NOT_IDENTIFIED : class java.util.Locale) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (UUID) | (NOT_IDENTIFIED) | (NOT_IDENTIFIED) |%n" - + "| | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 | Index : 19 | Index : 20 | Index : 21 | Index : 22 | Index : 23 | Index : 24 | Index : 25 | Index : 26 | Index : 27 | Index : 28 | Index : 29 | Index : 30 | Index : 31 | Index : 32 | Index : 33 | Index : 34 | Index : 35 | Index : 36 | Index : 37 | Index : 38 | Index : 39 | Index : 40 | Index : 41 | Index : 42 | Index : 43 | Index : 44 | Index : 45 | Index : 46 | Index : 47 | Index : 48 | Index : 49 | Index : 50 | Index : 51 | Index : 52 | Index : 53 | Index : 54 | Index : 55 | Index : 56 | Index : 57 | Index : 58 | Index : 59 | Index : 60 |%n" - + "|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" - + "| 1 | 1 | 20 | 3 | 4 | 5 | 6 | true | false | true | 7 | 8 | 9 | 10 | 11 | 12 | 13.13 | 14.14 | 15.15 | 16.16 | 17.17 | 18.18 | 19.19 | 20.2 | 21.21 | 09:01:00.000000000 | 2007-12-23 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | ... | ... | ... | ... | ... | fr | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | ... | ... | ... | ... | ... | ... | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 30b443ae-c0c9-4790-9bec-ce1380808435 | null | null |%n" - + "|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n")); + + "|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" + + "| | * | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |%n" + + "| PRIMARY | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 | VAR20 | VAR21 | VAR22 | VAR23 | VAR24 | VAR25 | VAR26 | VAR27 | VAR28 | VAR29 | VAR30 | VAR31 | VAR32 | VAR33 | VAR34 | VAR35 | VAR36 | VAR37 | VAR38 | VAR39 | VAR40 | VAR41 | VAR42 | VAR43 | VAR44 | VAR45 | VAR46 | VAR47 | VAR48 | VAR49 | VAR50 | VAR51 | VAR52 | VAR53 | VAR54 | VAR55 | VAR56 | VAR57 | VAR58 | VAR59 | VAR60 | VAR61 |%n" + + "| KEY | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (BOOLEAN) | (BOOLEAN) | (BOOLEAN) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TIME) | (DATE) | (DATE_TIME) | (DATE_TIME) | (DATE_TIME) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (NOT_IDENTIFIED : class java.util.Locale) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (UUID) | (NOT_IDENTIFIED) | (NOT_IDENTIFIED) |%n" + + "| | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 | Index : 19 | Index : 20 | Index : 21 | Index : 22 | Index : 23 | Index : 24 | Index : 25 | Index : 26 | Index : 27 | Index : 28 | Index : 29 | Index : 30 | Index : 31 | Index : 32 | Index : 33 | Index : 34 | Index : 35 | Index : 36 | Index : 37 | Index : 38 | Index : 39 | Index : 40 | Index : 41 | Index : 42 | Index : 43 | Index : 44 | Index : 45 | Index : 46 | Index : 47 | Index : 48 | Index : 49 | Index : 50 | Index : 51 | Index : 52 | Index : 53 | Index : 54 | Index : 55 | Index : 56 | Index : 57 | Index : 58 | Index : 59 | Index : 60 |%n" + + "|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" + + "| 1 | 1 | 20 | 3 | 4 | 5 | 6 | true | false | true | 7 | 8 | 9 | 10 | 11 | 12 | 13.13 | 14.14 | 15.15 | 16.16 | 17.17 | 18.18 | 19.19 | 20.2 | 21.21 | 09:01:00.000000000 | 2007-12-23 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | ... | ... | ... | ... | ... | fr | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | ... | ... | ... | ... | ... | ... | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 30b443ae-c0c9-4790-9bec-ce1380808435 | null | null |%n" + + "|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n")); Assertions.assertThat(byteArrayOutputStream8.toString()).isEqualTo(String.format("[Value at index 0 (column name : VAR1) of Row at end point of Change at index 0 (with primary key : [1]) of Changes on TEST table of a data source]%n" - + "|----------|%n" - + "| VAR1 |%n" - + "| (NUMBER) |%n" - + "|----------|%n" - + "| 1 |%n" - + "|----------|%n")); + + "|----------|%n" + + "| VAR1 |%n" + + "| (NUMBER) |%n" + + "|----------|%n" + + "| 1 |%n" + + "|----------|%n")); Assertions.assertThat(byteArrayOutputStream9.toString()).isEqualTo(String.format("[Column at index 0 (column name : VAR1) of Change at index 0 (with primary key : [1]) of Changes on TEST table of a data source]%n" - + "|----------------|----------|%n" - + "| | VAR1 |%n" - + "| | (NUMBER) |%n" - + "|----------------|----------|%n" - + "| At start point | 1 |%n" - + "|----------------|----------|%n" - + "| At end point | 1 |%n" - + "|----------------|----------|%n")); + + "|----------------|----------|%n" + + "| | VAR1 |%n" + + "| | (NUMBER) |%n" + + "|----------------|----------|%n" + + "| At start point | 1 |%n" + + "|----------------|----------|%n" + + "| At end point | 1 |%n" + + "|----------------|----------|%n")); Assertions.assertThat(byteArrayOutputStream10.toString()).isEqualTo(String.format("[Value at end point of Column at index 0 (column name : VAR1) of Change at index 0 (with primary key : [1]) of Changes on TEST table of a data source]%n" - + "|----------|%n" - + "| VAR1 |%n" - + "| (NUMBER) |%n" - + "|----------|%n" - + "| 1 |%n" - + "|----------|%n")); + + "|----------|%n" + + "| VAR1 |%n" + + "| (NUMBER) |%n" + + "|----------|%n" + + "| 1 |%n" + + "|----------|%n")); } @Test @@ -207,131 +206,131 @@ public void test_ColumnName_hasColumnName() { changes.setEndPointNow(); assertThat(table) - .column().hasColumnName("var1") - .column().hasColumnName("var2") - .column().hasColumnName("var3") - .column().hasColumnName("var4") - .column().hasColumnName("var5") - .column().hasColumnName("var6") - .column().hasColumnName("var7") - .column().hasColumnName("var8") - .column().hasColumnName("var9") - .column().hasColumnName("var10") - .column().hasColumnName("var11") - .column().hasColumnName("var12") - .column().hasColumnName("var13") - .column().hasColumnName("var14") - .column().hasColumnName("var15") - .column().hasColumnName("var16") - .column().hasColumnName("var17") - .column().hasColumnName("var18") - .column().hasColumnName("var19") - .column().hasColumnName("var20") - .column().hasColumnName("var21") - .column().hasColumnName("var22") - .column().hasColumnName("var23") - .column().hasColumnName("var24") - .column().hasColumnName("var25") - .column().hasColumnName("var26") - .column().hasColumnName("var27") - .column().hasColumnName("var28") - .column().hasColumnName("var29") - .column().hasColumnName("var30") - .column().hasColumnName("var31") - .column().hasColumnName("var32") - .column().hasColumnName("var33") - .column().hasColumnName("var34") - .column().hasColumnName("var35") - .column().hasColumnName("var36") - .column().hasColumnName("var37") - .column().hasColumnName("var38") - .column().hasColumnName("var39") - .column().hasColumnName("var40") - .column().hasColumnName("var41") - .column().hasColumnName("var42") - .column().hasColumnName("var43") - .column().hasColumnName("var44") - .column().hasColumnName("var45") - .column().hasColumnName("var46") - .column().hasColumnName("var47") - .column().hasColumnName("var48") - .column().hasColumnName("var49") - .column().hasColumnName("var50") - .column().hasColumnName("var51") - .column().hasColumnName("var52") - .column().hasColumnName("var53") - .column().hasColumnName("var54") - .column().hasColumnName("var55") - .column().hasColumnName("var56") - .column().hasColumnName("var57") - .column().hasColumnName("var58") - .column().hasColumnName("var59") - .column().hasColumnName("var60") - .column().hasColumnName("var61") + .column().hasColumnName("var1") + .column().hasColumnName("var2") + .column().hasColumnName("var3") + .column().hasColumnName("var4") + .column().hasColumnName("var5") + .column().hasColumnName("var6") + .column().hasColumnName("var7") + .column().hasColumnName("var8") + .column().hasColumnName("var9") + .column().hasColumnName("var10") + .column().hasColumnName("var11") + .column().hasColumnName("var12") + .column().hasColumnName("var13") + .column().hasColumnName("var14") + .column().hasColumnName("var15") + .column().hasColumnName("var16") + .column().hasColumnName("var17") + .column().hasColumnName("var18") + .column().hasColumnName("var19") + .column().hasColumnName("var20") + .column().hasColumnName("var21") + .column().hasColumnName("var22") + .column().hasColumnName("var23") + .column().hasColumnName("var24") + .column().hasColumnName("var25") + .column().hasColumnName("var26") + .column().hasColumnName("var27") + .column().hasColumnName("var28") + .column().hasColumnName("var29") + .column().hasColumnName("var30") + .column().hasColumnName("var31") + .column().hasColumnName("var32") + .column().hasColumnName("var33") + .column().hasColumnName("var34") + .column().hasColumnName("var35") + .column().hasColumnName("var36") + .column().hasColumnName("var37") + .column().hasColumnName("var38") + .column().hasColumnName("var39") + .column().hasColumnName("var40") + .column().hasColumnName("var41") + .column().hasColumnName("var42") + .column().hasColumnName("var43") + .column().hasColumnName("var44") + .column().hasColumnName("var45") + .column().hasColumnName("var46") + .column().hasColumnName("var47") + .column().hasColumnName("var48") + .column().hasColumnName("var49") + .column().hasColumnName("var50") + .column().hasColumnName("var51") + .column().hasColumnName("var52") + .column().hasColumnName("var53") + .column().hasColumnName("var54") + .column().hasColumnName("var55") + .column().hasColumnName("var56") + .column().hasColumnName("var57") + .column().hasColumnName("var58") + .column().hasColumnName("var59") + .column().hasColumnName("var60") + .column().hasColumnName("var61") ; assertThat(changes).change() - .column().hasColumnName("var1") - .column().hasColumnName("var2") - .column().hasColumnName("var3") - .column().hasColumnName("var4") - .column().hasColumnName("var5") - .column().hasColumnName("var6") - .column().hasColumnName("var7") - .column().hasColumnName("var8") - .column().hasColumnName("var9") - .column().hasColumnName("var10") - .column().hasColumnName("var11") - .column().hasColumnName("var12") - .column().hasColumnName("var13") - .column().hasColumnName("var14") - .column().hasColumnName("var15") - .column().hasColumnName("var16") - .column().hasColumnName("var17") - .column().hasColumnName("var18") - .column().hasColumnName("var19") - .column().hasColumnName("var20") - .column().hasColumnName("var21") - .column().hasColumnName("var22") - .column().hasColumnName("var23") - .column().hasColumnName("var24") - .column().hasColumnName("var25") - .column().hasColumnName("var26") - .column().hasColumnName("var27") - .column().hasColumnName("var28") - .column().hasColumnName("var29") - .column().hasColumnName("var30") - .column().hasColumnName("var31") - .column().hasColumnName("var32") - .column().hasColumnName("var33") - .column().hasColumnName("var34") - .column().hasColumnName("var35") - .column().hasColumnName("var36") - .column().hasColumnName("var37") - .column().hasColumnName("var38") - .column().hasColumnName("var39") - .column().hasColumnName("var40") - .column().hasColumnName("var41") - .column().hasColumnName("var42") - .column().hasColumnName("var43") - .column().hasColumnName("var44") - .column().hasColumnName("var45") - .column().hasColumnName("var46") - .column().hasColumnName("var47") - .column().hasColumnName("var48") - .column().hasColumnName("var49") - .column().hasColumnName("var50") - .column().hasColumnName("var51") - .column().hasColumnName("var52") - .column().hasColumnName("var53") - .column().hasColumnName("var54") - .column().hasColumnName("var55") - .column().hasColumnName("var56") - .column().hasColumnName("var57") - .column().hasColumnName("var58") - .column().hasColumnName("var59") - .column().hasColumnName("var60") - .column().hasColumnName("var61") + .column().hasColumnName("var1") + .column().hasColumnName("var2") + .column().hasColumnName("var3") + .column().hasColumnName("var4") + .column().hasColumnName("var5") + .column().hasColumnName("var6") + .column().hasColumnName("var7") + .column().hasColumnName("var8") + .column().hasColumnName("var9") + .column().hasColumnName("var10") + .column().hasColumnName("var11") + .column().hasColumnName("var12") + .column().hasColumnName("var13") + .column().hasColumnName("var14") + .column().hasColumnName("var15") + .column().hasColumnName("var16") + .column().hasColumnName("var17") + .column().hasColumnName("var18") + .column().hasColumnName("var19") + .column().hasColumnName("var20") + .column().hasColumnName("var21") + .column().hasColumnName("var22") + .column().hasColumnName("var23") + .column().hasColumnName("var24") + .column().hasColumnName("var25") + .column().hasColumnName("var26") + .column().hasColumnName("var27") + .column().hasColumnName("var28") + .column().hasColumnName("var29") + .column().hasColumnName("var30") + .column().hasColumnName("var31") + .column().hasColumnName("var32") + .column().hasColumnName("var33") + .column().hasColumnName("var34") + .column().hasColumnName("var35") + .column().hasColumnName("var36") + .column().hasColumnName("var37") + .column().hasColumnName("var38") + .column().hasColumnName("var39") + .column().hasColumnName("var40") + .column().hasColumnName("var41") + .column().hasColumnName("var42") + .column().hasColumnName("var43") + .column().hasColumnName("var44") + .column().hasColumnName("var45") + .column().hasColumnName("var46") + .column().hasColumnName("var47") + .column().hasColumnName("var48") + .column().hasColumnName("var49") + .column().hasColumnName("var50") + .column().hasColumnName("var51") + .column().hasColumnName("var52") + .column().hasColumnName("var53") + .column().hasColumnName("var54") + .column().hasColumnName("var55") + .column().hasColumnName("var56") + .column().hasColumnName("var57") + .column().hasColumnName("var58") + .column().hasColumnName("var59") + .column().hasColumnName("var60") + .column().hasColumnName("var61") ; } @@ -344,131 +343,131 @@ public void test_ColumnClass_isOfClass() { changes.setEndPointNow(); assertThat(table) - .column("var1").isOfClass(Long.class, false) - .column("var2").isOfClass(Integer.class, false) - .column("var3").isOfClass(Integer.class, false) - .column("var4").isOfClass(Integer.class, false) - .column("var5").isOfClass(Integer.class, false) - .column("var6").isOfClass(Integer.class, false) - .column("var7").isOfClass(Boolean.class, false) - .column("var8").isOfClass(Boolean.class, false) - .column("var9").isOfClass(Boolean.class, false) - .column("var10").isOfClass(Byte.class, false) - .column("var11").isOfClass(Short.class, false) - .column("var12").isOfClass(Short.class, false) - .column("var13").isOfClass(Short.class, false) - .column("var14").isOfClass(Long.class, false) - .column("var15").isOfClass(Long.class, false) - .column("var16").isOfClass(BigDecimal.class, false) - .column("var17").isOfClass(BigDecimal.class, false) - .column("var18").isOfClass(BigDecimal.class, false) - .column("var19").isOfClass(BigDecimal.class, false) - .column("var20").isOfClass(Double.class, false) - .column("var21").isOfClass(Double.class, false) - .column("var22").isOfClass(Double.class, false) - .column("var23").isOfClass(Float.class, false) - .column("var24").isOfClass(Float.class, false) - .column("var25").isOfClass(Time.class, false) - .column("var26").isOfClass(Date.class, false) - .column("var27").isOfClass(Timestamp.class, false) - .column("var28").isOfClass(Timestamp.class, false) - .column("var29").isOfClass(Timestamp.class, false) - .column("var30").isOfClass(byte[].class, false) - .column("var31").isOfClass(byte[].class, false) - .column("var32").isOfClass(byte[].class, false) - .column("var33").isOfClass(byte[].class, false) - .column("var34").isOfClass(byte[].class, false) - .column("var35").isOfClass(Locale.class, false) - .column("var36").isOfClass(String.class, false) - .column("var37").isOfClass(String.class, false) - .column("var38").isOfClass(String.class, false) - .column("var39").isOfClass(String.class, false) - .column("var40").isOfClass(String.class, false) - .column("var41").isOfClass(String.class, false) - .column("var42").isOfClass(String.class, false) - .column("var43").isOfClass(String.class, false) - .column("var44").isOfClass(String.class, false) - .column("var45").isOfClass(String.class, false) - .column("var46").isOfClass(byte[].class, false) - .column("var47").isOfClass(byte[].class, false) - .column("var48").isOfClass(byte[].class, false) - .column("var49").isOfClass(byte[].class, false) - .column("var50").isOfClass(byte[].class, false) - .column("var51").isOfClass(byte[].class, false) - .column("var52").isOfClass(String.class, false) - .column("var53").isOfClass(String.class, false) - .column("var54").isOfClass(String.class, false) - .column("var55").isOfClass(String.class, false) - .column("var56").isOfClass(String.class, false) - .column("var57").isOfClass(String.class, false) - .column("var58").isOfClass(String.class, false) - .column("var59").isOfClass(UUID.class, false) - .column("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) - .column("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) + .column("var1").isOfClass(Long.class, false) + .column("var2").isOfClass(Integer.class, false) + .column("var3").isOfClass(Integer.class, false) + .column("var4").isOfClass(Integer.class, false) + .column("var5").isOfClass(Integer.class, false) + .column("var6").isOfClass(Integer.class, false) + .column("var7").isOfClass(Boolean.class, false) + .column("var8").isOfClass(Boolean.class, false) + .column("var9").isOfClass(Boolean.class, false) + .column("var10").isOfClass(Byte.class, false) + .column("var11").isOfClass(Short.class, false) + .column("var12").isOfClass(Short.class, false) + .column("var13").isOfClass(Short.class, false) + .column("var14").isOfClass(Long.class, false) + .column("var15").isOfClass(Long.class, false) + .column("var16").isOfClass(BigDecimal.class, false) + .column("var17").isOfClass(BigDecimal.class, false) + .column("var18").isOfClass(BigDecimal.class, false) + .column("var19").isOfClass(BigDecimal.class, false) + .column("var20").isOfClass(Double.class, false) + .column("var21").isOfClass(Double.class, false) + .column("var22").isOfClass(Double.class, false) + .column("var23").isOfClass(Float.class, false) + .column("var24").isOfClass(Float.class, false) + .column("var25").isOfClass(Time.class, false) + .column("var26").isOfClass(Date.class, false) + .column("var27").isOfClass(Timestamp.class, false) + .column("var28").isOfClass(Timestamp.class, false) + .column("var29").isOfClass(Timestamp.class, false) + .column("var30").isOfClass(byte[].class, false) + .column("var31").isOfClass(byte[].class, false) + .column("var32").isOfClass(byte[].class, false) + .column("var33").isOfClass(byte[].class, false) + .column("var34").isOfClass(byte[].class, false) + .column("var35").isOfClass(Locale.class, false) + .column("var36").isOfClass(String.class, false) + .column("var37").isOfClass(String.class, false) + .column("var38").isOfClass(String.class, false) + .column("var39").isOfClass(String.class, false) + .column("var40").isOfClass(String.class, false) + .column("var41").isOfClass(String.class, false) + .column("var42").isOfClass(String.class, false) + .column("var43").isOfClass(String.class, false) + .column("var44").isOfClass(String.class, false) + .column("var45").isOfClass(String.class, false) + .column("var46").isOfClass(byte[].class, false) + .column("var47").isOfClass(byte[].class, false) + .column("var48").isOfClass(byte[].class, false) + .column("var49").isOfClass(byte[].class, false) + .column("var50").isOfClass(byte[].class, false) + .column("var51").isOfClass(byte[].class, false) + .column("var52").isOfClass(String.class, false) + .column("var53").isOfClass(String.class, false) + .column("var54").isOfClass(String.class, false) + .column("var55").isOfClass(String.class, false) + .column("var56").isOfClass(String.class, false) + .column("var57").isOfClass(String.class, false) + .column("var58").isOfClass(String.class, false) + .column("var59").isOfClass(UUID.class, false) + .column("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) + .column("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) ; assertThat(changes).change() - .column("var1").isOfClass(Long.class, false) - .column("var2").isOfClass(Integer.class, false) - .column("var3").isOfClass(Integer.class, false) - .column("var4").isOfClass(Integer.class, false) - .column("var5").isOfClass(Integer.class, false) - .column("var6").isOfClass(Integer.class, false) - .column("var7").isOfClass(Boolean.class, false) - .column("var8").isOfClass(Boolean.class, false) - .column("var9").isOfClass(Boolean.class, false) - .column("var10").isOfClass(Byte.class, false) - .column("var11").isOfClass(Short.class, false) - .column("var12").isOfClass(Short.class, false) - .column("var13").isOfClass(Short.class, false) - .column("var14").isOfClass(Long.class, false) - .column("var15").isOfClass(Long.class, false) - .column("var16").isOfClass(BigDecimal.class, false) - .column("var17").isOfClass(BigDecimal.class, false) - .column("var18").isOfClass(BigDecimal.class, false) - .column("var19").isOfClass(BigDecimal.class, false) - .column("var20").isOfClass(Double.class, false) - .column("var21").isOfClass(Double.class, false) - .column("var22").isOfClass(Double.class, false) - .column("var23").isOfClass(Float.class, false) - .column("var24").isOfClass(Float.class, false) - .column("var25").isOfClass(Time.class, false) - .column("var26").isOfClass(Date.class, false) - .column("var27").isOfClass(Timestamp.class, false) - .column("var28").isOfClass(Timestamp.class, false) - .column("var29").isOfClass(Timestamp.class, false) - .column("var30").isOfClass(byte[].class, false) - .column("var31").isOfClass(byte[].class, false) - .column("var32").isOfClass(byte[].class, false) - .column("var33").isOfClass(byte[].class, false) - .column("var34").isOfClass(byte[].class, false) - .column("var35").isOfClass(Locale.class, false) - .column("var36").isOfClass(String.class, false) - .column("var37").isOfClass(String.class, false) - .column("var38").isOfClass(String.class, false) - .column("var39").isOfClass(String.class, false) - .column("var40").isOfClass(String.class, false) - .column("var41").isOfClass(String.class, false) - .column("var42").isOfClass(String.class, false) - .column("var43").isOfClass(String.class, false) - .column("var44").isOfClass(String.class, false) - .column("var45").isOfClass(String.class, false) - .column("var46").isOfClass(byte[].class, false) - .column("var47").isOfClass(byte[].class, false) - .column("var48").isOfClass(byte[].class, false) - .column("var49").isOfClass(byte[].class, false) - .column("var50").isOfClass(byte[].class, false) - .column("var51").isOfClass(byte[].class, false) - .column("var52").isOfClass(String.class, false) - .column("var53").isOfClass(String.class, false) - .column("var54").isOfClass(String.class, false) - .column("var55").isOfClass(String.class, false) - .column("var56").isOfClass(String.class, false) - .column("var57").isOfClass(String.class, false) - .column("var58").isOfClass(String.class, false) - .column("var59").isOfClass(UUID.class, false) - .column("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) - .column("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) + .column("var1").isOfClass(Long.class, false) + .column("var2").isOfClass(Integer.class, false) + .column("var3").isOfClass(Integer.class, false) + .column("var4").isOfClass(Integer.class, false) + .column("var5").isOfClass(Integer.class, false) + .column("var6").isOfClass(Integer.class, false) + .column("var7").isOfClass(Boolean.class, false) + .column("var8").isOfClass(Boolean.class, false) + .column("var9").isOfClass(Boolean.class, false) + .column("var10").isOfClass(Byte.class, false) + .column("var11").isOfClass(Short.class, false) + .column("var12").isOfClass(Short.class, false) + .column("var13").isOfClass(Short.class, false) + .column("var14").isOfClass(Long.class, false) + .column("var15").isOfClass(Long.class, false) + .column("var16").isOfClass(BigDecimal.class, false) + .column("var17").isOfClass(BigDecimal.class, false) + .column("var18").isOfClass(BigDecimal.class, false) + .column("var19").isOfClass(BigDecimal.class, false) + .column("var20").isOfClass(Double.class, false) + .column("var21").isOfClass(Double.class, false) + .column("var22").isOfClass(Double.class, false) + .column("var23").isOfClass(Float.class, false) + .column("var24").isOfClass(Float.class, false) + .column("var25").isOfClass(Time.class, false) + .column("var26").isOfClass(Date.class, false) + .column("var27").isOfClass(Timestamp.class, false) + .column("var28").isOfClass(Timestamp.class, false) + .column("var29").isOfClass(Timestamp.class, false) + .column("var30").isOfClass(byte[].class, false) + .column("var31").isOfClass(byte[].class, false) + .column("var32").isOfClass(byte[].class, false) + .column("var33").isOfClass(byte[].class, false) + .column("var34").isOfClass(byte[].class, false) + .column("var35").isOfClass(Locale.class, false) + .column("var36").isOfClass(String.class, false) + .column("var37").isOfClass(String.class, false) + .column("var38").isOfClass(String.class, false) + .column("var39").isOfClass(String.class, false) + .column("var40").isOfClass(String.class, false) + .column("var41").isOfClass(String.class, false) + .column("var42").isOfClass(String.class, false) + .column("var43").isOfClass(String.class, false) + .column("var44").isOfClass(String.class, false) + .column("var45").isOfClass(String.class, false) + .column("var46").isOfClass(byte[].class, false) + .column("var47").isOfClass(byte[].class, false) + .column("var48").isOfClass(byte[].class, false) + .column("var49").isOfClass(byte[].class, false) + .column("var50").isOfClass(byte[].class, false) + .column("var51").isOfClass(byte[].class, false) + .column("var52").isOfClass(String.class, false) + .column("var53").isOfClass(String.class, false) + .column("var54").isOfClass(String.class, false) + .column("var55").isOfClass(String.class, false) + .column("var56").isOfClass(String.class, false) + .column("var57").isOfClass(String.class, false) + .column("var58").isOfClass(String.class, false) + .column("var59").isOfClass(UUID.class, false) + .column("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) + .column("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) ; } @@ -481,130 +480,130 @@ public void test_ColumnEquality_hasValues() { changes.setEndPointNow(); assertThat(table).column("var1").hasValues(1) - .column("var2").hasValues(20) - .column("var3").hasValues(3) - .column("var4").hasValues(4) - .column("var5").hasValues(5) - .column("var6").hasValues(6) - .column("var7").hasValues(true) - .column("var8").hasValues(false) - .column("var9").hasValues(true) - .column("var10").hasValues(7) - .column("var11").hasValues(8) - .column("var12").hasValues(9) - .column("var13").hasValues(10) - .column("var14").hasValues(11) - .column("var15").hasValues(12) - .column("var16").hasValues(13.13) - .column("var17").hasValues(14.14) - .column("var18").hasValues(15.15) - .column("var19").hasValues(16.16) - .column("var20").hasValues(17.17) - .column("var21").hasValues(18.18) - .column("var22").hasValues(19.19) - .column("var23").hasValues(20.20) - .column("var24").hasValues(21.21) - .column("var25").hasValues(TimeValue.of(9, 1)) - .column("var26").hasValues(DateValue.of(2007, 12, 23)) - .column("var27").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .column("var28").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .column("var29").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .column("var30").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var31").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var32").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var33").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var34").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var35").hasValues(Locale.FRENCH) - .column("var36").hasValues("22") - .column("var37").hasValues("23") - .column("var38").hasValues("24") - .column("var39").hasValues("25") - .column("var40").hasValues("26") - .column("var41").hasValues("27") - .column("var42").hasValues("28") - .column("var43").hasValues("29") - .column("var44").hasValues("30") - .column("var45").hasValues("31") - .column("var46").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var47").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var48").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var49").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var50").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var51").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var52").hasValues("32") - .column("var53").hasValues("33") - .column("var54").hasValues("34") - .column("var55").hasValues("35") - .column("var56").hasValues("36") - .column("var57").hasValues("37") - .column("var58").hasValues("38") - .column("var59").hasValues(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")) - .column("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) - .column("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) + .column("var2").hasValues(20) + .column("var3").hasValues(3) + .column("var4").hasValues(4) + .column("var5").hasValues(5) + .column("var6").hasValues(6) + .column("var7").hasValues(true) + .column("var8").hasValues(false) + .column("var9").hasValues(true) + .column("var10").hasValues(7) + .column("var11").hasValues(8) + .column("var12").hasValues(9) + .column("var13").hasValues(10) + .column("var14").hasValues(11) + .column("var15").hasValues(12) + .column("var16").hasValues(13.13) + .column("var17").hasValues(14.14) + .column("var18").hasValues(15.15) + .column("var19").hasValues(16.16) + .column("var20").hasValues(17.17) + .column("var21").hasValues(18.18) + .column("var22").hasValues(19.19) + .column("var23").hasValues(20.20) + .column("var24").hasValues(21.21) + .column("var25").hasValues(TimeValue.of(9, 1)) + .column("var26").hasValues(DateValue.of(2007, 12, 23)) + .column("var27").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .column("var28").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .column("var29").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .column("var30").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var31").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var32").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var33").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var34").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var35").hasValues(Locale.FRENCH) + .column("var36").hasValues("22") + .column("var37").hasValues("23") + .column("var38").hasValues("24") + .column("var39").hasValues("25") + .column("var40").hasValues("26") + .column("var41").hasValues("27") + .column("var42").hasValues("28") + .column("var43").hasValues("29") + .column("var44").hasValues("30") + .column("var45").hasValues("31") + .column("var46").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var47").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var48").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var49").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var50").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var51").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var52").hasValues("32") + .column("var53").hasValues("33") + .column("var54").hasValues("34") + .column("var55").hasValues("35") + .column("var56").hasValues("36") + .column("var57").hasValues("37") + .column("var58").hasValues("38") + .column("var59").hasValues(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")) + .column("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) + .column("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) ; assertThat(changes).change() - .column("var1").hasValues(1) - .column("var2").hasValues(2, 20) - .column("var3").hasValues(3) - .column("var4").hasValues(4) - .column("var5").hasValues(5) - .column("var6").hasValues(6) - .column("var7").hasValues(true) - .column("var8").hasValues(false) - .column("var9").hasValues(true) - .column("var10").hasValues(7) - .column("var11").hasValues(8) - .column("var12").hasValues(9) - .column("var13").hasValues(10) - .column("var14").hasValues(11) - .column("var15").hasValues(12) - .column("var16").hasValues(13.13) - .column("var17").hasValues(14.14) - .column("var18").hasValues(15.15) - .column("var19").hasValues(16.16) - .column("var20").hasValues(17.17) - .column("var21").hasValues(18.18) - .column("var22").hasValues(19.19) - .column("var23").hasValues(20.20) - .column("var24").hasValues(21.21) - .column("var25").hasValues(TimeValue.of(9, 1)) - .column("var26").hasValues(DateValue.of(2007, 12, 23)) - .column("var27").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .column("var28").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .column("var29").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .column("var30").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var31").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var32").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var33").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var34").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var35").hasValues(Locale.FRENCH) - .column("var36").hasValues("22") - .column("var37").hasValues("23") - .column("var38").hasValues("24") - .column("var39").hasValues("25") - .column("var40").hasValues("26") - .column("var41").hasValues("27") - .column("var42").hasValues("28") - .column("var43").hasValues("29") - .column("var44").hasValues("30") - .column("var45").hasValues("31") - .column("var46").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var47").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var48").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var49").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var50").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var51").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var52").hasValues("32") - .column("var53").hasValues("33") - .column("var54").hasValues("34") - .column("var55").hasValues("35") - .column("var56").hasValues("36") - .column("var57").hasValues("37") - .column("var58").hasValues("38") - .column("var59").hasValues(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")) - .column("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) - .column("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) + .column("var1").hasValues(1) + .column("var2").hasValues(2, 20) + .column("var3").hasValues(3) + .column("var4").hasValues(4) + .column("var5").hasValues(5) + .column("var6").hasValues(6) + .column("var7").hasValues(true) + .column("var8").hasValues(false) + .column("var9").hasValues(true) + .column("var10").hasValues(7) + .column("var11").hasValues(8) + .column("var12").hasValues(9) + .column("var13").hasValues(10) + .column("var14").hasValues(11) + .column("var15").hasValues(12) + .column("var16").hasValues(13.13) + .column("var17").hasValues(14.14) + .column("var18").hasValues(15.15) + .column("var19").hasValues(16.16) + .column("var20").hasValues(17.17) + .column("var21").hasValues(18.18) + .column("var22").hasValues(19.19) + .column("var23").hasValues(20.20) + .column("var24").hasValues(21.21) + .column("var25").hasValues(TimeValue.of(9, 1)) + .column("var26").hasValues(DateValue.of(2007, 12, 23)) + .column("var27").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .column("var28").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .column("var29").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .column("var30").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var31").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var32").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var33").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var34").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var35").hasValues(Locale.FRENCH) + .column("var36").hasValues("22") + .column("var37").hasValues("23") + .column("var38").hasValues("24") + .column("var39").hasValues("25") + .column("var40").hasValues("26") + .column("var41").hasValues("27") + .column("var42").hasValues("28") + .column("var43").hasValues("29") + .column("var44").hasValues("30") + .column("var45").hasValues("31") + .column("var46").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var47").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var48").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var49").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var50").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var51").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var52").hasValues("32") + .column("var53").hasValues("33") + .column("var54").hasValues("34") + .column("var55").hasValues("35") + .column("var56").hasValues("36") + .column("var57").hasValues("37") + .column("var58").hasValues("38") + .column("var59").hasValues(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")) + .column("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) + .column("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) ; } @@ -617,66 +616,66 @@ public void test_ColumnEquality_containsValues() { changes.setEndPointNow(); assertThat(table).column("var1").containsValues(1) - .column("var2").containsValues(20) - .column("var3").containsValues(3) - .column("var4").containsValues(4) - .column("var5").containsValues(5) - .column("var6").containsValues(6) - .column("var7").containsValues(true) - .column("var8").containsValues(false) - .column("var9").containsValues(true) - .column("var10").containsValues(7) - .column("var11").containsValues(8) - .column("var12").containsValues(9) - .column("var13").containsValues(10) - .column("var14").containsValues(11) - .column("var15").containsValues(12) - .column("var16").containsValues(13.13) - .column("var17").containsValues(14.14) - .column("var18").containsValues(15.15) - .column("var19").containsValues(16.16) - .column("var20").containsValues(17.17) - .column("var21").containsValues(18.18) - .column("var22").containsValues(19.19) - .column("var23").containsValues(20.20) - .column("var24").containsValues(21.21) - .column("var25").containsValues(TimeValue.of(9, 1)) - .column("var26").containsValues(DateValue.of(2007, 12, 23)) - .column("var27").containsValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .column("var28").containsValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .column("var29").containsValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .column("var30").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var31").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var32").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var33").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var34").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var35").containsValues(Locale.FRENCH) - .column("var36").containsValues("22") - .column("var37").containsValues("23") - .column("var38").containsValues("24") - .column("var39").containsValues("25") - .column("var40").containsValues("26") - .column("var41").containsValues("27") - .column("var42").containsValues("28") - .column("var43").containsValues("29") - .column("var44").containsValues("30") - .column("var45").containsValues("31") - .column("var46").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var47").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var48").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var49").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var50").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var51").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var52").containsValues("32") - .column("var53").containsValues("33") - .column("var54").containsValues("34") - .column("var55").containsValues("35") - .column("var56").containsValues("36") - .column("var57").containsValues("37") - .column("var58").containsValues("38") - .column("var59").containsValues(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")) - .column("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) - .column("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) + .column("var2").containsValues(20) + .column("var3").containsValues(3) + .column("var4").containsValues(4) + .column("var5").containsValues(5) + .column("var6").containsValues(6) + .column("var7").containsValues(true) + .column("var8").containsValues(false) + .column("var9").containsValues(true) + .column("var10").containsValues(7) + .column("var11").containsValues(8) + .column("var12").containsValues(9) + .column("var13").containsValues(10) + .column("var14").containsValues(11) + .column("var15").containsValues(12) + .column("var16").containsValues(13.13) + .column("var17").containsValues(14.14) + .column("var18").containsValues(15.15) + .column("var19").containsValues(16.16) + .column("var20").containsValues(17.17) + .column("var21").containsValues(18.18) + .column("var22").containsValues(19.19) + .column("var23").containsValues(20.20) + .column("var24").containsValues(21.21) + .column("var25").containsValues(TimeValue.of(9, 1)) + .column("var26").containsValues(DateValue.of(2007, 12, 23)) + .column("var27").containsValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .column("var28").containsValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .column("var29").containsValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .column("var30").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var31").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var32").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var33").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var34").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var35").containsValues(Locale.FRENCH) + .column("var36").containsValues("22") + .column("var37").containsValues("23") + .column("var38").containsValues("24") + .column("var39").containsValues("25") + .column("var40").containsValues("26") + .column("var41").containsValues("27") + .column("var42").containsValues("28") + .column("var43").containsValues("29") + .column("var44").containsValues("30") + .column("var45").containsValues("31") + .column("var46").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var47").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var48").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var49").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var50").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var51").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var52").containsValues("32") + .column("var53").containsValues("33") + .column("var54").containsValues("34") + .column("var55").containsValues("35") + .column("var56").containsValues("36") + .column("var57").containsValues("37") + .column("var58").containsValues("38") + .column("var59").containsValues(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")) + .column("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) + .column("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) ; } @@ -689,130 +688,130 @@ public void test_ColumnType_isOfType() { changes.setEndPointNow(); assertThat(table).column("var1").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var2").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var3").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var4").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var5").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var6").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var7").isBoolean(false).isOfType(ValueType.BOOLEAN, false) - .column("var8").isBoolean(false).isOfType(ValueType.BOOLEAN, false) - .column("var9").isBoolean(false).isOfType(ValueType.BOOLEAN, false) - .column("var10").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var11").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var12").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var13").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var14").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var15").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var16").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var17").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var18").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var19").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var20").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var21").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var22").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var23").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var24").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var25").isTime(false).isOfType(ValueType.TIME, false) - .column("var26").isDate(false).isOfType(ValueType.DATE, false) - .column("var27").isDateTime(false).isOfType(ValueType.DATE_TIME, false) - .column("var28").isDateTime(false).isOfType(ValueType.DATE_TIME, false) - .column("var29").isDateTime(false).isOfType(ValueType.DATE_TIME, false) - .column("var30").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var31").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var32").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var33").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var34").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var35") - .column("var36").isText(false).isOfType(ValueType.TEXT, false) - .column("var37").isText(false).isOfType(ValueType.TEXT, false) - .column("var38").isText(false).isOfType(ValueType.TEXT, false) - .column("var39").isText(false).isOfType(ValueType.TEXT, false) - .column("var40").isText(false).isOfType(ValueType.TEXT, false) - .column("var41").isText(false).isOfType(ValueType.TEXT, false) - .column("var42").isText(false).isOfType(ValueType.TEXT, false) - .column("var43").isText(false).isOfType(ValueType.TEXT, false) - .column("var44").isText(false).isOfType(ValueType.TEXT, false) - .column("var45").isText(false).isOfType(ValueType.TEXT, false) - .column("var46").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var47").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var48").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var49").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var50").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var51").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var52").isText(false).isOfType(ValueType.TEXT, false) - .column("var53").isText(false).isOfType(ValueType.TEXT, false) - .column("var54").isText(false).isOfType(ValueType.TEXT, false) - .column("var55").isText(false).isOfType(ValueType.TEXT, false) - .column("var56").isText(false).isOfType(ValueType.TEXT, false) - .column("var57").isText(false).isOfType(ValueType.TEXT, false) - .column("var58").isText(false).isOfType(ValueType.TEXT, false) - .column("var59").isUUID(false).isOfType(ValueType.UUID, false) - .column("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) - .column("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) + .column("var2").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var3").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var4").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var5").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var6").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var7").isBoolean(false).isOfType(ValueType.BOOLEAN, false) + .column("var8").isBoolean(false).isOfType(ValueType.BOOLEAN, false) + .column("var9").isBoolean(false).isOfType(ValueType.BOOLEAN, false) + .column("var10").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var11").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var12").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var13").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var14").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var15").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var16").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var17").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var18").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var19").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var20").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var21").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var22").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var23").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var24").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var25").isTime(false).isOfType(ValueType.TIME, false) + .column("var26").isDate(false).isOfType(ValueType.DATE, false) + .column("var27").isDateTime(false).isOfType(ValueType.DATE_TIME, false) + .column("var28").isDateTime(false).isOfType(ValueType.DATE_TIME, false) + .column("var29").isDateTime(false).isOfType(ValueType.DATE_TIME, false) + .column("var30").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var31").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var32").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var33").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var34").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var35") + .column("var36").isText(false).isOfType(ValueType.TEXT, false) + .column("var37").isText(false).isOfType(ValueType.TEXT, false) + .column("var38").isText(false).isOfType(ValueType.TEXT, false) + .column("var39").isText(false).isOfType(ValueType.TEXT, false) + .column("var40").isText(false).isOfType(ValueType.TEXT, false) + .column("var41").isText(false).isOfType(ValueType.TEXT, false) + .column("var42").isText(false).isOfType(ValueType.TEXT, false) + .column("var43").isText(false).isOfType(ValueType.TEXT, false) + .column("var44").isText(false).isOfType(ValueType.TEXT, false) + .column("var45").isText(false).isOfType(ValueType.TEXT, false) + .column("var46").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var47").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var48").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var49").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var50").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var51").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var52").isText(false).isOfType(ValueType.TEXT, false) + .column("var53").isText(false).isOfType(ValueType.TEXT, false) + .column("var54").isText(false).isOfType(ValueType.TEXT, false) + .column("var55").isText(false).isOfType(ValueType.TEXT, false) + .column("var56").isText(false).isOfType(ValueType.TEXT, false) + .column("var57").isText(false).isOfType(ValueType.TEXT, false) + .column("var58").isText(false).isOfType(ValueType.TEXT, false) + .column("var59").isUUID(false).isOfType(ValueType.UUID, false) + .column("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) + .column("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) ; assertThat(changes).change() - .column("var1").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var2").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var3").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var4").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var5").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var6").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var7").isBoolean(false).isOfType(ValueType.BOOLEAN, false) - .column("var8").isBoolean(false).isOfType(ValueType.BOOLEAN, false) - .column("var9").isBoolean(false).isOfType(ValueType.BOOLEAN, false) - .column("var10").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var11").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var12").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var13").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var14").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var15").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var16").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var17").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var18").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var19").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var20").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var21").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var22").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var23").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var24").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var25").isTime(false).isOfType(ValueType.TIME, false) - .column("var26").isDate(false).isOfType(ValueType.DATE, false) - .column("var27").isDateTime(false).isOfType(ValueType.DATE_TIME, false) - .column("var28").isDateTime(false).isOfType(ValueType.DATE_TIME, false) - .column("var29").isDateTime(false).isOfType(ValueType.DATE_TIME, false) - .column("var30").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var31").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var32").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var33").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var34").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var35") - .column("var36").isText(false).isOfType(ValueType.TEXT, false) - .column("var37").isText(false).isOfType(ValueType.TEXT, false) - .column("var38").isText(false).isOfType(ValueType.TEXT, false) - .column("var39").isText(false).isOfType(ValueType.TEXT, false) - .column("var40").isText(false).isOfType(ValueType.TEXT, false) - .column("var41").isText(false).isOfType(ValueType.TEXT, false) - .column("var42").isText(false).isOfType(ValueType.TEXT, false) - .column("var43").isText(false).isOfType(ValueType.TEXT, false) - .column("var44").isText(false).isOfType(ValueType.TEXT, false) - .column("var45").isText(false).isOfType(ValueType.TEXT, false) - .column("var46").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var47").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var48").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var49").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var50").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var51").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var52").isText(false).isOfType(ValueType.TEXT, false) - .column("var53").isText(false).isOfType(ValueType.TEXT, false) - .column("var54").isText(false).isOfType(ValueType.TEXT, false) - .column("var55").isText(false).isOfType(ValueType.TEXT, false) - .column("var56").isText(false).isOfType(ValueType.TEXT, false) - .column("var57").isText(false).isOfType(ValueType.TEXT, false) - .column("var58").isText(false).isOfType(ValueType.TEXT, false) - .column("var59").isUUID(false).isOfType(ValueType.UUID, false) - .column("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) - .column("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) + .column("var1").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var2").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var3").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var4").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var5").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var6").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var7").isBoolean(false).isOfType(ValueType.BOOLEAN, false) + .column("var8").isBoolean(false).isOfType(ValueType.BOOLEAN, false) + .column("var9").isBoolean(false).isOfType(ValueType.BOOLEAN, false) + .column("var10").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var11").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var12").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var13").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var14").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var15").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var16").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var17").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var18").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var19").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var20").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var21").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var22").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var23").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var24").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var25").isTime(false).isOfType(ValueType.TIME, false) + .column("var26").isDate(false).isOfType(ValueType.DATE, false) + .column("var27").isDateTime(false).isOfType(ValueType.DATE_TIME, false) + .column("var28").isDateTime(false).isOfType(ValueType.DATE_TIME, false) + .column("var29").isDateTime(false).isOfType(ValueType.DATE_TIME, false) + .column("var30").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var31").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var32").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var33").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var34").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var35") + .column("var36").isText(false).isOfType(ValueType.TEXT, false) + .column("var37").isText(false).isOfType(ValueType.TEXT, false) + .column("var38").isText(false).isOfType(ValueType.TEXT, false) + .column("var39").isText(false).isOfType(ValueType.TEXT, false) + .column("var40").isText(false).isOfType(ValueType.TEXT, false) + .column("var41").isText(false).isOfType(ValueType.TEXT, false) + .column("var42").isText(false).isOfType(ValueType.TEXT, false) + .column("var43").isText(false).isOfType(ValueType.TEXT, false) + .column("var44").isText(false).isOfType(ValueType.TEXT, false) + .column("var45").isText(false).isOfType(ValueType.TEXT, false) + .column("var46").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var47").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var48").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var49").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var50").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var51").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var52").isText(false).isOfType(ValueType.TEXT, false) + .column("var53").isText(false).isOfType(ValueType.TEXT, false) + .column("var54").isText(false).isOfType(ValueType.TEXT, false) + .column("var55").isText(false).isOfType(ValueType.TEXT, false) + .column("var56").isText(false).isOfType(ValueType.TEXT, false) + .column("var57").isText(false).isOfType(ValueType.TEXT, false) + .column("var58").isText(false).isOfType(ValueType.TEXT, false) + .column("var59").isUUID(false).isOfType(ValueType.UUID, false) + .column("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) + .column("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) ; } @@ -825,146 +824,146 @@ public void test_ColumnOfChangeEquality_hasValues() { changes.setEndPointNow(); assertThat(changes).change() - .column("var1").hasValues(1) - .column("var2").hasValues(2, 20) - .column("var3").hasValues(3) - .column("var4").hasValues(4) - .column("var5").hasValues(5) - .column("var6").hasValues(6) - .column("var7").hasValues(true) - .column("var8").hasValues(false) - .column("var9").hasValues(true) - .column("var10").hasValues(7) - .column("var11").hasValues(8) - .column("var12").hasValues(9) - .column("var13").hasValues(10) - .column("var14").hasValues(11) - .column("var15").hasValues(12) - .column("var16").hasValues(13.13) - .column("var17").hasValues(14.14) - .column("var18").hasValues(15.15) - .column("var19").hasValues(16.16) - .column("var20").hasValues(17.17) - .column("var21").hasValues(18.18) - .column("var22").hasValues(19.19) - .column("var23").hasValues(20.20) - .column("var24").hasValues(21.21) - .column("var25").hasValues(TimeValue.of(9, 1)) - .column("var26").hasValues(DateValue.of(2007, 12, 23)) - .column("var27").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .column("var28").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .column("var29").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .column("var30").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var31").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var32").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var33").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var34").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var35").hasValues(Locale.FRENCH) - .column("var36").hasValues("22") - .column("var37").hasValues("23") - .column("var38").hasValues("24") - .column("var39").hasValues("25") - .column("var40").hasValues("26") - .column("var41").hasValues("27") - .column("var42").hasValues("28") - .column("var43").hasValues("29") - .column("var44").hasValues("30") - .column("var45").hasValues("31") - .column("var46").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var47").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var48").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var49").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var50").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var51").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var52").hasValues("32") - .column("var53").hasValues("33") - .column("var54").hasValues("34") - .column("var55").hasValues("35") - .column("var56").hasValues("36") - .column("var57").hasValues("37") - .column("var58").hasValues("38") - .column("var59").hasValues(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")) - .column("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) - .column("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) + .column("var1").hasValues(1) + .column("var2").hasValues(2, 20) + .column("var3").hasValues(3) + .column("var4").hasValues(4) + .column("var5").hasValues(5) + .column("var6").hasValues(6) + .column("var7").hasValues(true) + .column("var8").hasValues(false) + .column("var9").hasValues(true) + .column("var10").hasValues(7) + .column("var11").hasValues(8) + .column("var12").hasValues(9) + .column("var13").hasValues(10) + .column("var14").hasValues(11) + .column("var15").hasValues(12) + .column("var16").hasValues(13.13) + .column("var17").hasValues(14.14) + .column("var18").hasValues(15.15) + .column("var19").hasValues(16.16) + .column("var20").hasValues(17.17) + .column("var21").hasValues(18.18) + .column("var22").hasValues(19.19) + .column("var23").hasValues(20.20) + .column("var24").hasValues(21.21) + .column("var25").hasValues(TimeValue.of(9, 1)) + .column("var26").hasValues(DateValue.of(2007, 12, 23)) + .column("var27").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .column("var28").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .column("var29").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .column("var30").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var31").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var32").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var33").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var34").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var35").hasValues(Locale.FRENCH) + .column("var36").hasValues("22") + .column("var37").hasValues("23") + .column("var38").hasValues("24") + .column("var39").hasValues("25") + .column("var40").hasValues("26") + .column("var41").hasValues("27") + .column("var42").hasValues("28") + .column("var43").hasValues("29") + .column("var44").hasValues("30") + .column("var45").hasValues("31") + .column("var46").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var47").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var48").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var49").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var50").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var51").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var52").hasValues("32") + .column("var53").hasValues("33") + .column("var54").hasValues("34") + .column("var55").hasValues("35") + .column("var56").hasValues("36") + .column("var57").hasValues("37") + .column("var58").hasValues("38") + .column("var59").hasValues(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")) + .column("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) + .column("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) ; assertThat(changes).change() - .column("var1").hasValues(1, 1) - .column("var2").hasValues(2, 20) - .column("var3").hasValues(3, 3) - .column("var4").hasValues(4, 4) - .column("var5").hasValues(5, 5) - .column("var6").hasValues(6, 6) - .column("var7").hasValues(true, true) - .column("var8").hasValues(false, false) - .column("var9").hasValues(true, true) - .column("var10").hasValues(7, 7) - .column("var11").hasValues(8, 8) - .column("var12").hasValues(9, 9) - .column("var13").hasValues(10, 10) - .column("var14").hasValues(11, 11) - .column("var15").hasValues(12, 12) - .column("var16").hasValues(13.13, 13.13) - .column("var17").hasValues(14.14, 14.14) - .column("var18").hasValues(15.15, 15.15) - .column("var19").hasValues(16.16, 16.16) - .column("var20").hasValues(17.17, 17.17) - .column("var21").hasValues(18.18, 18.18) - .column("var22").hasValues(19.19, 19.19) - .column("var23").hasValues(20.20, 20.20) - .column("var24").hasValues(21.21, 21.21) - .column("var25").hasValues(TimeValue.of(9, 1), TimeValue.of(9, 1)) - .column("var26").hasValues(DateValue.of(2007, 12, 23), DateValue.of(2007, 12, 23)) - .column("var27").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .column("var28").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .column("var29").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .column("var30").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var31").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var32").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var33").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var34").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var35").hasValues(Locale.FRENCH, Locale.FRENCH) - .column("var36").hasValues("22", "22") - .column("var37").hasValues("23", "23") - .column("var38").hasValues("24", "24") - .column("var39").hasValues("25", "25") - .column("var40").hasValues("26", "26") - .column("var41").hasValues("27", "27") - .column("var42").hasValues("28", "28") - .column("var43").hasValues("29", "29") - .column("var44").hasValues("30", "30") - .column("var45").hasValues("31", "31") - .column("var46").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var47").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var48").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var49").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var50").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var51").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var52").hasValues("32", "32") - .column("var53").hasValues("33", "33") - .column("var54").hasValues("34", "34") - .column("var55").hasValues("35", "35") - .column("var56").hasValues("36", "36") - .column("var57").hasValues("37", "37") - .column("var58").hasValues("38", "38") - .column("var59").hasValues(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435"), - UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")) - .column("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) - .column("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) + .column("var1").hasValues(1, 1) + .column("var2").hasValues(2, 20) + .column("var3").hasValues(3, 3) + .column("var4").hasValues(4, 4) + .column("var5").hasValues(5, 5) + .column("var6").hasValues(6, 6) + .column("var7").hasValues(true, true) + .column("var8").hasValues(false, false) + .column("var9").hasValues(true, true) + .column("var10").hasValues(7, 7) + .column("var11").hasValues(8, 8) + .column("var12").hasValues(9, 9) + .column("var13").hasValues(10, 10) + .column("var14").hasValues(11, 11) + .column("var15").hasValues(12, 12) + .column("var16").hasValues(13.13, 13.13) + .column("var17").hasValues(14.14, 14.14) + .column("var18").hasValues(15.15, 15.15) + .column("var19").hasValues(16.16, 16.16) + .column("var20").hasValues(17.17, 17.17) + .column("var21").hasValues(18.18, 18.18) + .column("var22").hasValues(19.19, 19.19) + .column("var23").hasValues(20.20, 20.20) + .column("var24").hasValues(21.21, 21.21) + .column("var25").hasValues(TimeValue.of(9, 1), TimeValue.of(9, 1)) + .column("var26").hasValues(DateValue.of(2007, 12, 23), DateValue.of(2007, 12, 23)) + .column("var27").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .column("var28").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .column("var29").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .column("var30").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var31").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var32").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var33").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var34").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var35").hasValues(Locale.FRENCH, Locale.FRENCH) + .column("var36").hasValues("22", "22") + .column("var37").hasValues("23", "23") + .column("var38").hasValues("24", "24") + .column("var39").hasValues("25", "25") + .column("var40").hasValues("26", "26") + .column("var41").hasValues("27", "27") + .column("var42").hasValues("28", "28") + .column("var43").hasValues("29", "29") + .column("var44").hasValues("30", "30") + .column("var45").hasValues("31", "31") + .column("var46").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var47").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var48").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var49").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var50").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var51").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var52").hasValues("32", "32") + .column("var53").hasValues("33", "33") + .column("var54").hasValues("34", "34") + .column("var55").hasValues("35", "35") + .column("var56").hasValues("36", "36") + .column("var57").hasValues("37", "37") + .column("var58").hasValues("38", "38") + .column("var59").hasValues(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435"), + UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")) + .column("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) + .column("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) ; } @@ -977,131 +976,131 @@ public void test_RowEquality_hasValues() { changes.setEndPointNow(); assertThat(table).row() - .hasValues(1, - 20, - 3, - 4, - 5, - 6, - true, - false, - true, - 7, - 8, - 9, - 10, - 11, - 12, - 13.13, - 14.14, - 15.15, - 16.16, - 17.17, - 18.18, - 19.19, - 20.20, - 21.21, - TimeValue.of(9, 1), - DateValue.of(2007, 12, 23), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)), - bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png"), - Locale.FRENCH, - "22", - "23", - "24", - "25", - "26", - "27", - "28", - "29", - "30", - "31", - bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png"), - "32", - "33", - "34", - "35", - "36", - "37", - "38", - UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435"), - null, - null) + .hasValues(1, + 20, + 3, + 4, + 5, + 6, + true, + false, + true, + 7, + 8, + 9, + 10, + 11, + 12, + 13.13, + 14.14, + 15.15, + 16.16, + 17.17, + 18.18, + 19.19, + 20.20, + 21.21, + TimeValue.of(9, 1), + DateValue.of(2007, 12, 23), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)), + bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png"), + Locale.FRENCH, + "22", + "23", + "24", + "25", + "26", + "27", + "28", + "29", + "30", + "31", + bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png"), + "32", + "33", + "34", + "35", + "36", + "37", + "38", + UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435"), + null, + null) ; assertThat(changes).change().rowAtStartPoint() - .hasValues(1, - 2, - 3, - 4, - 5, - 6, - true, - false, - true, - 7, - 8, - 9, - 10, - 11, - 12, - 13.13, - 14.14, - 15.15, - 16.16, - 17.17, - 18.18, - 19.19, - 20.20, - 21.21, - TimeValue.of(9, 1), - DateValue.of(2007, 12, 23), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)), - bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png"), - Locale.FRENCH, - "22", - "23", - "24", - "25", - "26", - "27", - "28", - "29", - "30", - "31", - bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png"), - "32", - "33", - "34", - "35", - "36", - "37", - "38", - UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435"), - null, - null) + .hasValues(1, + 2, + 3, + 4, + 5, + 6, + true, + false, + true, + 7, + 8, + 9, + 10, + 11, + 12, + 13.13, + 14.14, + 15.15, + 16.16, + 17.17, + 18.18, + 19.19, + 20.20, + 21.21, + TimeValue.of(9, 1), + DateValue.of(2007, 12, 23), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)), + bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png"), + Locale.FRENCH, + "22", + "23", + "24", + "25", + "26", + "27", + "28", + "29", + "30", + "31", + bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png"), + "32", + "33", + "34", + "35", + "36", + "37", + "38", + UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435"), + null, + null) ; } @@ -1114,131 +1113,131 @@ public void test_ValueClass_isOfClass() { changes.setEndPointNow(); assertThat(table).row() - .value("var1").isOfClass(Long.class) - .value("var2").isOfClass(Integer.class) - .value("var3").isOfClass(Integer.class) - .value("var4").isOfClass(Integer.class) - .value("var5").isOfClass(Integer.class) - .value("var6").isOfClass(Integer.class) - .value("var7").isOfClass(Boolean.class) - .value("var8").isOfClass(Boolean.class) - .value("var9").isOfClass(Boolean.class) - .value("var10").isOfClass(Byte.class) - .value("var11").isOfClass(Short.class) - .value("var12").isOfClass(Short.class) - .value("var13").isOfClass(Short.class) - .value("var14").isOfClass(Long.class) - .value("var15").isOfClass(Long.class) - .value("var16").isOfClass(BigDecimal.class) - .value("var17").isOfClass(BigDecimal.class) - .value("var18").isOfClass(BigDecimal.class) - .value("var19").isOfClass(BigDecimal.class) - .value("var20").isOfClass(Double.class) - .value("var21").isOfClass(Double.class) - .value("var22").isOfClass(Double.class) - .value("var23").isOfClass(Float.class) - .value("var24").isOfClass(Float.class) - .value("var25").isOfClass(Time.class) - .value("var26").isOfClass(Date.class) - .value("var27").isOfClass(Timestamp.class) - .value("var28").isOfClass(Timestamp.class) - .value("var29").isOfClass(Timestamp.class) - .value("var30").isOfClass(byte[].class) - .value("var31").isOfClass(byte[].class) - .value("var32").isOfClass(byte[].class) - .value("var33").isOfClass(byte[].class) - .value("var34").isOfClass(byte[].class) - .value("var35").isOfClass(Locale.class) - .value("var36").isOfClass(String.class) - .value("var37").isOfClass(String.class) - .value("var38").isOfClass(String.class) - .value("var39").isOfClass(String.class) - .value("var40").isOfClass(String.class) - .value("var41").isOfClass(String.class) - .value("var42").isOfClass(String.class) - .value("var43").isOfClass(String.class) - .value("var44").isOfClass(String.class) - .value("var45").isOfClass(String.class) - .value("var46").isOfClass(byte[].class) - .value("var47").isOfClass(byte[].class) - .value("var48").isOfClass(byte[].class) - .value("var49").isOfClass(byte[].class) - .value("var50").isOfClass(byte[].class) - .value("var51").isOfClass(byte[].class) - .value("var52").isOfClass(String.class) - .value("var53").isOfClass(String.class) - .value("var54").isOfClass(String.class) - .value("var55").isOfClass(String.class) - .value("var56").isOfClass(String.class) - .value("var57").isOfClass(String.class) - .value("var58").isOfClass(String.class) - .value("var59").isOfClass(UUID.class) - .value("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) - .value("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) + .value("var1").isOfClass(Long.class) + .value("var2").isOfClass(Integer.class) + .value("var3").isOfClass(Integer.class) + .value("var4").isOfClass(Integer.class) + .value("var5").isOfClass(Integer.class) + .value("var6").isOfClass(Integer.class) + .value("var7").isOfClass(Boolean.class) + .value("var8").isOfClass(Boolean.class) + .value("var9").isOfClass(Boolean.class) + .value("var10").isOfClass(Byte.class) + .value("var11").isOfClass(Short.class) + .value("var12").isOfClass(Short.class) + .value("var13").isOfClass(Short.class) + .value("var14").isOfClass(Long.class) + .value("var15").isOfClass(Long.class) + .value("var16").isOfClass(BigDecimal.class) + .value("var17").isOfClass(BigDecimal.class) + .value("var18").isOfClass(BigDecimal.class) + .value("var19").isOfClass(BigDecimal.class) + .value("var20").isOfClass(Double.class) + .value("var21").isOfClass(Double.class) + .value("var22").isOfClass(Double.class) + .value("var23").isOfClass(Float.class) + .value("var24").isOfClass(Float.class) + .value("var25").isOfClass(Time.class) + .value("var26").isOfClass(Date.class) + .value("var27").isOfClass(Timestamp.class) + .value("var28").isOfClass(Timestamp.class) + .value("var29").isOfClass(Timestamp.class) + .value("var30").isOfClass(byte[].class) + .value("var31").isOfClass(byte[].class) + .value("var32").isOfClass(byte[].class) + .value("var33").isOfClass(byte[].class) + .value("var34").isOfClass(byte[].class) + .value("var35").isOfClass(Locale.class) + .value("var36").isOfClass(String.class) + .value("var37").isOfClass(String.class) + .value("var38").isOfClass(String.class) + .value("var39").isOfClass(String.class) + .value("var40").isOfClass(String.class) + .value("var41").isOfClass(String.class) + .value("var42").isOfClass(String.class) + .value("var43").isOfClass(String.class) + .value("var44").isOfClass(String.class) + .value("var45").isOfClass(String.class) + .value("var46").isOfClass(byte[].class) + .value("var47").isOfClass(byte[].class) + .value("var48").isOfClass(byte[].class) + .value("var49").isOfClass(byte[].class) + .value("var50").isOfClass(byte[].class) + .value("var51").isOfClass(byte[].class) + .value("var52").isOfClass(String.class) + .value("var53").isOfClass(String.class) + .value("var54").isOfClass(String.class) + .value("var55").isOfClass(String.class) + .value("var56").isOfClass(String.class) + .value("var57").isOfClass(String.class) + .value("var58").isOfClass(String.class) + .value("var59").isOfClass(UUID.class) + .value("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) + .value("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) ; assertThat(changes).change().rowAtStartPoint() - .value("var1").isOfClass(Long.class) - .value("var2").isOfClass(Integer.class) - .value("var3").isOfClass(Integer.class) - .value("var4").isOfClass(Integer.class) - .value("var5").isOfClass(Integer.class) - .value("var6").isOfClass(Integer.class) - .value("var7").isOfClass(Boolean.class) - .value("var8").isOfClass(Boolean.class) - .value("var9").isOfClass(Boolean.class) - .value("var10").isOfClass(Byte.class) - .value("var11").isOfClass(Short.class) - .value("var12").isOfClass(Short.class) - .value("var13").isOfClass(Short.class) - .value("var14").isOfClass(Long.class) - .value("var15").isOfClass(Long.class) - .value("var16").isOfClass(BigDecimal.class) - .value("var17").isOfClass(BigDecimal.class) - .value("var18").isOfClass(BigDecimal.class) - .value("var19").isOfClass(BigDecimal.class) - .value("var20").isOfClass(Double.class) - .value("var21").isOfClass(Double.class) - .value("var22").isOfClass(Double.class) - .value("var23").isOfClass(Float.class) - .value("var24").isOfClass(Float.class) - .value("var25").isOfClass(Time.class) - .value("var26").isOfClass(Date.class) - .value("var27").isOfClass(Timestamp.class) - .value("var28").isOfClass(Timestamp.class) - .value("var29").isOfClass(Timestamp.class) - .value("var30").isOfClass(byte[].class) - .value("var31").isOfClass(byte[].class) - .value("var32").isOfClass(byte[].class) - .value("var33").isOfClass(byte[].class) - .value("var34").isOfClass(byte[].class) - .value("var35").isOfClass(Locale.class) - .value("var36").isOfClass(String.class) - .value("var37").isOfClass(String.class) - .value("var38").isOfClass(String.class) - .value("var39").isOfClass(String.class) - .value("var40").isOfClass(String.class) - .value("var41").isOfClass(String.class) - .value("var42").isOfClass(String.class) - .value("var43").isOfClass(String.class) - .value("var44").isOfClass(String.class) - .value("var45").isOfClass(String.class) - .value("var46").isOfClass(byte[].class) - .value("var47").isOfClass(byte[].class) - .value("var48").isOfClass(byte[].class) - .value("var49").isOfClass(byte[].class) - .value("var50").isOfClass(byte[].class) - .value("var51").isOfClass(byte[].class) - .value("var52").isOfClass(String.class) - .value("var53").isOfClass(String.class) - .value("var54").isOfClass(String.class) - .value("var55").isOfClass(String.class) - .value("var56").isOfClass(String.class) - .value("var57").isOfClass(String.class) - .value("var58").isOfClass(String.class) - .value("var59").isOfClass(UUID.class) - .value("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) - .value("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) + .value("var1").isOfClass(Long.class) + .value("var2").isOfClass(Integer.class) + .value("var3").isOfClass(Integer.class) + .value("var4").isOfClass(Integer.class) + .value("var5").isOfClass(Integer.class) + .value("var6").isOfClass(Integer.class) + .value("var7").isOfClass(Boolean.class) + .value("var8").isOfClass(Boolean.class) + .value("var9").isOfClass(Boolean.class) + .value("var10").isOfClass(Byte.class) + .value("var11").isOfClass(Short.class) + .value("var12").isOfClass(Short.class) + .value("var13").isOfClass(Short.class) + .value("var14").isOfClass(Long.class) + .value("var15").isOfClass(Long.class) + .value("var16").isOfClass(BigDecimal.class) + .value("var17").isOfClass(BigDecimal.class) + .value("var18").isOfClass(BigDecimal.class) + .value("var19").isOfClass(BigDecimal.class) + .value("var20").isOfClass(Double.class) + .value("var21").isOfClass(Double.class) + .value("var22").isOfClass(Double.class) + .value("var23").isOfClass(Float.class) + .value("var24").isOfClass(Float.class) + .value("var25").isOfClass(Time.class) + .value("var26").isOfClass(Date.class) + .value("var27").isOfClass(Timestamp.class) + .value("var28").isOfClass(Timestamp.class) + .value("var29").isOfClass(Timestamp.class) + .value("var30").isOfClass(byte[].class) + .value("var31").isOfClass(byte[].class) + .value("var32").isOfClass(byte[].class) + .value("var33").isOfClass(byte[].class) + .value("var34").isOfClass(byte[].class) + .value("var35").isOfClass(Locale.class) + .value("var36").isOfClass(String.class) + .value("var37").isOfClass(String.class) + .value("var38").isOfClass(String.class) + .value("var39").isOfClass(String.class) + .value("var40").isOfClass(String.class) + .value("var41").isOfClass(String.class) + .value("var42").isOfClass(String.class) + .value("var43").isOfClass(String.class) + .value("var44").isOfClass(String.class) + .value("var45").isOfClass(String.class) + .value("var46").isOfClass(byte[].class) + .value("var47").isOfClass(byte[].class) + .value("var48").isOfClass(byte[].class) + .value("var49").isOfClass(byte[].class) + .value("var50").isOfClass(byte[].class) + .value("var51").isOfClass(byte[].class) + .value("var52").isOfClass(String.class) + .value("var53").isOfClass(String.class) + .value("var54").isOfClass(String.class) + .value("var55").isOfClass(String.class) + .value("var56").isOfClass(String.class) + .value("var57").isOfClass(String.class) + .value("var58").isOfClass(String.class) + .value("var59").isOfClass(UUID.class) + .value("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) + .value("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) ; } @@ -1251,131 +1250,131 @@ public void test_ValueEquality_isEqualTo() { changes.setEndPointNow(); assertThat(table).row() - .value("var1").isEqualTo(1) - .value("var2").isEqualTo(20) - .value("var3").isEqualTo(3) - .value("var4").isEqualTo(4) - .value("var5").isEqualTo(5) - .value("var6").isEqualTo(6) - .value("var7").isEqualTo(true) - .value("var8").isEqualTo(false) - .value("var9").isEqualTo(true) - .value("var10").isEqualTo(7) - .value("var11").isEqualTo(8) - .value("var12").isEqualTo(9) - .value("var13").isEqualTo(10) - .value("var14").isEqualTo(11) - .value("var15").isEqualTo(12) - .value("var16").isEqualTo(13.13) - .value("var17").isEqualTo(14.14) - .value("var18").isEqualTo(15.15) - .value("var19").isEqualTo(16.16) - .value("var20").isEqualTo(17.17) - .value("var21").isEqualTo(18.18) - .value("var22").isEqualTo(19.19) - .value("var23").isEqualTo(20.20) - .value("var24").isEqualTo(21.21) - .value("var25").isEqualTo(TimeValue.of(9, 1)) - .value("var26").isEqualTo(DateValue.of(2007, 12, 23)) - .value("var27").isEqualTo(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .value("var28").isEqualTo(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .value("var29").isEqualTo(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .value("var30").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var31").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var32").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var33").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var34").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var35").isEqualTo(Locale.FRENCH) - .value("var36").isEqualTo("22") - .value("var37").isEqualTo("23") - .value("var38").isEqualTo("24") - .value("var39").isEqualTo("25") - .value("var40").isEqualTo("26") - .value("var41").isEqualTo("27") - .value("var42").isEqualTo("28") - .value("var43").isEqualTo("29") - .value("var44").isEqualTo("30") - .value("var45").isEqualTo("31") - .value("var46").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var47").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var48").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var49").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var50").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var51").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var52").isEqualTo("32") - .value("var53").isEqualTo("33") - .value("var54").isEqualTo("34") - .value("var55").isEqualTo("35") - .value("var56").isEqualTo("36") - .value("var57").isEqualTo("37") - .value("var58").isEqualTo("38") - .value("var59").isEqualTo(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")) - .value("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) - .value("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) + .value("var1").isEqualTo(1) + .value("var2").isEqualTo(20) + .value("var3").isEqualTo(3) + .value("var4").isEqualTo(4) + .value("var5").isEqualTo(5) + .value("var6").isEqualTo(6) + .value("var7").isEqualTo(true) + .value("var8").isEqualTo(false) + .value("var9").isEqualTo(true) + .value("var10").isEqualTo(7) + .value("var11").isEqualTo(8) + .value("var12").isEqualTo(9) + .value("var13").isEqualTo(10) + .value("var14").isEqualTo(11) + .value("var15").isEqualTo(12) + .value("var16").isEqualTo(13.13) + .value("var17").isEqualTo(14.14) + .value("var18").isEqualTo(15.15) + .value("var19").isEqualTo(16.16) + .value("var20").isEqualTo(17.17) + .value("var21").isEqualTo(18.18) + .value("var22").isEqualTo(19.19) + .value("var23").isEqualTo(20.20) + .value("var24").isEqualTo(21.21) + .value("var25").isEqualTo(TimeValue.of(9, 1)) + .value("var26").isEqualTo(DateValue.of(2007, 12, 23)) + .value("var27").isEqualTo(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .value("var28").isEqualTo(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .value("var29").isEqualTo(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .value("var30").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var31").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var32").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var33").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var34").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var35").isEqualTo(Locale.FRENCH) + .value("var36").isEqualTo("22") + .value("var37").isEqualTo("23") + .value("var38").isEqualTo("24") + .value("var39").isEqualTo("25") + .value("var40").isEqualTo("26") + .value("var41").isEqualTo("27") + .value("var42").isEqualTo("28") + .value("var43").isEqualTo("29") + .value("var44").isEqualTo("30") + .value("var45").isEqualTo("31") + .value("var46").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var47").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var48").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var49").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var50").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var51").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var52").isEqualTo("32") + .value("var53").isEqualTo("33") + .value("var54").isEqualTo("34") + .value("var55").isEqualTo("35") + .value("var56").isEqualTo("36") + .value("var57").isEqualTo("37") + .value("var58").isEqualTo("38") + .value("var59").isEqualTo(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")) + .value("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) + .value("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) ; assertThat(changes).change().rowAtStartPoint() - .value("var1").isEqualTo(1) - .value("var2").isEqualTo(2) - .value("var3").isEqualTo(3) - .value("var4").isEqualTo(4) - .value("var5").isEqualTo(5) - .value("var6").isEqualTo(6) - .value("var7").isEqualTo(true) - .value("var8").isEqualTo(false) - .value("var9").isEqualTo(true) - .value("var10").isEqualTo(7) - .value("var11").isEqualTo(8) - .value("var12").isEqualTo(9) - .value("var13").isEqualTo(10) - .value("var14").isEqualTo(11) - .value("var15").isEqualTo(12) - .value("var16").isEqualTo(13.13) - .value("var17").isEqualTo(14.14) - .value("var18").isEqualTo(15.15) - .value("var19").isEqualTo(16.16) - .value("var20").isEqualTo(17.17) - .value("var21").isEqualTo(18.18) - .value("var22").isEqualTo(19.19) - .value("var23").isEqualTo(20.20) - .value("var24").isEqualTo(21.21) - .value("var25").isEqualTo(TimeValue.of(9, 1)) - .value("var26").isEqualTo(DateValue.of(2007, 12, 23)) - .value("var27").isEqualTo(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .value("var28").isEqualTo(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .value("var29").isEqualTo(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .value("var30").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var31").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var32").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var33").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var34").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var35").isEqualTo(Locale.FRENCH) - .value("var36").isEqualTo("22") - .value("var37").isEqualTo("23") - .value("var38").isEqualTo("24") - .value("var39").isEqualTo("25") - .value("var40").isEqualTo("26") - .value("var41").isEqualTo("27") - .value("var42").isEqualTo("28") - .value("var43").isEqualTo("29") - .value("var44").isEqualTo("30") - .value("var45").isEqualTo("31") - .value("var46").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var47").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var48").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var49").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var50").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var51").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var52").isEqualTo("32") - .value("var53").isEqualTo("33") - .value("var54").isEqualTo("34") - .value("var55").isEqualTo("35") - .value("var56").isEqualTo("36") - .value("var57").isEqualTo("37") - .value("var58").isEqualTo("38") - .value("var59").isEqualTo(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")) - .value("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) - .value("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) + .value("var1").isEqualTo(1) + .value("var2").isEqualTo(2) + .value("var3").isEqualTo(3) + .value("var4").isEqualTo(4) + .value("var5").isEqualTo(5) + .value("var6").isEqualTo(6) + .value("var7").isEqualTo(true) + .value("var8").isEqualTo(false) + .value("var9").isEqualTo(true) + .value("var10").isEqualTo(7) + .value("var11").isEqualTo(8) + .value("var12").isEqualTo(9) + .value("var13").isEqualTo(10) + .value("var14").isEqualTo(11) + .value("var15").isEqualTo(12) + .value("var16").isEqualTo(13.13) + .value("var17").isEqualTo(14.14) + .value("var18").isEqualTo(15.15) + .value("var19").isEqualTo(16.16) + .value("var20").isEqualTo(17.17) + .value("var21").isEqualTo(18.18) + .value("var22").isEqualTo(19.19) + .value("var23").isEqualTo(20.20) + .value("var24").isEqualTo(21.21) + .value("var25").isEqualTo(TimeValue.of(9, 1)) + .value("var26").isEqualTo(DateValue.of(2007, 12, 23)) + .value("var27").isEqualTo(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .value("var28").isEqualTo(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .value("var29").isEqualTo(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .value("var30").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var31").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var32").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var33").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var34").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var35").isEqualTo(Locale.FRENCH) + .value("var36").isEqualTo("22") + .value("var37").isEqualTo("23") + .value("var38").isEqualTo("24") + .value("var39").isEqualTo("25") + .value("var40").isEqualTo("26") + .value("var41").isEqualTo("27") + .value("var42").isEqualTo("28") + .value("var43").isEqualTo("29") + .value("var44").isEqualTo("30") + .value("var45").isEqualTo("31") + .value("var46").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var47").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var48").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var49").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var50").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var51").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var52").isEqualTo("32") + .value("var53").isEqualTo("33") + .value("var54").isEqualTo("34") + .value("var55").isEqualTo("35") + .value("var56").isEqualTo("36") + .value("var57").isEqualTo("37") + .value("var58").isEqualTo("38") + .value("var59").isEqualTo(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")) + .value("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) + .value("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) ; } @@ -1388,131 +1387,131 @@ public void test_ValueNonEquality_isNotEqualTo() { changes.setEndPointNow(); assertThat(table).row() - .value("var1").isNotEqualTo(10) - .value("var2").isNotEqualTo(200) - .value("var3").isNotEqualTo(30) - .value("var4").isNotEqualTo(40) - .value("var5").isNotEqualTo(50) - .value("var6").isNotEqualTo(60) - .value("var7").isNotEqualTo(false) - .value("var8").isNotEqualTo(true) - .value("var9").isNotEqualTo(false) - .value("var10").isNotEqualTo(70) - .value("var11").isNotEqualTo(80) - .value("var12").isNotEqualTo(90) - .value("var13").isNotEqualTo(100) - .value("var14").isNotEqualTo(110) - .value("var15").isNotEqualTo(120) - .value("var16").isNotEqualTo(130.13) - .value("var17").isNotEqualTo(140.14) - .value("var18").isNotEqualTo(150.15) - .value("var19").isNotEqualTo(160.16) - .value("var20").isNotEqualTo(170.17) - .value("var21").isNotEqualTo(180.18) - .value("var22").isNotEqualTo(190.19) - .value("var23").isNotEqualTo(200.20) - .value("var24").isNotEqualTo(210.21) - .value("var25").isNotEqualTo(TimeValue.of(9, 10)) - .value("var26").isNotEqualTo(DateValue.of(2006, 12, 23)) - .value("var27").isNotEqualTo(DateTimeValue.of(DateValue.of(2006, 12, 23), TimeValue.of(9, 1))) - .value("var28").isNotEqualTo(DateTimeValue.of(DateValue.of(2006, 12, 23), TimeValue.of(9, 1))) - .value("var29").isNotEqualTo(DateTimeValue.of(DateValue.of(2006, 12, 23), TimeValue.of(9, 1))) - .value("var30").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var31").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var32").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var33").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var34").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var35").isNotEqualTo(Locale.ENGLISH) - .value("var36").isNotEqualTo("220") - .value("var37").isNotEqualTo("230") - .value("var38").isNotEqualTo("240") - .value("var39").isNotEqualTo("250") - .value("var40").isNotEqualTo("260") - .value("var41").isNotEqualTo("270") - .value("var42").isNotEqualTo("280") - .value("var43").isNotEqualTo("290") - .value("var44").isNotEqualTo("300") - .value("var45").isNotEqualTo("310") - .value("var46").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var47").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var48").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var49").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var50").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var51").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var52").isNotEqualTo("320") - .value("var53").isNotEqualTo("330") - .value("var54").isNotEqualTo("340") - .value("var55").isNotEqualTo("350") - .value("var56").isNotEqualTo("360") - .value("var57").isNotEqualTo("370") - .value("var58").isNotEqualTo("380") - .value("var59").isNotEqualTo(UUID.fromString("16319617-AE95-4087-9264-D3D21BF611B6")) - .value("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) - .value("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) + .value("var1").isNotEqualTo(10) + .value("var2").isNotEqualTo(200) + .value("var3").isNotEqualTo(30) + .value("var4").isNotEqualTo(40) + .value("var5").isNotEqualTo(50) + .value("var6").isNotEqualTo(60) + .value("var7").isNotEqualTo(false) + .value("var8").isNotEqualTo(true) + .value("var9").isNotEqualTo(false) + .value("var10").isNotEqualTo(70) + .value("var11").isNotEqualTo(80) + .value("var12").isNotEqualTo(90) + .value("var13").isNotEqualTo(100) + .value("var14").isNotEqualTo(110) + .value("var15").isNotEqualTo(120) + .value("var16").isNotEqualTo(130.13) + .value("var17").isNotEqualTo(140.14) + .value("var18").isNotEqualTo(150.15) + .value("var19").isNotEqualTo(160.16) + .value("var20").isNotEqualTo(170.17) + .value("var21").isNotEqualTo(180.18) + .value("var22").isNotEqualTo(190.19) + .value("var23").isNotEqualTo(200.20) + .value("var24").isNotEqualTo(210.21) + .value("var25").isNotEqualTo(TimeValue.of(9, 10)) + .value("var26").isNotEqualTo(DateValue.of(2006, 12, 23)) + .value("var27").isNotEqualTo(DateTimeValue.of(DateValue.of(2006, 12, 23), TimeValue.of(9, 1))) + .value("var28").isNotEqualTo(DateTimeValue.of(DateValue.of(2006, 12, 23), TimeValue.of(9, 1))) + .value("var29").isNotEqualTo(DateTimeValue.of(DateValue.of(2006, 12, 23), TimeValue.of(9, 1))) + .value("var30").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var31").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var32").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var33").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var34").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var35").isNotEqualTo(Locale.ENGLISH) + .value("var36").isNotEqualTo("220") + .value("var37").isNotEqualTo("230") + .value("var38").isNotEqualTo("240") + .value("var39").isNotEqualTo("250") + .value("var40").isNotEqualTo("260") + .value("var41").isNotEqualTo("270") + .value("var42").isNotEqualTo("280") + .value("var43").isNotEqualTo("290") + .value("var44").isNotEqualTo("300") + .value("var45").isNotEqualTo("310") + .value("var46").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var47").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var48").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var49").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var50").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var51").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var52").isNotEqualTo("320") + .value("var53").isNotEqualTo("330") + .value("var54").isNotEqualTo("340") + .value("var55").isNotEqualTo("350") + .value("var56").isNotEqualTo("360") + .value("var57").isNotEqualTo("370") + .value("var58").isNotEqualTo("380") + .value("var59").isNotEqualTo(UUID.fromString("16319617-AE95-4087-9264-D3D21BF611B6")) + .value("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) + .value("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) ; assertThat(changes).change().rowAtStartPoint() - .value("var1").isNotEqualTo(10) - .value("var2").isNotEqualTo(20) - .value("var3").isNotEqualTo(30) - .value("var4").isNotEqualTo(40) - .value("var5").isNotEqualTo(50) - .value("var6").isNotEqualTo(60) - .value("var7").isNotEqualTo(false) - .value("var8").isNotEqualTo(true) - .value("var9").isNotEqualTo(false) - .value("var10").isNotEqualTo(70) - .value("var11").isNotEqualTo(80) - .value("var12").isNotEqualTo(90) - .value("var13").isNotEqualTo(100) - .value("var14").isNotEqualTo(110) - .value("var15").isNotEqualTo(120) - .value("var16").isNotEqualTo(130.13) - .value("var17").isNotEqualTo(140.14) - .value("var18").isNotEqualTo(150.15) - .value("var19").isNotEqualTo(160.16) - .value("var20").isNotEqualTo(170.17) - .value("var21").isNotEqualTo(180.18) - .value("var22").isNotEqualTo(190.19) - .value("var23").isNotEqualTo(200.20) - .value("var24").isNotEqualTo(210.21) - .value("var25").isNotEqualTo(TimeValue.of(9, 10)) - .value("var26").isNotEqualTo(DateValue.of(2006, 12, 23)) - .value("var27").isNotEqualTo(DateTimeValue.of(DateValue.of(2006, 12, 23), TimeValue.of(9, 1))) - .value("var28").isNotEqualTo(DateTimeValue.of(DateValue.of(2006, 12, 23), TimeValue.of(9, 1))) - .value("var29").isNotEqualTo(DateTimeValue.of(DateValue.of(2006, 12, 23), TimeValue.of(9, 1))) - .value("var30").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var31").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var32").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var33").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var34").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var35").isNotEqualTo(Locale.ENGLISH) - .value("var36").isNotEqualTo("220") - .value("var37").isNotEqualTo("230") - .value("var38").isNotEqualTo("240") - .value("var39").isNotEqualTo("250") - .value("var40").isNotEqualTo("260") - .value("var41").isNotEqualTo("270") - .value("var42").isNotEqualTo("280") - .value("var43").isNotEqualTo("290") - .value("var44").isNotEqualTo("300") - .value("var45").isNotEqualTo("310") - .value("var46").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var47").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var48").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var49").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var50").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var51").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var52").isNotEqualTo("320") - .value("var53").isNotEqualTo("330") - .value("var54").isNotEqualTo("340") - .value("var55").isNotEqualTo("350") - .value("var56").isNotEqualTo("360") - .value("var57").isNotEqualTo("370") - .value("var58").isNotEqualTo("380") - .value("var59").isNotEqualTo(UUID.fromString("16319617-AE95-4087-9264-D3D21BF611B6")) - .value("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) - .value("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) + .value("var1").isNotEqualTo(10) + .value("var2").isNotEqualTo(20) + .value("var3").isNotEqualTo(30) + .value("var4").isNotEqualTo(40) + .value("var5").isNotEqualTo(50) + .value("var6").isNotEqualTo(60) + .value("var7").isNotEqualTo(false) + .value("var8").isNotEqualTo(true) + .value("var9").isNotEqualTo(false) + .value("var10").isNotEqualTo(70) + .value("var11").isNotEqualTo(80) + .value("var12").isNotEqualTo(90) + .value("var13").isNotEqualTo(100) + .value("var14").isNotEqualTo(110) + .value("var15").isNotEqualTo(120) + .value("var16").isNotEqualTo(130.13) + .value("var17").isNotEqualTo(140.14) + .value("var18").isNotEqualTo(150.15) + .value("var19").isNotEqualTo(160.16) + .value("var20").isNotEqualTo(170.17) + .value("var21").isNotEqualTo(180.18) + .value("var22").isNotEqualTo(190.19) + .value("var23").isNotEqualTo(200.20) + .value("var24").isNotEqualTo(210.21) + .value("var25").isNotEqualTo(TimeValue.of(9, 10)) + .value("var26").isNotEqualTo(DateValue.of(2006, 12, 23)) + .value("var27").isNotEqualTo(DateTimeValue.of(DateValue.of(2006, 12, 23), TimeValue.of(9, 1))) + .value("var28").isNotEqualTo(DateTimeValue.of(DateValue.of(2006, 12, 23), TimeValue.of(9, 1))) + .value("var29").isNotEqualTo(DateTimeValue.of(DateValue.of(2006, 12, 23), TimeValue.of(9, 1))) + .value("var30").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var31").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var32").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var33").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var34").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var35").isNotEqualTo(Locale.ENGLISH) + .value("var36").isNotEqualTo("220") + .value("var37").isNotEqualTo("230") + .value("var38").isNotEqualTo("240") + .value("var39").isNotEqualTo("250") + .value("var40").isNotEqualTo("260") + .value("var41").isNotEqualTo("270") + .value("var42").isNotEqualTo("280") + .value("var43").isNotEqualTo("290") + .value("var44").isNotEqualTo("300") + .value("var45").isNotEqualTo("310") + .value("var46").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var47").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var48").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var49").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var50").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var51").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var52").isNotEqualTo("320") + .value("var53").isNotEqualTo("330") + .value("var54").isNotEqualTo("340") + .value("var55").isNotEqualTo("350") + .value("var56").isNotEqualTo("360") + .value("var57").isNotEqualTo("370") + .value("var58").isNotEqualTo("380") + .value("var59").isNotEqualTo(UUID.fromString("16319617-AE95-4087-9264-D3D21BF611B6")) + .value("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) + .value("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) ; } @@ -1525,131 +1524,131 @@ public void test_ValueType_isOfType() { changes.setEndPointNow(); assertThat(table).row() - .value("var1").isNumber().isOfType(ValueType.NUMBER) - .value("var2").isNumber().isOfType(ValueType.NUMBER) - .value("var3").isNumber().isOfType(ValueType.NUMBER) - .value("var4").isNumber().isOfType(ValueType.NUMBER) - .value("var5").isNumber().isOfType(ValueType.NUMBER) - .value("var6").isNumber().isOfType(ValueType.NUMBER) - .value("var7").isBoolean().isOfType(ValueType.BOOLEAN) - .value("var8").isBoolean().isOfType(ValueType.BOOLEAN) - .value("var9").isBoolean().isOfType(ValueType.BOOLEAN) - .value("var10").isNumber().isOfType(ValueType.NUMBER) - .value("var11").isNumber().isOfType(ValueType.NUMBER) - .value("var12").isNumber().isOfType(ValueType.NUMBER) - .value("var13").isNumber().isOfType(ValueType.NUMBER) - .value("var14").isNumber().isOfType(ValueType.NUMBER) - .value("var15").isNumber().isOfType(ValueType.NUMBER) - .value("var16").isNumber().isOfType(ValueType.NUMBER) - .value("var17").isNumber().isOfType(ValueType.NUMBER) - .value("var18").isNumber().isOfType(ValueType.NUMBER) - .value("var19").isNumber().isOfType(ValueType.NUMBER) - .value("var20").isNumber().isOfType(ValueType.NUMBER) - .value("var21").isNumber().isOfType(ValueType.NUMBER) - .value("var22").isNumber().isOfType(ValueType.NUMBER) - .value("var23").isNumber().isOfType(ValueType.NUMBER) - .value("var24").isNumber().isOfType(ValueType.NUMBER) - .value("var25").isTime().isOfType(ValueType.TIME) - .value("var26").isDate().isOfType(ValueType.DATE) - .value("var27").isDateTime().isOfType(ValueType.DATE_TIME) - .value("var28").isDateTime().isOfType(ValueType.DATE_TIME) - .value("var29").isDateTime().isOfType(ValueType.DATE_TIME) - .value("var30").isBytes().isOfType(ValueType.BYTES) - .value("var31").isBytes().isOfType(ValueType.BYTES) - .value("var32").isBytes().isOfType(ValueType.BYTES) - .value("var33").isBytes().isOfType(ValueType.BYTES) - .value("var34").isBytes().isOfType(ValueType.BYTES) - .value("var35") - .value("var36").isText().isOfType(ValueType.TEXT) - .value("var37").isText().isOfType(ValueType.TEXT) - .value("var38").isText().isOfType(ValueType.TEXT) - .value("var39").isText().isOfType(ValueType.TEXT) - .value("var40").isText().isOfType(ValueType.TEXT) - .value("var41").isText().isOfType(ValueType.TEXT) - .value("var42").isText().isOfType(ValueType.TEXT) - .value("var43").isText().isOfType(ValueType.TEXT) - .value("var44").isText().isOfType(ValueType.TEXT) - .value("var45").isText().isOfType(ValueType.TEXT) - .value("var46").isBytes().isOfType(ValueType.BYTES) - .value("var47").isBytes().isOfType(ValueType.BYTES) - .value("var48").isBytes().isOfType(ValueType.BYTES) - .value("var49").isBytes().isOfType(ValueType.BYTES) - .value("var50").isBytes().isOfType(ValueType.BYTES) - .value("var51").isBytes().isOfType(ValueType.BYTES) - .value("var52").isText().isOfType(ValueType.TEXT) - .value("var53").isText().isOfType(ValueType.TEXT) - .value("var54").isText().isOfType(ValueType.TEXT) - .value("var55").isText().isOfType(ValueType.TEXT) - .value("var56").isText().isOfType(ValueType.TEXT) - .value("var57").isText().isOfType(ValueType.TEXT) - .value("var58").isText().isOfType(ValueType.TEXT) - .value("var59").isUUID().isOfType(ValueType.UUID) - .value("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) - .value("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) + .value("var1").isNumber().isOfType(ValueType.NUMBER) + .value("var2").isNumber().isOfType(ValueType.NUMBER) + .value("var3").isNumber().isOfType(ValueType.NUMBER) + .value("var4").isNumber().isOfType(ValueType.NUMBER) + .value("var5").isNumber().isOfType(ValueType.NUMBER) + .value("var6").isNumber().isOfType(ValueType.NUMBER) + .value("var7").isBoolean().isOfType(ValueType.BOOLEAN) + .value("var8").isBoolean().isOfType(ValueType.BOOLEAN) + .value("var9").isBoolean().isOfType(ValueType.BOOLEAN) + .value("var10").isNumber().isOfType(ValueType.NUMBER) + .value("var11").isNumber().isOfType(ValueType.NUMBER) + .value("var12").isNumber().isOfType(ValueType.NUMBER) + .value("var13").isNumber().isOfType(ValueType.NUMBER) + .value("var14").isNumber().isOfType(ValueType.NUMBER) + .value("var15").isNumber().isOfType(ValueType.NUMBER) + .value("var16").isNumber().isOfType(ValueType.NUMBER) + .value("var17").isNumber().isOfType(ValueType.NUMBER) + .value("var18").isNumber().isOfType(ValueType.NUMBER) + .value("var19").isNumber().isOfType(ValueType.NUMBER) + .value("var20").isNumber().isOfType(ValueType.NUMBER) + .value("var21").isNumber().isOfType(ValueType.NUMBER) + .value("var22").isNumber().isOfType(ValueType.NUMBER) + .value("var23").isNumber().isOfType(ValueType.NUMBER) + .value("var24").isNumber().isOfType(ValueType.NUMBER) + .value("var25").isTime().isOfType(ValueType.TIME) + .value("var26").isDate().isOfType(ValueType.DATE) + .value("var27").isDateTime().isOfType(ValueType.DATE_TIME) + .value("var28").isDateTime().isOfType(ValueType.DATE_TIME) + .value("var29").isDateTime().isOfType(ValueType.DATE_TIME) + .value("var30").isBytes().isOfType(ValueType.BYTES) + .value("var31").isBytes().isOfType(ValueType.BYTES) + .value("var32").isBytes().isOfType(ValueType.BYTES) + .value("var33").isBytes().isOfType(ValueType.BYTES) + .value("var34").isBytes().isOfType(ValueType.BYTES) + .value("var35") + .value("var36").isText().isOfType(ValueType.TEXT) + .value("var37").isText().isOfType(ValueType.TEXT) + .value("var38").isText().isOfType(ValueType.TEXT) + .value("var39").isText().isOfType(ValueType.TEXT) + .value("var40").isText().isOfType(ValueType.TEXT) + .value("var41").isText().isOfType(ValueType.TEXT) + .value("var42").isText().isOfType(ValueType.TEXT) + .value("var43").isText().isOfType(ValueType.TEXT) + .value("var44").isText().isOfType(ValueType.TEXT) + .value("var45").isText().isOfType(ValueType.TEXT) + .value("var46").isBytes().isOfType(ValueType.BYTES) + .value("var47").isBytes().isOfType(ValueType.BYTES) + .value("var48").isBytes().isOfType(ValueType.BYTES) + .value("var49").isBytes().isOfType(ValueType.BYTES) + .value("var50").isBytes().isOfType(ValueType.BYTES) + .value("var51").isBytes().isOfType(ValueType.BYTES) + .value("var52").isText().isOfType(ValueType.TEXT) + .value("var53").isText().isOfType(ValueType.TEXT) + .value("var54").isText().isOfType(ValueType.TEXT) + .value("var55").isText().isOfType(ValueType.TEXT) + .value("var56").isText().isOfType(ValueType.TEXT) + .value("var57").isText().isOfType(ValueType.TEXT) + .value("var58").isText().isOfType(ValueType.TEXT) + .value("var59").isUUID().isOfType(ValueType.UUID) + .value("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) + .value("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) ; assertThat(changes).change().rowAtStartPoint() - .value("var1").isNumber().isOfType(ValueType.NUMBER) - .value("var2").isNumber().isOfType(ValueType.NUMBER) - .value("var3").isNumber().isOfType(ValueType.NUMBER) - .value("var4").isNumber().isOfType(ValueType.NUMBER) - .value("var5").isNumber().isOfType(ValueType.NUMBER) - .value("var6").isNumber().isOfType(ValueType.NUMBER) - .value("var7").isBoolean().isOfType(ValueType.BOOLEAN) - .value("var8").isBoolean().isOfType(ValueType.BOOLEAN) - .value("var9").isBoolean().isOfType(ValueType.BOOLEAN) - .value("var10").isNumber().isOfType(ValueType.NUMBER) - .value("var11").isNumber().isOfType(ValueType.NUMBER) - .value("var12").isNumber().isOfType(ValueType.NUMBER) - .value("var13").isNumber().isOfType(ValueType.NUMBER) - .value("var14").isNumber().isOfType(ValueType.NUMBER) - .value("var15").isNumber().isOfType(ValueType.NUMBER) - .value("var16").isNumber().isOfType(ValueType.NUMBER) - .value("var17").isNumber().isOfType(ValueType.NUMBER) - .value("var18").isNumber().isOfType(ValueType.NUMBER) - .value("var19").isNumber().isOfType(ValueType.NUMBER) - .value("var20").isNumber().isOfType(ValueType.NUMBER) - .value("var21").isNumber().isOfType(ValueType.NUMBER) - .value("var22").isNumber().isOfType(ValueType.NUMBER) - .value("var23").isNumber().isOfType(ValueType.NUMBER) - .value("var24").isNumber().isOfType(ValueType.NUMBER) - .value("var25").isTime().isOfType(ValueType.TIME) - .value("var26").isDate().isOfType(ValueType.DATE) - .value("var27").isDateTime().isOfType(ValueType.DATE_TIME) - .value("var28").isDateTime().isOfType(ValueType.DATE_TIME) - .value("var29").isDateTime().isOfType(ValueType.DATE_TIME) - .value("var30").isBytes().isOfType(ValueType.BYTES) - .value("var31").isBytes().isOfType(ValueType.BYTES) - .value("var32").isBytes().isOfType(ValueType.BYTES) - .value("var33").isBytes().isOfType(ValueType.BYTES) - .value("var34").isBytes().isOfType(ValueType.BYTES) - .value("var35") - .value("var36").isText().isOfType(ValueType.TEXT) - .value("var37").isText().isOfType(ValueType.TEXT) - .value("var38").isText().isOfType(ValueType.TEXT) - .value("var39").isText().isOfType(ValueType.TEXT) - .value("var40").isText().isOfType(ValueType.TEXT) - .value("var41").isText().isOfType(ValueType.TEXT) - .value("var42").isText().isOfType(ValueType.TEXT) - .value("var43").isText().isOfType(ValueType.TEXT) - .value("var44").isText().isOfType(ValueType.TEXT) - .value("var45").isText().isOfType(ValueType.TEXT) - .value("var46").isBytes().isOfType(ValueType.BYTES) - .value("var47").isBytes().isOfType(ValueType.BYTES) - .value("var48").isBytes().isOfType(ValueType.BYTES) - .value("var49").isBytes().isOfType(ValueType.BYTES) - .value("var50").isBytes().isOfType(ValueType.BYTES) - .value("var51").isBytes().isOfType(ValueType.BYTES) - .value("var52").isText().isOfType(ValueType.TEXT) - .value("var53").isText().isOfType(ValueType.TEXT) - .value("var54").isText().isOfType(ValueType.TEXT) - .value("var55").isText().isOfType(ValueType.TEXT) - .value("var56").isText().isOfType(ValueType.TEXT) - .value("var57").isText().isOfType(ValueType.TEXT) - .value("var58").isText().isOfType(ValueType.TEXT) - .value("var59").isUUID().isOfType(ValueType.UUID) - .value("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) - .value("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) + .value("var1").isNumber().isOfType(ValueType.NUMBER) + .value("var2").isNumber().isOfType(ValueType.NUMBER) + .value("var3").isNumber().isOfType(ValueType.NUMBER) + .value("var4").isNumber().isOfType(ValueType.NUMBER) + .value("var5").isNumber().isOfType(ValueType.NUMBER) + .value("var6").isNumber().isOfType(ValueType.NUMBER) + .value("var7").isBoolean().isOfType(ValueType.BOOLEAN) + .value("var8").isBoolean().isOfType(ValueType.BOOLEAN) + .value("var9").isBoolean().isOfType(ValueType.BOOLEAN) + .value("var10").isNumber().isOfType(ValueType.NUMBER) + .value("var11").isNumber().isOfType(ValueType.NUMBER) + .value("var12").isNumber().isOfType(ValueType.NUMBER) + .value("var13").isNumber().isOfType(ValueType.NUMBER) + .value("var14").isNumber().isOfType(ValueType.NUMBER) + .value("var15").isNumber().isOfType(ValueType.NUMBER) + .value("var16").isNumber().isOfType(ValueType.NUMBER) + .value("var17").isNumber().isOfType(ValueType.NUMBER) + .value("var18").isNumber().isOfType(ValueType.NUMBER) + .value("var19").isNumber().isOfType(ValueType.NUMBER) + .value("var20").isNumber().isOfType(ValueType.NUMBER) + .value("var21").isNumber().isOfType(ValueType.NUMBER) + .value("var22").isNumber().isOfType(ValueType.NUMBER) + .value("var23").isNumber().isOfType(ValueType.NUMBER) + .value("var24").isNumber().isOfType(ValueType.NUMBER) + .value("var25").isTime().isOfType(ValueType.TIME) + .value("var26").isDate().isOfType(ValueType.DATE) + .value("var27").isDateTime().isOfType(ValueType.DATE_TIME) + .value("var28").isDateTime().isOfType(ValueType.DATE_TIME) + .value("var29").isDateTime().isOfType(ValueType.DATE_TIME) + .value("var30").isBytes().isOfType(ValueType.BYTES) + .value("var31").isBytes().isOfType(ValueType.BYTES) + .value("var32").isBytes().isOfType(ValueType.BYTES) + .value("var33").isBytes().isOfType(ValueType.BYTES) + .value("var34").isBytes().isOfType(ValueType.BYTES) + .value("var35") + .value("var36").isText().isOfType(ValueType.TEXT) + .value("var37").isText().isOfType(ValueType.TEXT) + .value("var38").isText().isOfType(ValueType.TEXT) + .value("var39").isText().isOfType(ValueType.TEXT) + .value("var40").isText().isOfType(ValueType.TEXT) + .value("var41").isText().isOfType(ValueType.TEXT) + .value("var42").isText().isOfType(ValueType.TEXT) + .value("var43").isText().isOfType(ValueType.TEXT) + .value("var44").isText().isOfType(ValueType.TEXT) + .value("var45").isText().isOfType(ValueType.TEXT) + .value("var46").isBytes().isOfType(ValueType.BYTES) + .value("var47").isBytes().isOfType(ValueType.BYTES) + .value("var48").isBytes().isOfType(ValueType.BYTES) + .value("var49").isBytes().isOfType(ValueType.BYTES) + .value("var50").isBytes().isOfType(ValueType.BYTES) + .value("var51").isBytes().isOfType(ValueType.BYTES) + .value("var52").isText().isOfType(ValueType.TEXT) + .value("var53").isText().isOfType(ValueType.TEXT) + .value("var54").isText().isOfType(ValueType.TEXT) + .value("var55").isText().isOfType(ValueType.TEXT) + .value("var56").isText().isOfType(ValueType.TEXT) + .value("var57").isText().isOfType(ValueType.TEXT) + .value("var58").isText().isOfType(ValueType.TEXT) + .value("var59").isUUID().isOfType(ValueType.UUID) + .value("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) + .value("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) ; } diff --git a/src/test/java/org/assertj/db/database/h2/H2Database_DataSource_NSNSNS_Test.java b/src/test/java/org/assertj/db/database/h2/H2Database_DataSource_NSNSNS_Test.java index fc068d9a..3076c32d 100644 --- a/src/test/java/org/assertj/db/database/h2/H2Database_DataSource_NSNSNS_Test.java +++ b/src/test/java/org/assertj/db/database/h2/H2Database_DataSource_NSNSNS_Test.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.database.h2; @@ -17,7 +17,6 @@ import static org.junit.Assert.fail; import java.io.ByteArrayOutputStream; - import javax.sql.DataSource; import org.assertj.core.api.Assertions; @@ -51,6 +50,7 @@ public class H2Database_DataSource_NSNSNS_Test extends AbstractH2Test { public void init() { dataSource = dataSourceNSNSNS; } + @Test @NeedReload @@ -80,180 +80,180 @@ public void test_Outputs_output() { ByteArrayOutputStream byteArrayOutputStream15 = new ByteArrayOutputStream(); ByteArrayOutputStream byteArrayOutputStream16 = new ByteArrayOutputStream(); Outputs.output(table).toStream(byteArrayOutputStream0) - .column().toStream(byteArrayOutputStream1) - .value().toStream(byteArrayOutputStream2) - .row().toStream(byteArrayOutputStream3) - .value().toStream(byteArrayOutputStream4); + .column().toStream(byteArrayOutputStream1) + .value().toStream(byteArrayOutputStream2) + .row().toStream(byteArrayOutputStream3) + .value().toStream(byteArrayOutputStream4); output(changes).toStream(byteArrayOutputStream5) - .change().toStream(byteArrayOutputStream6) - .rowAtEndPoint().toStream(byteArrayOutputStream7) - .value().toStream(byteArrayOutputStream8) - .column().toStream(byteArrayOutputStream9) - .valueAtEndPoint().toStream(byteArrayOutputStream10); + .change().toStream(byteArrayOutputStream6) + .rowAtEndPoint().toStream(byteArrayOutputStream7) + .value().toStream(byteArrayOutputStream8) + .column().toStream(byteArrayOutputStream9) + .valueAtEndPoint().toStream(byteArrayOutputStream10); output(changes2).toStream(byteArrayOutputStream11) - .change().toStream(byteArrayOutputStream12) - .rowAtEndPoint().toStream(byteArrayOutputStream13) - .value().toStream(byteArrayOutputStream14) - .column().toStream(byteArrayOutputStream15) - .valueAtEndPoint().toStream(byteArrayOutputStream16); + .change().toStream(byteArrayOutputStream12) + .rowAtEndPoint().toStream(byteArrayOutputStream13) + .value().toStream(byteArrayOutputStream14) + .column().toStream(byteArrayOutputStream15) + .valueAtEndPoint().toStream(byteArrayOutputStream16); Assertions.assertThat(byteArrayOutputStream0.toString()).as("display1").isEqualTo(String.format("[test table]%n" - + "|-----------|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" - + "| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |%n" - + "| | PRIMARY | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 | VAR20 | VAR21 | VAR22 | VAR23 | VAR24 | VAR25 | VAR26 | VAR27 | VAR28 | VAR29 | VAR30 | VAR31 | VAR32 | VAR33 | VAR34 | VAR35 | VAR36 | VAR37 | VAR38 | VAR39 | VAR40 | VAR41 | VAR42 | VAR43 | VAR44 | VAR45 | VAR46 | VAR47 | VAR48 | VAR49 | VAR50 | VAR51 | VAR52 | VAR53 | VAR54 | VAR55 | VAR56 | VAR57 | VAR58 | VAR59 | VAR60 | VAR61 |%n" - + "| | KEY | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (BOOLEAN) | (BOOLEAN) | (BOOLEAN) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TIME) | (DATE) | (DATE_TIME) | (DATE_TIME) | (DATE_TIME) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (NOT_IDENTIFIED : class java.util.Locale) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (UUID) | (NOT_IDENTIFIED) | (NOT_IDENTIFIED) |%n" - + "| | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 | Index : 19 | Index : 20 | Index : 21 | Index : 22 | Index : 23 | Index : 24 | Index : 25 | Index : 26 | Index : 27 | Index : 28 | Index : 29 | Index : 30 | Index : 31 | Index : 32 | Index : 33 | Index : 34 | Index : 35 | Index : 36 | Index : 37 | Index : 38 | Index : 39 | Index : 40 | Index : 41 | Index : 42 | Index : 43 | Index : 44 | Index : 45 | Index : 46 | Index : 47 | Index : 48 | Index : 49 | Index : 50 | Index : 51 | Index : 52 | Index : 53 | Index : 54 | Index : 55 | Index : 56 | Index : 57 | Index : 58 | Index : 59 | Index : 60 |%n" - + "|-----------|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" - + "| Index : 0 | | 1 | 20 | 3 | 4 | 5 | 6 | true | false | true | 7 | 8 | 9 | 10 | 11 | 12 | 13.13 | 14.14 | 15.15 | 16.16 | 17.17 | 18.18 | 19.19 | 20.2 | 21.21 | 09:01:00.000000000 | 2007-12-23 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | ... | ... | ... | ... | ... | fr | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | ... | ... | ... | ... | ... | ... | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 30b443ae-c0c9-4790-9bec-ce1380808435 | null | null |%n" - + "|-----------|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n")); + + "|-----------|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" + + "| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |%n" + + "| | PRIMARY | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 | VAR20 | VAR21 | VAR22 | VAR23 | VAR24 | VAR25 | VAR26 | VAR27 | VAR28 | VAR29 | VAR30 | VAR31 | VAR32 | VAR33 | VAR34 | VAR35 | VAR36 | VAR37 | VAR38 | VAR39 | VAR40 | VAR41 | VAR42 | VAR43 | VAR44 | VAR45 | VAR46 | VAR47 | VAR48 | VAR49 | VAR50 | VAR51 | VAR52 | VAR53 | VAR54 | VAR55 | VAR56 | VAR57 | VAR58 | VAR59 | VAR60 | VAR61 |%n" + + "| | KEY | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (BOOLEAN) | (BOOLEAN) | (BOOLEAN) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TIME) | (DATE) | (DATE_TIME) | (DATE_TIME) | (DATE_TIME) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (NOT_IDENTIFIED : class java.util.Locale) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (UUID) | (NOT_IDENTIFIED) | (NOT_IDENTIFIED) |%n" + + "| | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 | Index : 19 | Index : 20 | Index : 21 | Index : 22 | Index : 23 | Index : 24 | Index : 25 | Index : 26 | Index : 27 | Index : 28 | Index : 29 | Index : 30 | Index : 31 | Index : 32 | Index : 33 | Index : 34 | Index : 35 | Index : 36 | Index : 37 | Index : 38 | Index : 39 | Index : 40 | Index : 41 | Index : 42 | Index : 43 | Index : 44 | Index : 45 | Index : 46 | Index : 47 | Index : 48 | Index : 49 | Index : 50 | Index : 51 | Index : 52 | Index : 53 | Index : 54 | Index : 55 | Index : 56 | Index : 57 | Index : 58 | Index : 59 | Index : 60 |%n" + + "|-----------|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" + + "| Index : 0 | | 1 | 20 | 3 | 4 | 5 | 6 | true | false | true | 7 | 8 | 9 | 10 | 11 | 12 | 13.13 | 14.14 | 15.15 | 16.16 | 17.17 | 18.18 | 19.19 | 20.2 | 21.21 | 09:01:00.000000000 | 2007-12-23 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | ... | ... | ... | ... | ... | fr | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | ... | ... | ... | ... | ... | ... | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 30b443ae-c0c9-4790-9bec-ce1380808435 | null | null |%n" + + "|-----------|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n")); Assertions.assertThat(byteArrayOutputStream1.toString()).as("display2").isEqualTo(String.format("[Column at index 0 (column name : VAR1) of test table]%n" - + "|-----------|----------|%n" - + "| | VAR1 |%n" - + "| | (NUMBER) |%n" - + "|-----------|----------|%n" - + "| Index : 0 | 1 |%n" - + "|-----------|----------|%n")); + + "|-----------|----------|%n" + + "| | VAR1 |%n" + + "| | (NUMBER) |%n" + + "|-----------|----------|%n" + + "| Index : 0 | 1 |%n" + + "|-----------|----------|%n")); Assertions.assertThat(byteArrayOutputStream2.toString()).as("display3").isEqualTo(String.format("[Value at index 0 of Column at index 0 (column name : VAR1) of test table]%n" - + "|----------|%n" - + "| VAR1 |%n" - + "| (NUMBER) |%n" - + "|----------|%n" - + "| 1 |%n" - + "|----------|%n")); + + "|----------|%n" + + "| VAR1 |%n" + + "| (NUMBER) |%n" + + "|----------|%n" + + "| 1 |%n" + + "|----------|%n")); Assertions.assertThat(byteArrayOutputStream3.toString()).as("display4").isEqualTo(String.format("[Row at index 0 of test table]%n" - + "|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" - + "| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |%n" - + "| PRIMARY | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 | VAR20 | VAR21 | VAR22 | VAR23 | VAR24 | VAR25 | VAR26 | VAR27 | VAR28 | VAR29 | VAR30 | VAR31 | VAR32 | VAR33 | VAR34 | VAR35 | VAR36 | VAR37 | VAR38 | VAR39 | VAR40 | VAR41 | VAR42 | VAR43 | VAR44 | VAR45 | VAR46 | VAR47 | VAR48 | VAR49 | VAR50 | VAR51 | VAR52 | VAR53 | VAR54 | VAR55 | VAR56 | VAR57 | VAR58 | VAR59 | VAR60 | VAR61 |%n" - + "| KEY | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (BOOLEAN) | (BOOLEAN) | (BOOLEAN) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TIME) | (DATE) | (DATE_TIME) | (DATE_TIME) | (DATE_TIME) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (NOT_IDENTIFIED : class java.util.Locale) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (UUID) | (NOT_IDENTIFIED) | (NOT_IDENTIFIED) |%n" - + "| | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 | Index : 19 | Index : 20 | Index : 21 | Index : 22 | Index : 23 | Index : 24 | Index : 25 | Index : 26 | Index : 27 | Index : 28 | Index : 29 | Index : 30 | Index : 31 | Index : 32 | Index : 33 | Index : 34 | Index : 35 | Index : 36 | Index : 37 | Index : 38 | Index : 39 | Index : 40 | Index : 41 | Index : 42 | Index : 43 | Index : 44 | Index : 45 | Index : 46 | Index : 47 | Index : 48 | Index : 49 | Index : 50 | Index : 51 | Index : 52 | Index : 53 | Index : 54 | Index : 55 | Index : 56 | Index : 57 | Index : 58 | Index : 59 | Index : 60 |%n" - + "|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" - + "| | 1 | 20 | 3 | 4 | 5 | 6 | true | false | true | 7 | 8 | 9 | 10 | 11 | 12 | 13.13 | 14.14 | 15.15 | 16.16 | 17.17 | 18.18 | 19.19 | 20.2 | 21.21 | 09:01:00.000000000 | 2007-12-23 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | ... | ... | ... | ... | ... | fr | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | ... | ... | ... | ... | ... | ... | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 30b443ae-c0c9-4790-9bec-ce1380808435 | null | null |%n" - + "|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n")); + + "|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" + + "| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |%n" + + "| PRIMARY | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 | VAR20 | VAR21 | VAR22 | VAR23 | VAR24 | VAR25 | VAR26 | VAR27 | VAR28 | VAR29 | VAR30 | VAR31 | VAR32 | VAR33 | VAR34 | VAR35 | VAR36 | VAR37 | VAR38 | VAR39 | VAR40 | VAR41 | VAR42 | VAR43 | VAR44 | VAR45 | VAR46 | VAR47 | VAR48 | VAR49 | VAR50 | VAR51 | VAR52 | VAR53 | VAR54 | VAR55 | VAR56 | VAR57 | VAR58 | VAR59 | VAR60 | VAR61 |%n" + + "| KEY | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (BOOLEAN) | (BOOLEAN) | (BOOLEAN) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TIME) | (DATE) | (DATE_TIME) | (DATE_TIME) | (DATE_TIME) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (NOT_IDENTIFIED : class java.util.Locale) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (UUID) | (NOT_IDENTIFIED) | (NOT_IDENTIFIED) |%n" + + "| | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 | Index : 19 | Index : 20 | Index : 21 | Index : 22 | Index : 23 | Index : 24 | Index : 25 | Index : 26 | Index : 27 | Index : 28 | Index : 29 | Index : 30 | Index : 31 | Index : 32 | Index : 33 | Index : 34 | Index : 35 | Index : 36 | Index : 37 | Index : 38 | Index : 39 | Index : 40 | Index : 41 | Index : 42 | Index : 43 | Index : 44 | Index : 45 | Index : 46 | Index : 47 | Index : 48 | Index : 49 | Index : 50 | Index : 51 | Index : 52 | Index : 53 | Index : 54 | Index : 55 | Index : 56 | Index : 57 | Index : 58 | Index : 59 | Index : 60 |%n" + + "|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" + + "| | 1 | 20 | 3 | 4 | 5 | 6 | true | false | true | 7 | 8 | 9 | 10 | 11 | 12 | 13.13 | 14.14 | 15.15 | 16.16 | 17.17 | 18.18 | 19.19 | 20.2 | 21.21 | 09:01:00.000000000 | 2007-12-23 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | ... | ... | ... | ... | ... | fr | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | ... | ... | ... | ... | ... | ... | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 30b443ae-c0c9-4790-9bec-ce1380808435 | null | null |%n" + + "|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n")); Assertions.assertThat(byteArrayOutputStream4.toString()).as("display5").isEqualTo(String.format("[Value at index 0 (column name : VAR1) of Row at index 0 of test table]%n" - + "|----------|%n" - + "| VAR1 |%n" - + "| (NUMBER) |%n" - + "|----------|%n" - + "| 1 |%n" - + "|----------|%n")); + + "|----------|%n" + + "| VAR1 |%n" + + "| (NUMBER) |%n" + + "|----------|%n" + + "| 1 |%n" + + "|----------|%n")); Assertions.assertThat(byteArrayOutputStream5.toString()).as("display6").isEqualTo(String.format("[Changes on test table of a data source]%n" - + "|-----------|----------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" - + "| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |%n" - + "| | TYPE | TABLE | PRIMARY | | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 | VAR20 | VAR21 | VAR22 | VAR23 | VAR24 | VAR25 | VAR26 | VAR27 | VAR28 | VAR29 | VAR30 | VAR31 | VAR32 | VAR33 | VAR34 | VAR35 | VAR36 | VAR37 | VAR38 | VAR39 | VAR40 | VAR41 | VAR42 | VAR43 | VAR44 | VAR45 | VAR46 | VAR47 | VAR48 | VAR49 | VAR50 | VAR51 | VAR52 | VAR53 | VAR54 | VAR55 | VAR56 | VAR57 | VAR58 | VAR59 | VAR60 | VAR61 |%n" - + "| | | | KEY | | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (BOOLEAN) | (BOOLEAN) | (BOOLEAN) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TIME) | (DATE) | (DATE_TIME) | (DATE_TIME) | (DATE_TIME) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (NOT_IDENTIFIED : class java.util.Locale) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (UUID) | (NOT_IDENTIFIED) | (NOT_IDENTIFIED) |%n" - + "| | | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 | Index : 19 | Index : 20 | Index : 21 | Index : 22 | Index : 23 | Index : 24 | Index : 25 | Index : 26 | Index : 27 | Index : 28 | Index : 29 | Index : 30 | Index : 31 | Index : 32 | Index : 33 | Index : 34 | Index : 35 | Index : 36 | Index : 37 | Index : 38 | Index : 39 | Index : 40 | Index : 41 | Index : 42 | Index : 43 | Index : 44 | Index : 45 | Index : 46 | Index : 47 | Index : 48 | Index : 49 | Index : 50 | Index : 51 | Index : 52 | Index : 53 | Index : 54 | Index : 55 | Index : 56 | Index : 57 | Index : 58 | Index : 59 | Index : 60 |%n" - + "|-----------|----------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" - + "| | | | | At start point | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |%n" - + "| Index : 0 | CREATION | test | |----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" - + "| | | | | At end point | 1 | 20 | 3 | 4 | 5 | 6 | true | false | true | 7 | 8 | 9 | 10 | 11 | 12 | 13.13 | 14.14 | 15.15 | 16.16 | 17.17 | 18.18 | 19.19 | 20.2 | 21.21 | 09:01:00.000000000 | 2007-12-23 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | ... | ... | ... | ... | ... | fr | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | ... | ... | ... | ... | ... | ... | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 30b443ae-c0c9-4790-9bec-ce1380808435 | null | null |%n" - + "|-----------|----------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" - + "|-----------|----------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" - + "| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |%n" - + "| | TYPE | TABLE | PRIMARY | | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 | VAR20 | VAR21 | VAR22 | VAR23 | VAR24 | VAR25 | VAR26 | VAR27 | VAR28 | VAR29 | VAR30 | VAR31 | VAR32 | VAR33 | VAR34 | VAR35 | VAR36 | VAR37 | VAR38 | VAR39 | VAR40 | VAR41 | VAR42 | VAR43 | VAR44 | VAR45 | VAR46 | VAR47 | VAR48 | VAR49 | VAR50 | VAR51 | VAR52 | VAR53 | VAR54 | VAR55 | VAR56 | VAR57 | VAR58 | VAR59 | VAR60 | VAR61 |%n" - + "| | | | KEY | | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (BOOLEAN) | (BOOLEAN) | (BOOLEAN) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TIME) | (DATE) | (DATE_TIME) | (DATE_TIME) | (DATE_TIME) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (NOT_IDENTIFIED : class java.util.Locale) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (UUID) | (NOT_IDENTIFIED) | (NOT_IDENTIFIED) |%n" - + "| | | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 | Index : 19 | Index : 20 | Index : 21 | Index : 22 | Index : 23 | Index : 24 | Index : 25 | Index : 26 | Index : 27 | Index : 28 | Index : 29 | Index : 30 | Index : 31 | Index : 32 | Index : 33 | Index : 34 | Index : 35 | Index : 36 | Index : 37 | Index : 38 | Index : 39 | Index : 40 | Index : 41 | Index : 42 | Index : 43 | Index : 44 | Index : 45 | Index : 46 | Index : 47 | Index : 48 | Index : 49 | Index : 50 | Index : 51 | Index : 52 | Index : 53 | Index : 54 | Index : 55 | Index : 56 | Index : 57 | Index : 58 | Index : 59 | Index : 60 |%n" - + "|-----------|----------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" - + "| | | | | At start point | 1 | 2 | 3 | 4 | 5 | 6 | true | false | true | 7 | 8 | 9 | 10 | 11 | 12 | 13.13 | 14.14 | 15.15 | 16.16 | 17.17 | 18.18 | 19.19 | 20.2 | 21.21 | 09:01:00.000000000 | 2007-12-23 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | ... | ... | ... | ... | ... | fr | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | ... | ... | ... | ... | ... | ... | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 30b443ae-c0c9-4790-9bec-ce1380808435 | null | null |%n" - + "| Index : 1 | DELETION | test | |----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" - + "| | | | | At end point | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |%n" - + "|-----------|----------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n")); + + "|-----------|----------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" + + "| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |%n" + + "| | TYPE | TABLE | PRIMARY | | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 | VAR20 | VAR21 | VAR22 | VAR23 | VAR24 | VAR25 | VAR26 | VAR27 | VAR28 | VAR29 | VAR30 | VAR31 | VAR32 | VAR33 | VAR34 | VAR35 | VAR36 | VAR37 | VAR38 | VAR39 | VAR40 | VAR41 | VAR42 | VAR43 | VAR44 | VAR45 | VAR46 | VAR47 | VAR48 | VAR49 | VAR50 | VAR51 | VAR52 | VAR53 | VAR54 | VAR55 | VAR56 | VAR57 | VAR58 | VAR59 | VAR60 | VAR61 |%n" + + "| | | | KEY | | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (BOOLEAN) | (BOOLEAN) | (BOOLEAN) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TIME) | (DATE) | (DATE_TIME) | (DATE_TIME) | (DATE_TIME) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (NOT_IDENTIFIED : class java.util.Locale) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (UUID) | (NOT_IDENTIFIED) | (NOT_IDENTIFIED) |%n" + + "| | | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 | Index : 19 | Index : 20 | Index : 21 | Index : 22 | Index : 23 | Index : 24 | Index : 25 | Index : 26 | Index : 27 | Index : 28 | Index : 29 | Index : 30 | Index : 31 | Index : 32 | Index : 33 | Index : 34 | Index : 35 | Index : 36 | Index : 37 | Index : 38 | Index : 39 | Index : 40 | Index : 41 | Index : 42 | Index : 43 | Index : 44 | Index : 45 | Index : 46 | Index : 47 | Index : 48 | Index : 49 | Index : 50 | Index : 51 | Index : 52 | Index : 53 | Index : 54 | Index : 55 | Index : 56 | Index : 57 | Index : 58 | Index : 59 | Index : 60 |%n" + + "|-----------|----------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" + + "| | | | | At start point | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |%n" + + "| Index : 0 | CREATION | test | |----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" + + "| | | | | At end point | 1 | 20 | 3 | 4 | 5 | 6 | true | false | true | 7 | 8 | 9 | 10 | 11 | 12 | 13.13 | 14.14 | 15.15 | 16.16 | 17.17 | 18.18 | 19.19 | 20.2 | 21.21 | 09:01:00.000000000 | 2007-12-23 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | ... | ... | ... | ... | ... | fr | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | ... | ... | ... | ... | ... | ... | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 30b443ae-c0c9-4790-9bec-ce1380808435 | null | null |%n" + + "|-----------|----------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" + + "|-----------|----------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" + + "| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |%n" + + "| | TYPE | TABLE | PRIMARY | | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 | VAR20 | VAR21 | VAR22 | VAR23 | VAR24 | VAR25 | VAR26 | VAR27 | VAR28 | VAR29 | VAR30 | VAR31 | VAR32 | VAR33 | VAR34 | VAR35 | VAR36 | VAR37 | VAR38 | VAR39 | VAR40 | VAR41 | VAR42 | VAR43 | VAR44 | VAR45 | VAR46 | VAR47 | VAR48 | VAR49 | VAR50 | VAR51 | VAR52 | VAR53 | VAR54 | VAR55 | VAR56 | VAR57 | VAR58 | VAR59 | VAR60 | VAR61 |%n" + + "| | | | KEY | | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (BOOLEAN) | (BOOLEAN) | (BOOLEAN) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TIME) | (DATE) | (DATE_TIME) | (DATE_TIME) | (DATE_TIME) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (NOT_IDENTIFIED : class java.util.Locale) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (UUID) | (NOT_IDENTIFIED) | (NOT_IDENTIFIED) |%n" + + "| | | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 | Index : 19 | Index : 20 | Index : 21 | Index : 22 | Index : 23 | Index : 24 | Index : 25 | Index : 26 | Index : 27 | Index : 28 | Index : 29 | Index : 30 | Index : 31 | Index : 32 | Index : 33 | Index : 34 | Index : 35 | Index : 36 | Index : 37 | Index : 38 | Index : 39 | Index : 40 | Index : 41 | Index : 42 | Index : 43 | Index : 44 | Index : 45 | Index : 46 | Index : 47 | Index : 48 | Index : 49 | Index : 50 | Index : 51 | Index : 52 | Index : 53 | Index : 54 | Index : 55 | Index : 56 | Index : 57 | Index : 58 | Index : 59 | Index : 60 |%n" + + "|-----------|----------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" + + "| | | | | At start point | 1 | 2 | 3 | 4 | 5 | 6 | true | false | true | 7 | 8 | 9 | 10 | 11 | 12 | 13.13 | 14.14 | 15.15 | 16.16 | 17.17 | 18.18 | 19.19 | 20.2 | 21.21 | 09:01:00.000000000 | 2007-12-23 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | ... | ... | ... | ... | ... | fr | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | ... | ... | ... | ... | ... | ... | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 30b443ae-c0c9-4790-9bec-ce1380808435 | null | null |%n" + + "| Index : 1 | DELETION | test | |----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" + + "| | | | | At end point | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |%n" + + "|-----------|----------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n")); Assertions.assertThat(byteArrayOutputStream6.toString()).as("display7").isEqualTo(String.format("[Change at index 0 of Changes on test table of a data source]%n" - + "|----------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" - + "| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |%n" - + "| TYPE | TABLE | PRIMARY | | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 | VAR20 | VAR21 | VAR22 | VAR23 | VAR24 | VAR25 | VAR26 | VAR27 | VAR28 | VAR29 | VAR30 | VAR31 | VAR32 | VAR33 | VAR34 | VAR35 | VAR36 | VAR37 | VAR38 | VAR39 | VAR40 | VAR41 | VAR42 | VAR43 | VAR44 | VAR45 | VAR46 | VAR47 | VAR48 | VAR49 | VAR50 | VAR51 | VAR52 | VAR53 | VAR54 | VAR55 | VAR56 | VAR57 | VAR58 | VAR59 | VAR60 | VAR61 |%n" - + "| | | KEY | | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (BOOLEAN) | (BOOLEAN) | (BOOLEAN) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TIME) | (DATE) | (DATE_TIME) | (DATE_TIME) | (DATE_TIME) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (NOT_IDENTIFIED : class java.util.Locale) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (UUID) | (NOT_IDENTIFIED) | (NOT_IDENTIFIED) |%n" - + "| | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 | Index : 19 | Index : 20 | Index : 21 | Index : 22 | Index : 23 | Index : 24 | Index : 25 | Index : 26 | Index : 27 | Index : 28 | Index : 29 | Index : 30 | Index : 31 | Index : 32 | Index : 33 | Index : 34 | Index : 35 | Index : 36 | Index : 37 | Index : 38 | Index : 39 | Index : 40 | Index : 41 | Index : 42 | Index : 43 | Index : 44 | Index : 45 | Index : 46 | Index : 47 | Index : 48 | Index : 49 | Index : 50 | Index : 51 | Index : 52 | Index : 53 | Index : 54 | Index : 55 | Index : 56 | Index : 57 | Index : 58 | Index : 59 | Index : 60 |%n" - + "|----------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" - + "| | | | At start point | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |%n" - + "| CREATION | test | |----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" - + "| | | | At end point | 1 | 20 | 3 | 4 | 5 | 6 | true | false | true | 7 | 8 | 9 | 10 | 11 | 12 | 13.13 | 14.14 | 15.15 | 16.16 | 17.17 | 18.18 | 19.19 | 20.2 | 21.21 | 09:01:00.000000000 | 2007-12-23 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | ... | ... | ... | ... | ... | fr | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | ... | ... | ... | ... | ... | ... | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 30b443ae-c0c9-4790-9bec-ce1380808435 | null | null |%n" - + "|----------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n")); + + "|----------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" + + "| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |%n" + + "| TYPE | TABLE | PRIMARY | | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 | VAR20 | VAR21 | VAR22 | VAR23 | VAR24 | VAR25 | VAR26 | VAR27 | VAR28 | VAR29 | VAR30 | VAR31 | VAR32 | VAR33 | VAR34 | VAR35 | VAR36 | VAR37 | VAR38 | VAR39 | VAR40 | VAR41 | VAR42 | VAR43 | VAR44 | VAR45 | VAR46 | VAR47 | VAR48 | VAR49 | VAR50 | VAR51 | VAR52 | VAR53 | VAR54 | VAR55 | VAR56 | VAR57 | VAR58 | VAR59 | VAR60 | VAR61 |%n" + + "| | | KEY | | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (BOOLEAN) | (BOOLEAN) | (BOOLEAN) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TIME) | (DATE) | (DATE_TIME) | (DATE_TIME) | (DATE_TIME) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (NOT_IDENTIFIED : class java.util.Locale) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (UUID) | (NOT_IDENTIFIED) | (NOT_IDENTIFIED) |%n" + + "| | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 | Index : 19 | Index : 20 | Index : 21 | Index : 22 | Index : 23 | Index : 24 | Index : 25 | Index : 26 | Index : 27 | Index : 28 | Index : 29 | Index : 30 | Index : 31 | Index : 32 | Index : 33 | Index : 34 | Index : 35 | Index : 36 | Index : 37 | Index : 38 | Index : 39 | Index : 40 | Index : 41 | Index : 42 | Index : 43 | Index : 44 | Index : 45 | Index : 46 | Index : 47 | Index : 48 | Index : 49 | Index : 50 | Index : 51 | Index : 52 | Index : 53 | Index : 54 | Index : 55 | Index : 56 | Index : 57 | Index : 58 | Index : 59 | Index : 60 |%n" + + "|----------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" + + "| | | | At start point | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |%n" + + "| CREATION | test | |----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" + + "| | | | At end point | 1 | 20 | 3 | 4 | 5 | 6 | true | false | true | 7 | 8 | 9 | 10 | 11 | 12 | 13.13 | 14.14 | 15.15 | 16.16 | 17.17 | 18.18 | 19.19 | 20.2 | 21.21 | 09:01:00.000000000 | 2007-12-23 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | ... | ... | ... | ... | ... | fr | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | ... | ... | ... | ... | ... | ... | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 30b443ae-c0c9-4790-9bec-ce1380808435 | null | null |%n" + + "|----------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n")); Assertions.assertThat(byteArrayOutputStream7.toString()).as("display8").isEqualTo(String.format("[Row at end point of Change at index 0 of Changes on test table of a data source]%n" - + "|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" - + "| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |%n" - + "| PRIMARY | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 | VAR20 | VAR21 | VAR22 | VAR23 | VAR24 | VAR25 | VAR26 | VAR27 | VAR28 | VAR29 | VAR30 | VAR31 | VAR32 | VAR33 | VAR34 | VAR35 | VAR36 | VAR37 | VAR38 | VAR39 | VAR40 | VAR41 | VAR42 | VAR43 | VAR44 | VAR45 | VAR46 | VAR47 | VAR48 | VAR49 | VAR50 | VAR51 | VAR52 | VAR53 | VAR54 | VAR55 | VAR56 | VAR57 | VAR58 | VAR59 | VAR60 | VAR61 |%n" - + "| KEY | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (BOOLEAN) | (BOOLEAN) | (BOOLEAN) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TIME) | (DATE) | (DATE_TIME) | (DATE_TIME) | (DATE_TIME) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (NOT_IDENTIFIED : class java.util.Locale) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (UUID) | (NOT_IDENTIFIED) | (NOT_IDENTIFIED) |%n" - + "| | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 | Index : 19 | Index : 20 | Index : 21 | Index : 22 | Index : 23 | Index : 24 | Index : 25 | Index : 26 | Index : 27 | Index : 28 | Index : 29 | Index : 30 | Index : 31 | Index : 32 | Index : 33 | Index : 34 | Index : 35 | Index : 36 | Index : 37 | Index : 38 | Index : 39 | Index : 40 | Index : 41 | Index : 42 | Index : 43 | Index : 44 | Index : 45 | Index : 46 | Index : 47 | Index : 48 | Index : 49 | Index : 50 | Index : 51 | Index : 52 | Index : 53 | Index : 54 | Index : 55 | Index : 56 | Index : 57 | Index : 58 | Index : 59 | Index : 60 |%n" - + "|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" - + "| | 1 | 20 | 3 | 4 | 5 | 6 | true | false | true | 7 | 8 | 9 | 10 | 11 | 12 | 13.13 | 14.14 | 15.15 | 16.16 | 17.17 | 18.18 | 19.19 | 20.2 | 21.21 | 09:01:00.000000000 | 2007-12-23 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | ... | ... | ... | ... | ... | fr | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | ... | ... | ... | ... | ... | ... | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 30b443ae-c0c9-4790-9bec-ce1380808435 | null | null |%n" - + "|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n")); + + "|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" + + "| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |%n" + + "| PRIMARY | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 | VAR20 | VAR21 | VAR22 | VAR23 | VAR24 | VAR25 | VAR26 | VAR27 | VAR28 | VAR29 | VAR30 | VAR31 | VAR32 | VAR33 | VAR34 | VAR35 | VAR36 | VAR37 | VAR38 | VAR39 | VAR40 | VAR41 | VAR42 | VAR43 | VAR44 | VAR45 | VAR46 | VAR47 | VAR48 | VAR49 | VAR50 | VAR51 | VAR52 | VAR53 | VAR54 | VAR55 | VAR56 | VAR57 | VAR58 | VAR59 | VAR60 | VAR61 |%n" + + "| KEY | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (BOOLEAN) | (BOOLEAN) | (BOOLEAN) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TIME) | (DATE) | (DATE_TIME) | (DATE_TIME) | (DATE_TIME) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (NOT_IDENTIFIED : class java.util.Locale) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (UUID) | (NOT_IDENTIFIED) | (NOT_IDENTIFIED) |%n" + + "| | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 | Index : 19 | Index : 20 | Index : 21 | Index : 22 | Index : 23 | Index : 24 | Index : 25 | Index : 26 | Index : 27 | Index : 28 | Index : 29 | Index : 30 | Index : 31 | Index : 32 | Index : 33 | Index : 34 | Index : 35 | Index : 36 | Index : 37 | Index : 38 | Index : 39 | Index : 40 | Index : 41 | Index : 42 | Index : 43 | Index : 44 | Index : 45 | Index : 46 | Index : 47 | Index : 48 | Index : 49 | Index : 50 | Index : 51 | Index : 52 | Index : 53 | Index : 54 | Index : 55 | Index : 56 | Index : 57 | Index : 58 | Index : 59 | Index : 60 |%n" + + "|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" + + "| | 1 | 20 | 3 | 4 | 5 | 6 | true | false | true | 7 | 8 | 9 | 10 | 11 | 12 | 13.13 | 14.14 | 15.15 | 16.16 | 17.17 | 18.18 | 19.19 | 20.2 | 21.21 | 09:01:00.000000000 | 2007-12-23 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | ... | ... | ... | ... | ... | fr | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | ... | ... | ... | ... | ... | ... | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 30b443ae-c0c9-4790-9bec-ce1380808435 | null | null |%n" + + "|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n")); Assertions.assertThat(byteArrayOutputStream8.toString()).as("display9").isEqualTo(String.format("[Value at index 0 (column name : VAR1) of Row at end point of Change at index 0 of Changes on test table of a data source]%n" - + "|----------|%n" - + "| VAR1 |%n" - + "| (NUMBER) |%n" - + "|----------|%n" - + "| 1 |%n" - + "|----------|%n")); + + "|----------|%n" + + "| VAR1 |%n" + + "| (NUMBER) |%n" + + "|----------|%n" + + "| 1 |%n" + + "|----------|%n")); Assertions.assertThat(byteArrayOutputStream9.toString()).as("display10").isEqualTo(String.format("[Column at index 0 (column name : VAR1) of Change at index 0 of Changes on test table of a data source]%n" - + "|----------------|----------|%n" - + "| | VAR1 |%n" - + "| | (NUMBER) |%n" - + "|----------------|----------|%n" - + "| At start point | null |%n" - + "|----------------|----------|%n" - + "| At end point | 1 |%n" - + "|----------------|----------|%n")); + + "|----------------|----------|%n" + + "| | VAR1 |%n" + + "| | (NUMBER) |%n" + + "|----------------|----------|%n" + + "| At start point | null |%n" + + "|----------------|----------|%n" + + "| At end point | 1 |%n" + + "|----------------|----------|%n")); Assertions.assertThat(byteArrayOutputStream10.toString()).as("display11").isEqualTo(String.format("[Value at end point of Column at index 0 (column name : VAR1) of Change at index 0 of Changes on test table of a data source]%n" - + "|----------|%n" - + "| VAR1 |%n" - + "| (NUMBER) |%n" - + "|----------|%n" - + "| 1 |%n" - + "|----------|%n")); + + "|----------|%n" + + "| VAR1 |%n" + + "| (NUMBER) |%n" + + "|----------|%n" + + "| 1 |%n" + + "|----------|%n")); Assertions.assertThat(byteArrayOutputStream11.toString()).as("display12").isEqualTo(String.format("[Changes on TEST table of a data source]%n" - + "|-----------|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" - + "| | | | | | * | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |%n" - + "| | TYPE | TABLE | PRIMARY | | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 | VAR20 | VAR21 | VAR22 | VAR23 | VAR24 | VAR25 | VAR26 | VAR27 | VAR28 | VAR29 | VAR30 | VAR31 | VAR32 | VAR33 | VAR34 | VAR35 | VAR36 | VAR37 | VAR38 | VAR39 | VAR40 | VAR41 | VAR42 | VAR43 | VAR44 | VAR45 | VAR46 | VAR47 | VAR48 | VAR49 | VAR50 | VAR51 | VAR52 | VAR53 | VAR54 | VAR55 | VAR56 | VAR57 | VAR58 | VAR59 | VAR60 | VAR61 |%n" - + "| | | | KEY | | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (BOOLEAN) | (BOOLEAN) | (BOOLEAN) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TIME) | (DATE) | (DATE_TIME) | (DATE_TIME) | (DATE_TIME) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (NOT_IDENTIFIED : class java.util.Locale) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (UUID) | (NOT_IDENTIFIED) | (NOT_IDENTIFIED) |%n" - + "| | | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 | Index : 19 | Index : 20 | Index : 21 | Index : 22 | Index : 23 | Index : 24 | Index : 25 | Index : 26 | Index : 27 | Index : 28 | Index : 29 | Index : 30 | Index : 31 | Index : 32 | Index : 33 | Index : 34 | Index : 35 | Index : 36 | Index : 37 | Index : 38 | Index : 39 | Index : 40 | Index : 41 | Index : 42 | Index : 43 | Index : 44 | Index : 45 | Index : 46 | Index : 47 | Index : 48 | Index : 49 | Index : 50 | Index : 51 | Index : 52 | Index : 53 | Index : 54 | Index : 55 | Index : 56 | Index : 57 | Index : 58 | Index : 59 | Index : 60 |%n" - + "|-----------|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" - + "| | | | | At start point | 1 | 2 | 3 | 4 | 5 | 6 | true | false | true | 7 | 8 | 9 | 10 | 11 | 12 | 13.13 | 14.14 | 15.15 | 16.16 | 17.17 | 18.18 | 19.19 | 20.2 | 21.21 | 09:01:00.000000000 | 2007-12-23 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | ... | ... | ... | ... | ... | fr | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | ... | ... | ... | ... | ... | ... | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 30b443ae-c0c9-4790-9bec-ce1380808435 | null | null |%n" - + "| Index : 0 | MODIFICATION | TEST | 1 |----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" - + "| | | | | At end point | 1 | 20 | 3 | 4 | 5 | 6 | true | false | true | 7 | 8 | 9 | 10 | 11 | 12 | 13.13 | 14.14 | 15.15 | 16.16 | 17.17 | 18.18 | 19.19 | 20.2 | 21.21 | 09:01:00.000000000 | 2007-12-23 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | ... | ... | ... | ... | ... | fr | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | ... | ... | ... | ... | ... | ... | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 30b443ae-c0c9-4790-9bec-ce1380808435 | null | null |%n" - + "|-----------|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n")); + + "|-----------|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" + + "| | | | | | * | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |%n" + + "| | TYPE | TABLE | PRIMARY | | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 | VAR20 | VAR21 | VAR22 | VAR23 | VAR24 | VAR25 | VAR26 | VAR27 | VAR28 | VAR29 | VAR30 | VAR31 | VAR32 | VAR33 | VAR34 | VAR35 | VAR36 | VAR37 | VAR38 | VAR39 | VAR40 | VAR41 | VAR42 | VAR43 | VAR44 | VAR45 | VAR46 | VAR47 | VAR48 | VAR49 | VAR50 | VAR51 | VAR52 | VAR53 | VAR54 | VAR55 | VAR56 | VAR57 | VAR58 | VAR59 | VAR60 | VAR61 |%n" + + "| | | | KEY | | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (BOOLEAN) | (BOOLEAN) | (BOOLEAN) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TIME) | (DATE) | (DATE_TIME) | (DATE_TIME) | (DATE_TIME) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (NOT_IDENTIFIED : class java.util.Locale) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (UUID) | (NOT_IDENTIFIED) | (NOT_IDENTIFIED) |%n" + + "| | | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 | Index : 19 | Index : 20 | Index : 21 | Index : 22 | Index : 23 | Index : 24 | Index : 25 | Index : 26 | Index : 27 | Index : 28 | Index : 29 | Index : 30 | Index : 31 | Index : 32 | Index : 33 | Index : 34 | Index : 35 | Index : 36 | Index : 37 | Index : 38 | Index : 39 | Index : 40 | Index : 41 | Index : 42 | Index : 43 | Index : 44 | Index : 45 | Index : 46 | Index : 47 | Index : 48 | Index : 49 | Index : 50 | Index : 51 | Index : 52 | Index : 53 | Index : 54 | Index : 55 | Index : 56 | Index : 57 | Index : 58 | Index : 59 | Index : 60 |%n" + + "|-----------|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" + + "| | | | | At start point | 1 | 2 | 3 | 4 | 5 | 6 | true | false | true | 7 | 8 | 9 | 10 | 11 | 12 | 13.13 | 14.14 | 15.15 | 16.16 | 17.17 | 18.18 | 19.19 | 20.2 | 21.21 | 09:01:00.000000000 | 2007-12-23 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | ... | ... | ... | ... | ... | fr | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | ... | ... | ... | ... | ... | ... | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 30b443ae-c0c9-4790-9bec-ce1380808435 | null | null |%n" + + "| Index : 0 | MODIFICATION | TEST | 1 |----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" + + "| | | | | At end point | 1 | 20 | 3 | 4 | 5 | 6 | true | false | true | 7 | 8 | 9 | 10 | 11 | 12 | 13.13 | 14.14 | 15.15 | 16.16 | 17.17 | 18.18 | 19.19 | 20.2 | 21.21 | 09:01:00.000000000 | 2007-12-23 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | ... | ... | ... | ... | ... | fr | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | ... | ... | ... | ... | ... | ... | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 30b443ae-c0c9-4790-9bec-ce1380808435 | null | null |%n" + + "|-----------|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n")); Assertions.assertThat(byteArrayOutputStream12.toString()).as("display13").isEqualTo(String.format("[Change at index 0 (with primary key : [1]) of Changes on TEST table of a data source]%n" - + "|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" - + "| | | | | * | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |%n" - + "| TYPE | TABLE | PRIMARY | | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 | VAR20 | VAR21 | VAR22 | VAR23 | VAR24 | VAR25 | VAR26 | VAR27 | VAR28 | VAR29 | VAR30 | VAR31 | VAR32 | VAR33 | VAR34 | VAR35 | VAR36 | VAR37 | VAR38 | VAR39 | VAR40 | VAR41 | VAR42 | VAR43 | VAR44 | VAR45 | VAR46 | VAR47 | VAR48 | VAR49 | VAR50 | VAR51 | VAR52 | VAR53 | VAR54 | VAR55 | VAR56 | VAR57 | VAR58 | VAR59 | VAR60 | VAR61 |%n" - + "| | | KEY | | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (BOOLEAN) | (BOOLEAN) | (BOOLEAN) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TIME) | (DATE) | (DATE_TIME) | (DATE_TIME) | (DATE_TIME) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (NOT_IDENTIFIED : class java.util.Locale) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (UUID) | (NOT_IDENTIFIED) | (NOT_IDENTIFIED) |%n" - + "| | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 | Index : 19 | Index : 20 | Index : 21 | Index : 22 | Index : 23 | Index : 24 | Index : 25 | Index : 26 | Index : 27 | Index : 28 | Index : 29 | Index : 30 | Index : 31 | Index : 32 | Index : 33 | Index : 34 | Index : 35 | Index : 36 | Index : 37 | Index : 38 | Index : 39 | Index : 40 | Index : 41 | Index : 42 | Index : 43 | Index : 44 | Index : 45 | Index : 46 | Index : 47 | Index : 48 | Index : 49 | Index : 50 | Index : 51 | Index : 52 | Index : 53 | Index : 54 | Index : 55 | Index : 56 | Index : 57 | Index : 58 | Index : 59 | Index : 60 |%n" - + "|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" - + "| | | | At start point | 1 | 2 | 3 | 4 | 5 | 6 | true | false | true | 7 | 8 | 9 | 10 | 11 | 12 | 13.13 | 14.14 | 15.15 | 16.16 | 17.17 | 18.18 | 19.19 | 20.2 | 21.21 | 09:01:00.000000000 | 2007-12-23 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | ... | ... | ... | ... | ... | fr | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | ... | ... | ... | ... | ... | ... | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 30b443ae-c0c9-4790-9bec-ce1380808435 | null | null |%n" - + "| MODIFICATION | TEST | 1 |----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" - + "| | | | At end point | 1 | 20 | 3 | 4 | 5 | 6 | true | false | true | 7 | 8 | 9 | 10 | 11 | 12 | 13.13 | 14.14 | 15.15 | 16.16 | 17.17 | 18.18 | 19.19 | 20.2 | 21.21 | 09:01:00.000000000 | 2007-12-23 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | ... | ... | ... | ... | ... | fr | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | ... | ... | ... | ... | ... | ... | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 30b443ae-c0c9-4790-9bec-ce1380808435 | null | null |%n" - + "|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n")); + + "|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" + + "| | | | | * | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |%n" + + "| TYPE | TABLE | PRIMARY | | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 | VAR20 | VAR21 | VAR22 | VAR23 | VAR24 | VAR25 | VAR26 | VAR27 | VAR28 | VAR29 | VAR30 | VAR31 | VAR32 | VAR33 | VAR34 | VAR35 | VAR36 | VAR37 | VAR38 | VAR39 | VAR40 | VAR41 | VAR42 | VAR43 | VAR44 | VAR45 | VAR46 | VAR47 | VAR48 | VAR49 | VAR50 | VAR51 | VAR52 | VAR53 | VAR54 | VAR55 | VAR56 | VAR57 | VAR58 | VAR59 | VAR60 | VAR61 |%n" + + "| | | KEY | | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (BOOLEAN) | (BOOLEAN) | (BOOLEAN) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TIME) | (DATE) | (DATE_TIME) | (DATE_TIME) | (DATE_TIME) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (NOT_IDENTIFIED : class java.util.Locale) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (UUID) | (NOT_IDENTIFIED) | (NOT_IDENTIFIED) |%n" + + "| | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 | Index : 19 | Index : 20 | Index : 21 | Index : 22 | Index : 23 | Index : 24 | Index : 25 | Index : 26 | Index : 27 | Index : 28 | Index : 29 | Index : 30 | Index : 31 | Index : 32 | Index : 33 | Index : 34 | Index : 35 | Index : 36 | Index : 37 | Index : 38 | Index : 39 | Index : 40 | Index : 41 | Index : 42 | Index : 43 | Index : 44 | Index : 45 | Index : 46 | Index : 47 | Index : 48 | Index : 49 | Index : 50 | Index : 51 | Index : 52 | Index : 53 | Index : 54 | Index : 55 | Index : 56 | Index : 57 | Index : 58 | Index : 59 | Index : 60 |%n" + + "|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" + + "| | | | At start point | 1 | 2 | 3 | 4 | 5 | 6 | true | false | true | 7 | 8 | 9 | 10 | 11 | 12 | 13.13 | 14.14 | 15.15 | 16.16 | 17.17 | 18.18 | 19.19 | 20.2 | 21.21 | 09:01:00.000000000 | 2007-12-23 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | ... | ... | ... | ... | ... | fr | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | ... | ... | ... | ... | ... | ... | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 30b443ae-c0c9-4790-9bec-ce1380808435 | null | null |%n" + + "| MODIFICATION | TEST | 1 |----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" + + "| | | | At end point | 1 | 20 | 3 | 4 | 5 | 6 | true | false | true | 7 | 8 | 9 | 10 | 11 | 12 | 13.13 | 14.14 | 15.15 | 16.16 | 17.17 | 18.18 | 19.19 | 20.2 | 21.21 | 09:01:00.000000000 | 2007-12-23 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | ... | ... | ... | ... | ... | fr | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | ... | ... | ... | ... | ... | ... | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 30b443ae-c0c9-4790-9bec-ce1380808435 | null | null |%n" + + "|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n")); Assertions.assertThat(byteArrayOutputStream13.toString()).as("display14").isEqualTo(String.format("[Row at end point of Change at index 0 (with primary key : [1]) of Changes on TEST table of a data source]%n" - + "|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" - + "| | * | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |%n" - + "| PRIMARY | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 | VAR20 | VAR21 | VAR22 | VAR23 | VAR24 | VAR25 | VAR26 | VAR27 | VAR28 | VAR29 | VAR30 | VAR31 | VAR32 | VAR33 | VAR34 | VAR35 | VAR36 | VAR37 | VAR38 | VAR39 | VAR40 | VAR41 | VAR42 | VAR43 | VAR44 | VAR45 | VAR46 | VAR47 | VAR48 | VAR49 | VAR50 | VAR51 | VAR52 | VAR53 | VAR54 | VAR55 | VAR56 | VAR57 | VAR58 | VAR59 | VAR60 | VAR61 |%n" - + "| KEY | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (BOOLEAN) | (BOOLEAN) | (BOOLEAN) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TIME) | (DATE) | (DATE_TIME) | (DATE_TIME) | (DATE_TIME) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (NOT_IDENTIFIED : class java.util.Locale) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (UUID) | (NOT_IDENTIFIED) | (NOT_IDENTIFIED) |%n" - + "| | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 | Index : 19 | Index : 20 | Index : 21 | Index : 22 | Index : 23 | Index : 24 | Index : 25 | Index : 26 | Index : 27 | Index : 28 | Index : 29 | Index : 30 | Index : 31 | Index : 32 | Index : 33 | Index : 34 | Index : 35 | Index : 36 | Index : 37 | Index : 38 | Index : 39 | Index : 40 | Index : 41 | Index : 42 | Index : 43 | Index : 44 | Index : 45 | Index : 46 | Index : 47 | Index : 48 | Index : 49 | Index : 50 | Index : 51 | Index : 52 | Index : 53 | Index : 54 | Index : 55 | Index : 56 | Index : 57 | Index : 58 | Index : 59 | Index : 60 |%n" - + "|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" - + "| 1 | 1 | 20 | 3 | 4 | 5 | 6 | true | false | true | 7 | 8 | 9 | 10 | 11 | 12 | 13.13 | 14.14 | 15.15 | 16.16 | 17.17 | 18.18 | 19.19 | 20.2 | 21.21 | 09:01:00.000000000 | 2007-12-23 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | ... | ... | ... | ... | ... | fr | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | ... | ... | ... | ... | ... | ... | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 30b443ae-c0c9-4790-9bec-ce1380808435 | null | null |%n" - + "|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n")); + + "|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" + + "| | * | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |%n" + + "| PRIMARY | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 | VAR20 | VAR21 | VAR22 | VAR23 | VAR24 | VAR25 | VAR26 | VAR27 | VAR28 | VAR29 | VAR30 | VAR31 | VAR32 | VAR33 | VAR34 | VAR35 | VAR36 | VAR37 | VAR38 | VAR39 | VAR40 | VAR41 | VAR42 | VAR43 | VAR44 | VAR45 | VAR46 | VAR47 | VAR48 | VAR49 | VAR50 | VAR51 | VAR52 | VAR53 | VAR54 | VAR55 | VAR56 | VAR57 | VAR58 | VAR59 | VAR60 | VAR61 |%n" + + "| KEY | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (BOOLEAN) | (BOOLEAN) | (BOOLEAN) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TIME) | (DATE) | (DATE_TIME) | (DATE_TIME) | (DATE_TIME) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (NOT_IDENTIFIED : class java.util.Locale) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (UUID) | (NOT_IDENTIFIED) | (NOT_IDENTIFIED) |%n" + + "| | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 | Index : 19 | Index : 20 | Index : 21 | Index : 22 | Index : 23 | Index : 24 | Index : 25 | Index : 26 | Index : 27 | Index : 28 | Index : 29 | Index : 30 | Index : 31 | Index : 32 | Index : 33 | Index : 34 | Index : 35 | Index : 36 | Index : 37 | Index : 38 | Index : 39 | Index : 40 | Index : 41 | Index : 42 | Index : 43 | Index : 44 | Index : 45 | Index : 46 | Index : 47 | Index : 48 | Index : 49 | Index : 50 | Index : 51 | Index : 52 | Index : 53 | Index : 54 | Index : 55 | Index : 56 | Index : 57 | Index : 58 | Index : 59 | Index : 60 |%n" + + "|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" + + "| 1 | 1 | 20 | 3 | 4 | 5 | 6 | true | false | true | 7 | 8 | 9 | 10 | 11 | 12 | 13.13 | 14.14 | 15.15 | 16.16 | 17.17 | 18.18 | 19.19 | 20.2 | 21.21 | 09:01:00.000000000 | 2007-12-23 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | ... | ... | ... | ... | ... | fr | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | ... | ... | ... | ... | ... | ... | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 30b443ae-c0c9-4790-9bec-ce1380808435 | null | null |%n" + + "|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n")); Assertions.assertThat(byteArrayOutputStream14.toString()).as("display15").isEqualTo(String.format("[Value at index 0 (column name : VAR1) of Row at end point of Change at index 0 (with primary key : [1]) of Changes on TEST table of a data source]%n" - + "|----------|%n" - + "| VAR1 |%n" - + "| (NUMBER) |%n" - + "|----------|%n" - + "| 1 |%n" - + "|----------|%n")); + + "|----------|%n" + + "| VAR1 |%n" + + "| (NUMBER) |%n" + + "|----------|%n" + + "| 1 |%n" + + "|----------|%n")); Assertions.assertThat(byteArrayOutputStream15.toString()).as("display16").isEqualTo(String.format("[Column at index 0 (column name : VAR1) of Change at index 0 (with primary key : [1]) of Changes on TEST table of a data source]%n" - + "|----------------|----------|%n" - + "| | VAR1 |%n" - + "| | (NUMBER) |%n" - + "|----------------|----------|%n" - + "| At start point | 1 |%n" - + "|----------------|----------|%n" - + "| At end point | 1 |%n" - + "|----------------|----------|%n")); + + "|----------------|----------|%n" + + "| | VAR1 |%n" + + "| | (NUMBER) |%n" + + "|----------------|----------|%n" + + "| At start point | 1 |%n" + + "|----------------|----------|%n" + + "| At end point | 1 |%n" + + "|----------------|----------|%n")); Assertions.assertThat(byteArrayOutputStream16.toString()).as("display17").isEqualTo(String.format("[Value at end point of Column at index 0 (column name : VAR1) of Change at index 0 (with primary key : [1]) of Changes on TEST table of a data source]%n" - + "|----------|%n" - + "| VAR1 |%n" - + "| (NUMBER) |%n" - + "|----------|%n" - + "| 1 |%n" - + "|----------|%n")); + + "|----------|%n" + + "| VAR1 |%n" + + "| (NUMBER) |%n" + + "|----------|%n" + + "| 1 |%n" + + "|----------|%n")); } @Test @@ -269,25 +269,23 @@ public void should_fail_because_primary_key_is_different() { try { assertThat(changes).change().hasPksNames("var1"); fail("An exception must be raised"); - } - catch (AssertionError e) { + } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).as("message1").isEqualTo(String.format("[Change at index 0 of Changes on test table of a data source] %n" - + "Expecting :%n" - + " [\"var1\"]%n" - + "to be the name of the columns of the primary keys but was:%n" - + " []")); + + "Expecting :%n" + + " [\"var1\"]%n" + + "to be the name of the columns of the primary keys but was:%n" + + " []")); } try { assertThat(changes2).change().hasPksNames("var1"); fail("An exception must be raised"); - } - catch (AssertionError e) { + } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).as("message2").isEqualTo(String.format("[Change at index 0 (with primary key : [1]) of Changes on TEST table of a data source] %n" - + "Expecting :%n" - + " [\"var1\"]%n" - + "to be the name of the columns of the primary keys but was:%n" - + " [\"VAR1\"]")); + + "Expecting :%n" + + " [\"var1\"]%n" + + "to be the name of the columns of the primary keys but was:%n" + + " [\"VAR1\"]")); } } @@ -304,70 +302,64 @@ public void should_fail_because_column_name_is_different() { try { assertThat(table).column().hasColumnName("Var1"); fail("An exception must be raised"); - } - catch (AssertionError e) { + } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).as("message1").isEqualTo(String.format("[Column at index 0 (column name : VAR1) of test table] %n" - + "Expecting :%n" - + " \"Var1\"%n" - + "to be the name of the column but was:%n" - + " \"VAR1\"")); + + "Expecting :%n" + + " \"Var1\"%n" + + "to be the name of the column but was:%n" + + " \"VAR1\"")); } try { assertThat(table).row().value().hasColumnName("Var1"); fail("An exception must be raised"); - } - catch (AssertionError e) { + } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).as("message2").isEqualTo(String.format("[Value at index 0 (column name : VAR1) of Row at index 0 of test table] %n" - + "Expecting :%n" - + " \"Var1\"%n" - + "to be the name of the column but was:%n" - + " \"VAR1\"")); + + "Expecting :%n" + + " \"Var1\"%n" + + "to be the name of the column but was:%n" + + " \"VAR1\"")); } try { assertThat(changes).change().column().hasColumnName("Var1"); fail("An exception must be raised"); - } - catch (AssertionError e) { + } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).as("message3").isEqualTo(String.format("[Column at index 0 (column name : VAR1) of Change at index 0 of Changes on test table of a data source] %n" - + "Expecting :%n" - + " \"Var1\"%n" - + "to be the name of the column but was:%n" - + " \"VAR1\"")); + + "Expecting :%n" + + " \"Var1\"%n" + + "to be the name of the column but was:%n" + + " \"VAR1\"")); } try { assertThat(changes).change().rowAtEndPoint().value().hasColumnName("Var1"); fail("An exception must be raised"); - } - catch (AssertionError e) { + } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).as("message4").isEqualTo(String.format("[Value at index 0 (column name : VAR1) of Row at end point of Change at index 0 of Changes on test table of a data source] %n" - + "Expecting :%n" - + " \"Var1\"%n" - + "to be the name of the column but was:%n" - + " \"VAR1\"")); + + "Expecting :%n" + + " \"Var1\"%n" + + "to be the name of the column but was:%n" + + " \"VAR1\"")); } try { assertThat(changes2).change().column().hasColumnName("Var1"); fail("An exception must be raised"); - } - catch (AssertionError e) { + } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).as("message5").isEqualTo(String.format("[Column at index 0 (column name : VAR1) of Change at index 0 (with primary key : [1]) of Changes on TEST table of a data source] %n" - + "Expecting :%n" - + " \"Var1\"%n" - + "to be the name of the column but was:%n" - + " \"VAR1\"")); + + "Expecting :%n" + + " \"Var1\"%n" + + "to be the name of the column but was:%n" + + " \"VAR1\"")); } try { assertThat(changes2).change().rowAtEndPoint().value().hasColumnName("Var1"); fail("An exception must be raised"); - } - catch (AssertionError e) { + } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).as("message6").isEqualTo(String.format("[Value at index 0 (column name : VAR1) of Row at end point of Change at index 0 (with primary key : [1]) of Changes on TEST table of a data source] %n" - + "Expecting :%n" - + " \"Var1\"%n" - + "to be the name of the column but was:%n" - + " \"VAR1\"")); + + "Expecting :%n" + + " \"Var1\"%n" + + "to be the name of the column but was:%n" + + " \"VAR1\"")); } } @@ -384,58 +376,52 @@ public void should_fail_because_column_name_is_wrong_to_navigate() { try { assertThat(table).column("Var1"); fail("An exception must be raised"); - } - catch (AssertJDBException e) { + } catch (AssertJDBException e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("Column does not exist%n" - + "in <[VAR1, VAR2, VAR3, VAR4, VAR5, VAR6, VAR7, VAR8, VAR9, VAR10, VAR11, VAR12, VAR13, VAR14, VAR15, VAR16, VAR17, VAR18, VAR19, VAR20, VAR21, VAR22, VAR23, VAR24, VAR25, VAR26, VAR27, VAR28, VAR29, VAR30, VAR31, VAR32, VAR33, VAR34, VAR35, VAR36, VAR37, VAR38, VAR39, VAR40, VAR41, VAR42, VAR43, VAR44, VAR45, VAR46, VAR47, VAR48, VAR49, VAR50, VAR51, VAR52, VAR53, VAR54, VAR55, VAR56, VAR57, VAR58, VAR59, VAR60, VAR61]>%n" - + "with comparison STRICT - Strictly compare the case")); + + "in <[VAR1, VAR2, VAR3, VAR4, VAR5, VAR6, VAR7, VAR8, VAR9, VAR10, VAR11, VAR12, VAR13, VAR14, VAR15, VAR16, VAR17, VAR18, VAR19, VAR20, VAR21, VAR22, VAR23, VAR24, VAR25, VAR26, VAR27, VAR28, VAR29, VAR30, VAR31, VAR32, VAR33, VAR34, VAR35, VAR36, VAR37, VAR38, VAR39, VAR40, VAR41, VAR42, VAR43, VAR44, VAR45, VAR46, VAR47, VAR48, VAR49, VAR50, VAR51, VAR52, VAR53, VAR54, VAR55, VAR56, VAR57, VAR58, VAR59, VAR60, VAR61]>%n" + + "with comparison STRICT - Strictly compare the case")); } try { assertThat(table).row().value("Var1"); fail("An exception must be raised"); - } - catch (AssertJDBException e) { + } catch (AssertJDBException e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("Column does not exist%n" - + "in <[VAR1, VAR2, VAR3, VAR4, VAR5, VAR6, VAR7, VAR8, VAR9, VAR10, VAR11, VAR12, VAR13, VAR14, VAR15, VAR16, VAR17, VAR18, VAR19, VAR20, VAR21, VAR22, VAR23, VAR24, VAR25, VAR26, VAR27, VAR28, VAR29, VAR30, VAR31, VAR32, VAR33, VAR34, VAR35, VAR36, VAR37, VAR38, VAR39, VAR40, VAR41, VAR42, VAR43, VAR44, VAR45, VAR46, VAR47, VAR48, VAR49, VAR50, VAR51, VAR52, VAR53, VAR54, VAR55, VAR56, VAR57, VAR58, VAR59, VAR60, VAR61]>%n" - + "with comparison STRICT - Strictly compare the case")); + + "in <[VAR1, VAR2, VAR3, VAR4, VAR5, VAR6, VAR7, VAR8, VAR9, VAR10, VAR11, VAR12, VAR13, VAR14, VAR15, VAR16, VAR17, VAR18, VAR19, VAR20, VAR21, VAR22, VAR23, VAR24, VAR25, VAR26, VAR27, VAR28, VAR29, VAR30, VAR31, VAR32, VAR33, VAR34, VAR35, VAR36, VAR37, VAR38, VAR39, VAR40, VAR41, VAR42, VAR43, VAR44, VAR45, VAR46, VAR47, VAR48, VAR49, VAR50, VAR51, VAR52, VAR53, VAR54, VAR55, VAR56, VAR57, VAR58, VAR59, VAR60, VAR61]>%n" + + "with comparison STRICT - Strictly compare the case")); } try { assertThat(changes).change().column("Var1"); fail("An exception must be raised"); - } - catch (AssertJDBException e) { + } catch (AssertJDBException e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("Column does not exist%n" - + "in <[VAR1, VAR2, VAR3, VAR4, VAR5, VAR6, VAR7, VAR8, VAR9, VAR10, VAR11, VAR12, VAR13, VAR14, VAR15, VAR16, VAR17, VAR18, VAR19, VAR20, VAR21, VAR22, VAR23, VAR24, VAR25, VAR26, VAR27, VAR28, VAR29, VAR30, VAR31, VAR32, VAR33, VAR34, VAR35, VAR36, VAR37, VAR38, VAR39, VAR40, VAR41, VAR42, VAR43, VAR44, VAR45, VAR46, VAR47, VAR48, VAR49, VAR50, VAR51, VAR52, VAR53, VAR54, VAR55, VAR56, VAR57, VAR58, VAR59, VAR60, VAR61]>%n" - + "with comparison STRICT - Strictly compare the case")); + + "in <[VAR1, VAR2, VAR3, VAR4, VAR5, VAR6, VAR7, VAR8, VAR9, VAR10, VAR11, VAR12, VAR13, VAR14, VAR15, VAR16, VAR17, VAR18, VAR19, VAR20, VAR21, VAR22, VAR23, VAR24, VAR25, VAR26, VAR27, VAR28, VAR29, VAR30, VAR31, VAR32, VAR33, VAR34, VAR35, VAR36, VAR37, VAR38, VAR39, VAR40, VAR41, VAR42, VAR43, VAR44, VAR45, VAR46, VAR47, VAR48, VAR49, VAR50, VAR51, VAR52, VAR53, VAR54, VAR55, VAR56, VAR57, VAR58, VAR59, VAR60, VAR61]>%n" + + "with comparison STRICT - Strictly compare the case")); } try { assertThat(changes).change().rowAtEndPoint().value("Var1"); fail("An exception must be raised"); - } - catch (AssertJDBException e) { + } catch (AssertJDBException e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("Column does not exist%n" - + "in <[VAR1, VAR2, VAR3, VAR4, VAR5, VAR6, VAR7, VAR8, VAR9, VAR10, VAR11, VAR12, VAR13, VAR14, VAR15, VAR16, VAR17, VAR18, VAR19, VAR20, VAR21, VAR22, VAR23, VAR24, VAR25, VAR26, VAR27, VAR28, VAR29, VAR30, VAR31, VAR32, VAR33, VAR34, VAR35, VAR36, VAR37, VAR38, VAR39, VAR40, VAR41, VAR42, VAR43, VAR44, VAR45, VAR46, VAR47, VAR48, VAR49, VAR50, VAR51, VAR52, VAR53, VAR54, VAR55, VAR56, VAR57, VAR58, VAR59, VAR60, VAR61]>%n" - + "with comparison STRICT - Strictly compare the case")); + + "in <[VAR1, VAR2, VAR3, VAR4, VAR5, VAR6, VAR7, VAR8, VAR9, VAR10, VAR11, VAR12, VAR13, VAR14, VAR15, VAR16, VAR17, VAR18, VAR19, VAR20, VAR21, VAR22, VAR23, VAR24, VAR25, VAR26, VAR27, VAR28, VAR29, VAR30, VAR31, VAR32, VAR33, VAR34, VAR35, VAR36, VAR37, VAR38, VAR39, VAR40, VAR41, VAR42, VAR43, VAR44, VAR45, VAR46, VAR47, VAR48, VAR49, VAR50, VAR51, VAR52, VAR53, VAR54, VAR55, VAR56, VAR57, VAR58, VAR59, VAR60, VAR61]>%n" + + "with comparison STRICT - Strictly compare the case")); } try { assertThat(changes2).change().column("Var1"); fail("An exception must be raised"); - } - catch (AssertJDBException e) { + } catch (AssertJDBException e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("Column does not exist%n" - + "in <[VAR1, VAR2, VAR3, VAR4, VAR5, VAR6, VAR7, VAR8, VAR9, VAR10, VAR11, VAR12, VAR13, VAR14, VAR15, VAR16, VAR17, VAR18, VAR19, VAR20, VAR21, VAR22, VAR23, VAR24, VAR25, VAR26, VAR27, VAR28, VAR29, VAR30, VAR31, VAR32, VAR33, VAR34, VAR35, VAR36, VAR37, VAR38, VAR39, VAR40, VAR41, VAR42, VAR43, VAR44, VAR45, VAR46, VAR47, VAR48, VAR49, VAR50, VAR51, VAR52, VAR53, VAR54, VAR55, VAR56, VAR57, VAR58, VAR59, VAR60, VAR61]>%n" - + "with comparison STRICT - Strictly compare the case")); + + "in <[VAR1, VAR2, VAR3, VAR4, VAR5, VAR6, VAR7, VAR8, VAR9, VAR10, VAR11, VAR12, VAR13, VAR14, VAR15, VAR16, VAR17, VAR18, VAR19, VAR20, VAR21, VAR22, VAR23, VAR24, VAR25, VAR26, VAR27, VAR28, VAR29, VAR30, VAR31, VAR32, VAR33, VAR34, VAR35, VAR36, VAR37, VAR38, VAR39, VAR40, VAR41, VAR42, VAR43, VAR44, VAR45, VAR46, VAR47, VAR48, VAR49, VAR50, VAR51, VAR52, VAR53, VAR54, VAR55, VAR56, VAR57, VAR58, VAR59, VAR60, VAR61]>%n" + + "with comparison STRICT - Strictly compare the case")); } try { assertThat(changes2).change().rowAtEndPoint().value("Var1"); fail("An exception must be raised"); - } - catch (AssertJDBException e) { + } catch (AssertJDBException e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("Column does not exist%n" - + "in <[VAR1, VAR2, VAR3, VAR4, VAR5, VAR6, VAR7, VAR8, VAR9, VAR10, VAR11, VAR12, VAR13, VAR14, VAR15, VAR16, VAR17, VAR18, VAR19, VAR20, VAR21, VAR22, VAR23, VAR24, VAR25, VAR26, VAR27, VAR28, VAR29, VAR30, VAR31, VAR32, VAR33, VAR34, VAR35, VAR36, VAR37, VAR38, VAR39, VAR40, VAR41, VAR42, VAR43, VAR44, VAR45, VAR46, VAR47, VAR48, VAR49, VAR50, VAR51, VAR52, VAR53, VAR54, VAR55, VAR56, VAR57, VAR58, VAR59, VAR60, VAR61]>%n" - + "with comparison STRICT - Strictly compare the case")); + + "in <[VAR1, VAR2, VAR3, VAR4, VAR5, VAR6, VAR7, VAR8, VAR9, VAR10, VAR11, VAR12, VAR13, VAR14, VAR15, VAR16, VAR17, VAR18, VAR19, VAR20, VAR21, VAR22, VAR23, VAR24, VAR25, VAR26, VAR27, VAR28, VAR29, VAR30, VAR31, VAR32, VAR33, VAR34, VAR35, VAR36, VAR37, VAR38, VAR39, VAR40, VAR41, VAR42, VAR43, VAR44, VAR45, VAR46, VAR47, VAR48, VAR49, VAR50, VAR51, VAR52, VAR53, VAR54, VAR55, VAR56, VAR57, VAR58, VAR59, VAR60, VAR61]>%n" + + "with comparison STRICT - Strictly compare the case")); } } @@ -452,24 +438,22 @@ public void should_fail_because_table_name_is_different() { try { assertThat(changes).change().isOnTable("teSt"); fail("An exception must be raised"); - } - catch (AssertionError e) { + } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).as("message1").isEqualTo(String.format("[Change at index 0 of Changes on test table of a data source] %n" - + "Expecting to be on the table:%n" - + " <\"teSt\">%n" - + "but was on the table:%n" - + " <\"test\">")); + + "Expecting to be on the table:%n" + + " <\"teSt\">%n" + + "but was on the table:%n" + + " <\"test\">")); } try { assertThat(changes2).change().isOnTable("teSt"); fail("An exception must be raised"); - } - catch (AssertionError e) { + } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).as("message2").isEqualTo(String.format("[Change at index 0 (with primary key : [1]) of Changes on TEST table of a data source] %n" - + "Expecting to be on the table:%n" - + " <\"teSt\">%n" - + "but was on the table:%n" - + " <\"TEST\">")); + + "Expecting to be on the table:%n" + + " <\"teSt\">%n" + + "but was on the table:%n" + + " <\"TEST\">")); } } @@ -486,44 +470,38 @@ public void should_fail_because_table_name_is_wrong_to_navigate() { try { assertThat(changes).changeOnTable("teSt"); fail("An exception must be raised"); - } - catch (AssertJDBException e) { + } catch (AssertJDBException e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("Index 0 out of the limits [0, 0[")); } try { assertThat(changes).changeOnTable("teSt", 0); fail("An exception must be raised"); - } - catch (AssertJDBException e) { + } catch (AssertJDBException e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("Index 0 out of the limits [0, 0[")); } try { assertThat(changes).changeOnTableWithPks("teSt", 1); fail("An exception must be raised"); - } - catch (AssertJDBException e) { + } catch (AssertJDBException e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("No change found for table teSt and primary keys [1]")); } try { assertThat(changes2).changeOnTable("teSt"); fail("An exception must be raised"); - } - catch (AssertJDBException e) { + } catch (AssertJDBException e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("Index 0 out of the limits [0, 0[")); } try { assertThat(changes2).changeOnTable("teSt", 0); fail("An exception must be raised"); - } - catch (AssertJDBException e) { + } catch (AssertJDBException e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("Index 0 out of the limits [0, 0[")); } try { assertThat(changes2).changeOnTableWithPks("teSt", 1); fail("An exception must be raised"); - } - catch (AssertJDBException e) { + } catch (AssertJDBException e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("No change found for table teSt and primary keys [1]")); } } diff --git a/src/test/java/org/assertj/db/database/h2/H2Database_DataSource_UIUIUI_Test.java b/src/test/java/org/assertj/db/database/h2/H2Database_DataSource_UIUIUI_Test.java index 71874e95..cbfb1c6d 100644 --- a/src/test/java/org/assertj/db/database/h2/H2Database_DataSource_UIUIUI_Test.java +++ b/src/test/java/org/assertj/db/database/h2/H2Database_DataSource_UIUIUI_Test.java @@ -8,28 +8,39 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.database.h2; -import org.assertj.core.api.Assertions; -import org.assertj.db.common.NeedReload; -import org.assertj.db.type.*; -import org.assertj.db.type.lettercase.CaseComparisons; -import org.assertj.db.type.lettercase.CaseConversions; -import org.junit.Before; -import org.junit.Test; +import static org.assertj.db.api.Assertions.assertThat; +import static org.assertj.db.api.Assertions.bytesContentFromClassPathOf; -import javax.sql.DataSource; import java.math.BigDecimal; import java.sql.Date; import java.sql.Time; import java.sql.Timestamp; import java.util.Locale; import java.util.UUID; +import javax.sql.DataSource; -import static org.assertj.db.api.Assertions.assertThat; -import static org.assertj.db.api.Assertions.bytesContentFromClassPathOf; +import org.assertj.core.api.Assertions; +import org.assertj.db.common.NeedReload; +import org.assertj.db.type.Change; +import org.assertj.db.type.Changes; +import org.assertj.db.type.Column; +import org.assertj.db.type.DataSourceWithLetterCase; +import org.assertj.db.type.DateTimeValue; +import org.assertj.db.type.DateValue; +import org.assertj.db.type.Request; +import org.assertj.db.type.Row; +import org.assertj.db.type.Table; +import org.assertj.db.type.TimeValue; +import org.assertj.db.type.Value; +import org.assertj.db.type.ValueType; +import org.assertj.db.type.lettercase.CaseComparisons; +import org.assertj.db.type.lettercase.CaseConversions; +import org.junit.Before; +import org.junit.Test; /** * Test on the H2 database. @@ -66,131 +77,131 @@ public void test_ColumnName_hasColumnName() { changes.setEndPointNow(); assertThat(table) - .column().hasColumnName("var1") - .column().hasColumnName("var2") - .column().hasColumnName("var3") - .column().hasColumnName("var4") - .column().hasColumnName("var5") - .column().hasColumnName("var6") - .column().hasColumnName("var7") - .column().hasColumnName("var8") - .column().hasColumnName("var9") - .column().hasColumnName("var10") - .column().hasColumnName("var11") - .column().hasColumnName("var12") - .column().hasColumnName("var13") - .column().hasColumnName("var14") - .column().hasColumnName("var15") - .column().hasColumnName("var16") - .column().hasColumnName("var17") - .column().hasColumnName("var18") - .column().hasColumnName("var19") - .column().hasColumnName("var20") - .column().hasColumnName("var21") - .column().hasColumnName("var22") - .column().hasColumnName("var23") - .column().hasColumnName("var24") - .column().hasColumnName("var25") - .column().hasColumnName("var26") - .column().hasColumnName("var27") - .column().hasColumnName("var28") - .column().hasColumnName("var29") - .column().hasColumnName("var30") - .column().hasColumnName("var31") - .column().hasColumnName("var32") - .column().hasColumnName("var33") - .column().hasColumnName("var34") - .column().hasColumnName("var35") - .column().hasColumnName("var36") - .column().hasColumnName("var37") - .column().hasColumnName("var38") - .column().hasColumnName("var39") - .column().hasColumnName("var40") - .column().hasColumnName("var41") - .column().hasColumnName("var42") - .column().hasColumnName("var43") - .column().hasColumnName("var44") - .column().hasColumnName("var45") - .column().hasColumnName("var46") - .column().hasColumnName("var47") - .column().hasColumnName("var48") - .column().hasColumnName("var49") - .column().hasColumnName("var50") - .column().hasColumnName("var51") - .column().hasColumnName("var52") - .column().hasColumnName("var53") - .column().hasColumnName("var54") - .column().hasColumnName("var55") - .column().hasColumnName("var56") - .column().hasColumnName("var57") - .column().hasColumnName("var58") - .column().hasColumnName("var59") - .column().hasColumnName("var60") - .column().hasColumnName("var61") + .column().hasColumnName("var1") + .column().hasColumnName("var2") + .column().hasColumnName("var3") + .column().hasColumnName("var4") + .column().hasColumnName("var5") + .column().hasColumnName("var6") + .column().hasColumnName("var7") + .column().hasColumnName("var8") + .column().hasColumnName("var9") + .column().hasColumnName("var10") + .column().hasColumnName("var11") + .column().hasColumnName("var12") + .column().hasColumnName("var13") + .column().hasColumnName("var14") + .column().hasColumnName("var15") + .column().hasColumnName("var16") + .column().hasColumnName("var17") + .column().hasColumnName("var18") + .column().hasColumnName("var19") + .column().hasColumnName("var20") + .column().hasColumnName("var21") + .column().hasColumnName("var22") + .column().hasColumnName("var23") + .column().hasColumnName("var24") + .column().hasColumnName("var25") + .column().hasColumnName("var26") + .column().hasColumnName("var27") + .column().hasColumnName("var28") + .column().hasColumnName("var29") + .column().hasColumnName("var30") + .column().hasColumnName("var31") + .column().hasColumnName("var32") + .column().hasColumnName("var33") + .column().hasColumnName("var34") + .column().hasColumnName("var35") + .column().hasColumnName("var36") + .column().hasColumnName("var37") + .column().hasColumnName("var38") + .column().hasColumnName("var39") + .column().hasColumnName("var40") + .column().hasColumnName("var41") + .column().hasColumnName("var42") + .column().hasColumnName("var43") + .column().hasColumnName("var44") + .column().hasColumnName("var45") + .column().hasColumnName("var46") + .column().hasColumnName("var47") + .column().hasColumnName("var48") + .column().hasColumnName("var49") + .column().hasColumnName("var50") + .column().hasColumnName("var51") + .column().hasColumnName("var52") + .column().hasColumnName("var53") + .column().hasColumnName("var54") + .column().hasColumnName("var55") + .column().hasColumnName("var56") + .column().hasColumnName("var57") + .column().hasColumnName("var58") + .column().hasColumnName("var59") + .column().hasColumnName("var60") + .column().hasColumnName("var61") ; assertThat(changes).change() - .column().hasColumnName("var1") - .column().hasColumnName("var2") - .column().hasColumnName("var3") - .column().hasColumnName("var4") - .column().hasColumnName("var5") - .column().hasColumnName("var6") - .column().hasColumnName("var7") - .column().hasColumnName("var8") - .column().hasColumnName("var9") - .column().hasColumnName("var10") - .column().hasColumnName("var11") - .column().hasColumnName("var12") - .column().hasColumnName("var13") - .column().hasColumnName("var14") - .column().hasColumnName("var15") - .column().hasColumnName("var16") - .column().hasColumnName("var17") - .column().hasColumnName("var18") - .column().hasColumnName("var19") - .column().hasColumnName("var20") - .column().hasColumnName("var21") - .column().hasColumnName("var22") - .column().hasColumnName("var23") - .column().hasColumnName("var24") - .column().hasColumnName("var25") - .column().hasColumnName("var26") - .column().hasColumnName("var27") - .column().hasColumnName("var28") - .column().hasColumnName("var29") - .column().hasColumnName("var30") - .column().hasColumnName("var31") - .column().hasColumnName("var32") - .column().hasColumnName("var33") - .column().hasColumnName("var34") - .column().hasColumnName("var35") - .column().hasColumnName("var36") - .column().hasColumnName("var37") - .column().hasColumnName("var38") - .column().hasColumnName("var39") - .column().hasColumnName("var40") - .column().hasColumnName("var41") - .column().hasColumnName("var42") - .column().hasColumnName("var43") - .column().hasColumnName("var44") - .column().hasColumnName("var45") - .column().hasColumnName("var46") - .column().hasColumnName("var47") - .column().hasColumnName("var48") - .column().hasColumnName("var49") - .column().hasColumnName("var50") - .column().hasColumnName("var51") - .column().hasColumnName("var52") - .column().hasColumnName("var53") - .column().hasColumnName("var54") - .column().hasColumnName("var55") - .column().hasColumnName("var56") - .column().hasColumnName("var57") - .column().hasColumnName("var58") - .column().hasColumnName("var59") - .column().hasColumnName("var60") - .column().hasColumnName("var61") + .column().hasColumnName("var1") + .column().hasColumnName("var2") + .column().hasColumnName("var3") + .column().hasColumnName("var4") + .column().hasColumnName("var5") + .column().hasColumnName("var6") + .column().hasColumnName("var7") + .column().hasColumnName("var8") + .column().hasColumnName("var9") + .column().hasColumnName("var10") + .column().hasColumnName("var11") + .column().hasColumnName("var12") + .column().hasColumnName("var13") + .column().hasColumnName("var14") + .column().hasColumnName("var15") + .column().hasColumnName("var16") + .column().hasColumnName("var17") + .column().hasColumnName("var18") + .column().hasColumnName("var19") + .column().hasColumnName("var20") + .column().hasColumnName("var21") + .column().hasColumnName("var22") + .column().hasColumnName("var23") + .column().hasColumnName("var24") + .column().hasColumnName("var25") + .column().hasColumnName("var26") + .column().hasColumnName("var27") + .column().hasColumnName("var28") + .column().hasColumnName("var29") + .column().hasColumnName("var30") + .column().hasColumnName("var31") + .column().hasColumnName("var32") + .column().hasColumnName("var33") + .column().hasColumnName("var34") + .column().hasColumnName("var35") + .column().hasColumnName("var36") + .column().hasColumnName("var37") + .column().hasColumnName("var38") + .column().hasColumnName("var39") + .column().hasColumnName("var40") + .column().hasColumnName("var41") + .column().hasColumnName("var42") + .column().hasColumnName("var43") + .column().hasColumnName("var44") + .column().hasColumnName("var45") + .column().hasColumnName("var46") + .column().hasColumnName("var47") + .column().hasColumnName("var48") + .column().hasColumnName("var49") + .column().hasColumnName("var50") + .column().hasColumnName("var51") + .column().hasColumnName("var52") + .column().hasColumnName("var53") + .column().hasColumnName("var54") + .column().hasColumnName("var55") + .column().hasColumnName("var56") + .column().hasColumnName("var57") + .column().hasColumnName("var58") + .column().hasColumnName("var59") + .column().hasColumnName("var60") + .column().hasColumnName("var61") ; } @@ -203,131 +214,131 @@ public void test_ColumnClass_isOfClass() { changes.setEndPointNow(); assertThat(table) - .column("var1").isOfClass(Long.class, false) - .column("var2").isOfClass(Integer.class, false) - .column("var3").isOfClass(Integer.class, false) - .column("var4").isOfClass(Integer.class, false) - .column("var5").isOfClass(Integer.class, false) - .column("var6").isOfClass(Integer.class, false) - .column("var7").isOfClass(Boolean.class, false) - .column("var8").isOfClass(Boolean.class, false) - .column("var9").isOfClass(Boolean.class, false) - .column("var10").isOfClass(Byte.class, false) - .column("var11").isOfClass(Short.class, false) - .column("var12").isOfClass(Short.class, false) - .column("var13").isOfClass(Short.class, false) - .column("var14").isOfClass(Long.class, false) - .column("var15").isOfClass(Long.class, false) - .column("var16").isOfClass(BigDecimal.class, false) - .column("var17").isOfClass(BigDecimal.class, false) - .column("var18").isOfClass(BigDecimal.class, false) - .column("var19").isOfClass(BigDecimal.class, false) - .column("var20").isOfClass(Double.class, false) - .column("var21").isOfClass(Double.class, false) - .column("var22").isOfClass(Double.class, false) - .column("var23").isOfClass(Float.class, false) - .column("var24").isOfClass(Float.class, false) - .column("var25").isOfClass(Time.class, false) - .column("var26").isOfClass(Date.class, false) - .column("var27").isOfClass(Timestamp.class, false) - .column("var28").isOfClass(Timestamp.class, false) - .column("var29").isOfClass(Timestamp.class, false) - .column("var30").isOfClass(byte[].class, false) - .column("var31").isOfClass(byte[].class, false) - .column("var32").isOfClass(byte[].class, false) - .column("var33").isOfClass(byte[].class, false) - .column("var34").isOfClass(byte[].class, false) - .column("var35").isOfClass(Locale.class, false) - .column("var36").isOfClass(String.class, false) - .column("var37").isOfClass(String.class, false) - .column("var38").isOfClass(String.class, false) - .column("var39").isOfClass(String.class, false) - .column("var40").isOfClass(String.class, false) - .column("var41").isOfClass(String.class, false) - .column("var42").isOfClass(String.class, false) - .column("var43").isOfClass(String.class, false) - .column("var44").isOfClass(String.class, false) - .column("var45").isOfClass(String.class, false) - .column("var46").isOfClass(byte[].class, false) - .column("var47").isOfClass(byte[].class, false) - .column("var48").isOfClass(byte[].class, false) - .column("var49").isOfClass(byte[].class, false) - .column("var50").isOfClass(byte[].class, false) - .column("var51").isOfClass(byte[].class, false) - .column("var52").isOfClass(String.class, false) - .column("var53").isOfClass(String.class, false) - .column("var54").isOfClass(String.class, false) - .column("var55").isOfClass(String.class, false) - .column("var56").isOfClass(String.class, false) - .column("var57").isOfClass(String.class, false) - .column("var58").isOfClass(String.class, false) - .column("var59").isOfClass(UUID.class, false) - .column("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) - .column("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) + .column("var1").isOfClass(Long.class, false) + .column("var2").isOfClass(Integer.class, false) + .column("var3").isOfClass(Integer.class, false) + .column("var4").isOfClass(Integer.class, false) + .column("var5").isOfClass(Integer.class, false) + .column("var6").isOfClass(Integer.class, false) + .column("var7").isOfClass(Boolean.class, false) + .column("var8").isOfClass(Boolean.class, false) + .column("var9").isOfClass(Boolean.class, false) + .column("var10").isOfClass(Byte.class, false) + .column("var11").isOfClass(Short.class, false) + .column("var12").isOfClass(Short.class, false) + .column("var13").isOfClass(Short.class, false) + .column("var14").isOfClass(Long.class, false) + .column("var15").isOfClass(Long.class, false) + .column("var16").isOfClass(BigDecimal.class, false) + .column("var17").isOfClass(BigDecimal.class, false) + .column("var18").isOfClass(BigDecimal.class, false) + .column("var19").isOfClass(BigDecimal.class, false) + .column("var20").isOfClass(Double.class, false) + .column("var21").isOfClass(Double.class, false) + .column("var22").isOfClass(Double.class, false) + .column("var23").isOfClass(Float.class, false) + .column("var24").isOfClass(Float.class, false) + .column("var25").isOfClass(Time.class, false) + .column("var26").isOfClass(Date.class, false) + .column("var27").isOfClass(Timestamp.class, false) + .column("var28").isOfClass(Timestamp.class, false) + .column("var29").isOfClass(Timestamp.class, false) + .column("var30").isOfClass(byte[].class, false) + .column("var31").isOfClass(byte[].class, false) + .column("var32").isOfClass(byte[].class, false) + .column("var33").isOfClass(byte[].class, false) + .column("var34").isOfClass(byte[].class, false) + .column("var35").isOfClass(Locale.class, false) + .column("var36").isOfClass(String.class, false) + .column("var37").isOfClass(String.class, false) + .column("var38").isOfClass(String.class, false) + .column("var39").isOfClass(String.class, false) + .column("var40").isOfClass(String.class, false) + .column("var41").isOfClass(String.class, false) + .column("var42").isOfClass(String.class, false) + .column("var43").isOfClass(String.class, false) + .column("var44").isOfClass(String.class, false) + .column("var45").isOfClass(String.class, false) + .column("var46").isOfClass(byte[].class, false) + .column("var47").isOfClass(byte[].class, false) + .column("var48").isOfClass(byte[].class, false) + .column("var49").isOfClass(byte[].class, false) + .column("var50").isOfClass(byte[].class, false) + .column("var51").isOfClass(byte[].class, false) + .column("var52").isOfClass(String.class, false) + .column("var53").isOfClass(String.class, false) + .column("var54").isOfClass(String.class, false) + .column("var55").isOfClass(String.class, false) + .column("var56").isOfClass(String.class, false) + .column("var57").isOfClass(String.class, false) + .column("var58").isOfClass(String.class, false) + .column("var59").isOfClass(UUID.class, false) + .column("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) + .column("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) ; assertThat(changes).change() - .column("var1").isOfClass(Long.class, false) - .column("var2").isOfClass(Integer.class, false) - .column("var3").isOfClass(Integer.class, false) - .column("var4").isOfClass(Integer.class, false) - .column("var5").isOfClass(Integer.class, false) - .column("var6").isOfClass(Integer.class, false) - .column("var7").isOfClass(Boolean.class, false) - .column("var8").isOfClass(Boolean.class, false) - .column("var9").isOfClass(Boolean.class, false) - .column("var10").isOfClass(Byte.class, false) - .column("var11").isOfClass(Short.class, false) - .column("var12").isOfClass(Short.class, false) - .column("var13").isOfClass(Short.class, false) - .column("var14").isOfClass(Long.class, false) - .column("var15").isOfClass(Long.class, false) - .column("var16").isOfClass(BigDecimal.class, false) - .column("var17").isOfClass(BigDecimal.class, false) - .column("var18").isOfClass(BigDecimal.class, false) - .column("var19").isOfClass(BigDecimal.class, false) - .column("var20").isOfClass(Double.class, false) - .column("var21").isOfClass(Double.class, false) - .column("var22").isOfClass(Double.class, false) - .column("var23").isOfClass(Float.class, false) - .column("var24").isOfClass(Float.class, false) - .column("var25").isOfClass(Time.class, false) - .column("var26").isOfClass(Date.class, false) - .column("var27").isOfClass(Timestamp.class, false) - .column("var28").isOfClass(Timestamp.class, false) - .column("var29").isOfClass(Timestamp.class, false) - .column("var30").isOfClass(byte[].class, false) - .column("var31").isOfClass(byte[].class, false) - .column("var32").isOfClass(byte[].class, false) - .column("var33").isOfClass(byte[].class, false) - .column("var34").isOfClass(byte[].class, false) - .column("var35").isOfClass(Locale.class, false) - .column("var36").isOfClass(String.class, false) - .column("var37").isOfClass(String.class, false) - .column("var38").isOfClass(String.class, false) - .column("var39").isOfClass(String.class, false) - .column("var40").isOfClass(String.class, false) - .column("var41").isOfClass(String.class, false) - .column("var42").isOfClass(String.class, false) - .column("var43").isOfClass(String.class, false) - .column("var44").isOfClass(String.class, false) - .column("var45").isOfClass(String.class, false) - .column("var46").isOfClass(byte[].class, false) - .column("var47").isOfClass(byte[].class, false) - .column("var48").isOfClass(byte[].class, false) - .column("var49").isOfClass(byte[].class, false) - .column("var50").isOfClass(byte[].class, false) - .column("var51").isOfClass(byte[].class, false) - .column("var52").isOfClass(String.class, false) - .column("var53").isOfClass(String.class, false) - .column("var54").isOfClass(String.class, false) - .column("var55").isOfClass(String.class, false) - .column("var56").isOfClass(String.class, false) - .column("var57").isOfClass(String.class, false) - .column("var58").isOfClass(String.class, false) - .column("var59").isOfClass(UUID.class, false) - .column("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) - .column("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) + .column("var1").isOfClass(Long.class, false) + .column("var2").isOfClass(Integer.class, false) + .column("var3").isOfClass(Integer.class, false) + .column("var4").isOfClass(Integer.class, false) + .column("var5").isOfClass(Integer.class, false) + .column("var6").isOfClass(Integer.class, false) + .column("var7").isOfClass(Boolean.class, false) + .column("var8").isOfClass(Boolean.class, false) + .column("var9").isOfClass(Boolean.class, false) + .column("var10").isOfClass(Byte.class, false) + .column("var11").isOfClass(Short.class, false) + .column("var12").isOfClass(Short.class, false) + .column("var13").isOfClass(Short.class, false) + .column("var14").isOfClass(Long.class, false) + .column("var15").isOfClass(Long.class, false) + .column("var16").isOfClass(BigDecimal.class, false) + .column("var17").isOfClass(BigDecimal.class, false) + .column("var18").isOfClass(BigDecimal.class, false) + .column("var19").isOfClass(BigDecimal.class, false) + .column("var20").isOfClass(Double.class, false) + .column("var21").isOfClass(Double.class, false) + .column("var22").isOfClass(Double.class, false) + .column("var23").isOfClass(Float.class, false) + .column("var24").isOfClass(Float.class, false) + .column("var25").isOfClass(Time.class, false) + .column("var26").isOfClass(Date.class, false) + .column("var27").isOfClass(Timestamp.class, false) + .column("var28").isOfClass(Timestamp.class, false) + .column("var29").isOfClass(Timestamp.class, false) + .column("var30").isOfClass(byte[].class, false) + .column("var31").isOfClass(byte[].class, false) + .column("var32").isOfClass(byte[].class, false) + .column("var33").isOfClass(byte[].class, false) + .column("var34").isOfClass(byte[].class, false) + .column("var35").isOfClass(Locale.class, false) + .column("var36").isOfClass(String.class, false) + .column("var37").isOfClass(String.class, false) + .column("var38").isOfClass(String.class, false) + .column("var39").isOfClass(String.class, false) + .column("var40").isOfClass(String.class, false) + .column("var41").isOfClass(String.class, false) + .column("var42").isOfClass(String.class, false) + .column("var43").isOfClass(String.class, false) + .column("var44").isOfClass(String.class, false) + .column("var45").isOfClass(String.class, false) + .column("var46").isOfClass(byte[].class, false) + .column("var47").isOfClass(byte[].class, false) + .column("var48").isOfClass(byte[].class, false) + .column("var49").isOfClass(byte[].class, false) + .column("var50").isOfClass(byte[].class, false) + .column("var51").isOfClass(byte[].class, false) + .column("var52").isOfClass(String.class, false) + .column("var53").isOfClass(String.class, false) + .column("var54").isOfClass(String.class, false) + .column("var55").isOfClass(String.class, false) + .column("var56").isOfClass(String.class, false) + .column("var57").isOfClass(String.class, false) + .column("var58").isOfClass(String.class, false) + .column("var59").isOfClass(UUID.class, false) + .column("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) + .column("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) ; } @@ -340,130 +351,130 @@ public void test_ColumnEquality_hasValues() { changes.setEndPointNow(); assertThat(table).column("var1").hasValues(1) - .column("var2").hasValues(20) - .column("var3").hasValues(3) - .column("var4").hasValues(4) - .column("var5").hasValues(5) - .column("var6").hasValues(6) - .column("var7").hasValues(true) - .column("var8").hasValues(false) - .column("var9").hasValues(true) - .column("var10").hasValues(7) - .column("var11").hasValues(8) - .column("var12").hasValues(9) - .column("var13").hasValues(10) - .column("var14").hasValues(11) - .column("var15").hasValues(12) - .column("var16").hasValues(13.13) - .column("var17").hasValues(14.14) - .column("var18").hasValues(15.15) - .column("var19").hasValues(16.16) - .column("var20").hasValues(17.17) - .column("var21").hasValues(18.18) - .column("var22").hasValues(19.19) - .column("var23").hasValues(20.20) - .column("var24").hasValues(21.21) - .column("var25").hasValues(TimeValue.of(9, 1)) - .column("var26").hasValues(DateValue.of(2007, 12, 23)) - .column("var27").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .column("var28").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .column("var29").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .column("var30").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var31").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var32").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var33").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var34").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var35").hasValues(Locale.FRENCH) - .column("var36").hasValues("22") - .column("var37").hasValues("23") - .column("var38").hasValues("24") - .column("var39").hasValues("25") - .column("var40").hasValues("26") - .column("var41").hasValues("27") - .column("var42").hasValues("28") - .column("var43").hasValues("29") - .column("var44").hasValues("30") - .column("var45").hasValues("31") - .column("var46").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var47").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var48").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var49").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var50").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var51").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var52").hasValues("32") - .column("var53").hasValues("33") - .column("var54").hasValues("34") - .column("var55").hasValues("35") - .column("var56").hasValues("36") - .column("var57").hasValues("37") - .column("var58").hasValues("38") - .column("var59").hasValues(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")) - .column("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) - .column("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) + .column("var2").hasValues(20) + .column("var3").hasValues(3) + .column("var4").hasValues(4) + .column("var5").hasValues(5) + .column("var6").hasValues(6) + .column("var7").hasValues(true) + .column("var8").hasValues(false) + .column("var9").hasValues(true) + .column("var10").hasValues(7) + .column("var11").hasValues(8) + .column("var12").hasValues(9) + .column("var13").hasValues(10) + .column("var14").hasValues(11) + .column("var15").hasValues(12) + .column("var16").hasValues(13.13) + .column("var17").hasValues(14.14) + .column("var18").hasValues(15.15) + .column("var19").hasValues(16.16) + .column("var20").hasValues(17.17) + .column("var21").hasValues(18.18) + .column("var22").hasValues(19.19) + .column("var23").hasValues(20.20) + .column("var24").hasValues(21.21) + .column("var25").hasValues(TimeValue.of(9, 1)) + .column("var26").hasValues(DateValue.of(2007, 12, 23)) + .column("var27").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .column("var28").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .column("var29").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .column("var30").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var31").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var32").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var33").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var34").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var35").hasValues(Locale.FRENCH) + .column("var36").hasValues("22") + .column("var37").hasValues("23") + .column("var38").hasValues("24") + .column("var39").hasValues("25") + .column("var40").hasValues("26") + .column("var41").hasValues("27") + .column("var42").hasValues("28") + .column("var43").hasValues("29") + .column("var44").hasValues("30") + .column("var45").hasValues("31") + .column("var46").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var47").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var48").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var49").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var50").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var51").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var52").hasValues("32") + .column("var53").hasValues("33") + .column("var54").hasValues("34") + .column("var55").hasValues("35") + .column("var56").hasValues("36") + .column("var57").hasValues("37") + .column("var58").hasValues("38") + .column("var59").hasValues(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")) + .column("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) + .column("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) ; assertThat(changes).change() - .column("var1").hasValues(1) - .column("var2").hasValues(2, 20) - .column("var3").hasValues(3) - .column("var4").hasValues(4) - .column("var5").hasValues(5) - .column("var6").hasValues(6) - .column("var7").hasValues(true) - .column("var8").hasValues(false) - .column("var9").hasValues(true) - .column("var10").hasValues(7) - .column("var11").hasValues(8) - .column("var12").hasValues(9) - .column("var13").hasValues(10) - .column("var14").hasValues(11) - .column("var15").hasValues(12) - .column("var16").hasValues(13.13) - .column("var17").hasValues(14.14) - .column("var18").hasValues(15.15) - .column("var19").hasValues(16.16) - .column("var20").hasValues(17.17) - .column("var21").hasValues(18.18) - .column("var22").hasValues(19.19) - .column("var23").hasValues(20.20) - .column("var24").hasValues(21.21) - .column("var25").hasValues(TimeValue.of(9, 1)) - .column("var26").hasValues(DateValue.of(2007, 12, 23)) - .column("var27").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .column("var28").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .column("var29").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .column("var30").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var31").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var32").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var33").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var34").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var35").hasValues(Locale.FRENCH) - .column("var36").hasValues("22") - .column("var37").hasValues("23") - .column("var38").hasValues("24") - .column("var39").hasValues("25") - .column("var40").hasValues("26") - .column("var41").hasValues("27") - .column("var42").hasValues("28") - .column("var43").hasValues("29") - .column("var44").hasValues("30") - .column("var45").hasValues("31") - .column("var46").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var47").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var48").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var49").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var50").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var51").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var52").hasValues("32") - .column("var53").hasValues("33") - .column("var54").hasValues("34") - .column("var55").hasValues("35") - .column("var56").hasValues("36") - .column("var57").hasValues("37") - .column("var58").hasValues("38") - .column("var59").hasValues(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")) - .column("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) - .column("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) + .column("var1").hasValues(1) + .column("var2").hasValues(2, 20) + .column("var3").hasValues(3) + .column("var4").hasValues(4) + .column("var5").hasValues(5) + .column("var6").hasValues(6) + .column("var7").hasValues(true) + .column("var8").hasValues(false) + .column("var9").hasValues(true) + .column("var10").hasValues(7) + .column("var11").hasValues(8) + .column("var12").hasValues(9) + .column("var13").hasValues(10) + .column("var14").hasValues(11) + .column("var15").hasValues(12) + .column("var16").hasValues(13.13) + .column("var17").hasValues(14.14) + .column("var18").hasValues(15.15) + .column("var19").hasValues(16.16) + .column("var20").hasValues(17.17) + .column("var21").hasValues(18.18) + .column("var22").hasValues(19.19) + .column("var23").hasValues(20.20) + .column("var24").hasValues(21.21) + .column("var25").hasValues(TimeValue.of(9, 1)) + .column("var26").hasValues(DateValue.of(2007, 12, 23)) + .column("var27").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .column("var28").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .column("var29").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .column("var30").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var31").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var32").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var33").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var34").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var35").hasValues(Locale.FRENCH) + .column("var36").hasValues("22") + .column("var37").hasValues("23") + .column("var38").hasValues("24") + .column("var39").hasValues("25") + .column("var40").hasValues("26") + .column("var41").hasValues("27") + .column("var42").hasValues("28") + .column("var43").hasValues("29") + .column("var44").hasValues("30") + .column("var45").hasValues("31") + .column("var46").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var47").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var48").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var49").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var50").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var51").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var52").hasValues("32") + .column("var53").hasValues("33") + .column("var54").hasValues("34") + .column("var55").hasValues("35") + .column("var56").hasValues("36") + .column("var57").hasValues("37") + .column("var58").hasValues("38") + .column("var59").hasValues(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")) + .column("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) + .column("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) ; } @@ -476,66 +487,66 @@ public void test_ColumnEquality_containsValues() { changes.setEndPointNow(); assertThat(table).column("var1").containsValues(1) - .column("var2").containsValues(20) - .column("var3").containsValues(3) - .column("var4").containsValues(4) - .column("var5").containsValues(5) - .column("var6").containsValues(6) - .column("var7").containsValues(true) - .column("var8").containsValues(false) - .column("var9").containsValues(true) - .column("var10").containsValues(7) - .column("var11").containsValues(8) - .column("var12").containsValues(9) - .column("var13").containsValues(10) - .column("var14").containsValues(11) - .column("var15").containsValues(12) - .column("var16").containsValues(13.13) - .column("var17").containsValues(14.14) - .column("var18").containsValues(15.15) - .column("var19").containsValues(16.16) - .column("var20").containsValues(17.17) - .column("var21").containsValues(18.18) - .column("var22").containsValues(19.19) - .column("var23").containsValues(20.20) - .column("var24").containsValues(21.21) - .column("var25").containsValues(TimeValue.of(9, 1)) - .column("var26").containsValues(DateValue.of(2007, 12, 23)) - .column("var27").containsValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .column("var28").containsValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .column("var29").containsValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .column("var30").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var31").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var32").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var33").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var34").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var35").containsValues(Locale.FRENCH) - .column("var36").containsValues("22") - .column("var37").containsValues("23") - .column("var38").containsValues("24") - .column("var39").containsValues("25") - .column("var40").containsValues("26") - .column("var41").containsValues("27") - .column("var42").containsValues("28") - .column("var43").containsValues("29") - .column("var44").containsValues("30") - .column("var45").containsValues("31") - .column("var46").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var47").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var48").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var49").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var50").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var51").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var52").containsValues("32") - .column("var53").containsValues("33") - .column("var54").containsValues("34") - .column("var55").containsValues("35") - .column("var56").containsValues("36") - .column("var57").containsValues("37") - .column("var58").containsValues("38") - .column("var59").containsValues(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")) - .column("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) - .column("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) + .column("var2").containsValues(20) + .column("var3").containsValues(3) + .column("var4").containsValues(4) + .column("var5").containsValues(5) + .column("var6").containsValues(6) + .column("var7").containsValues(true) + .column("var8").containsValues(false) + .column("var9").containsValues(true) + .column("var10").containsValues(7) + .column("var11").containsValues(8) + .column("var12").containsValues(9) + .column("var13").containsValues(10) + .column("var14").containsValues(11) + .column("var15").containsValues(12) + .column("var16").containsValues(13.13) + .column("var17").containsValues(14.14) + .column("var18").containsValues(15.15) + .column("var19").containsValues(16.16) + .column("var20").containsValues(17.17) + .column("var21").containsValues(18.18) + .column("var22").containsValues(19.19) + .column("var23").containsValues(20.20) + .column("var24").containsValues(21.21) + .column("var25").containsValues(TimeValue.of(9, 1)) + .column("var26").containsValues(DateValue.of(2007, 12, 23)) + .column("var27").containsValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .column("var28").containsValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .column("var29").containsValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .column("var30").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var31").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var32").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var33").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var34").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var35").containsValues(Locale.FRENCH) + .column("var36").containsValues("22") + .column("var37").containsValues("23") + .column("var38").containsValues("24") + .column("var39").containsValues("25") + .column("var40").containsValues("26") + .column("var41").containsValues("27") + .column("var42").containsValues("28") + .column("var43").containsValues("29") + .column("var44").containsValues("30") + .column("var45").containsValues("31") + .column("var46").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var47").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var48").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var49").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var50").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var51").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var52").containsValues("32") + .column("var53").containsValues("33") + .column("var54").containsValues("34") + .column("var55").containsValues("35") + .column("var56").containsValues("36") + .column("var57").containsValues("37") + .column("var58").containsValues("38") + .column("var59").containsValues(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")) + .column("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) + .column("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) ; } @@ -548,130 +559,130 @@ public void test_ColumnType_isOfType() { changes.setEndPointNow(); assertThat(table).column("var1").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var2").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var3").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var4").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var5").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var6").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var7").isBoolean(false).isOfType(ValueType.BOOLEAN, false) - .column("var8").isBoolean(false).isOfType(ValueType.BOOLEAN, false) - .column("var9").isBoolean(false).isOfType(ValueType.BOOLEAN, false) - .column("var10").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var11").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var12").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var13").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var14").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var15").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var16").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var17").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var18").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var19").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var20").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var21").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var22").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var23").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var24").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var25").isTime(false).isOfType(ValueType.TIME, false) - .column("var26").isDate(false).isOfType(ValueType.DATE, false) - .column("var27").isDateTime(false).isOfType(ValueType.DATE_TIME, false) - .column("var28").isDateTime(false).isOfType(ValueType.DATE_TIME, false) - .column("var29").isDateTime(false).isOfType(ValueType.DATE_TIME, false) - .column("var30").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var31").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var32").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var33").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var34").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var35") - .column("var36").isText(false).isOfType(ValueType.TEXT, false) - .column("var37").isText(false).isOfType(ValueType.TEXT, false) - .column("var38").isText(false).isOfType(ValueType.TEXT, false) - .column("var39").isText(false).isOfType(ValueType.TEXT, false) - .column("var40").isText(false).isOfType(ValueType.TEXT, false) - .column("var41").isText(false).isOfType(ValueType.TEXT, false) - .column("var42").isText(false).isOfType(ValueType.TEXT, false) - .column("var43").isText(false).isOfType(ValueType.TEXT, false) - .column("var44").isText(false).isOfType(ValueType.TEXT, false) - .column("var45").isText(false).isOfType(ValueType.TEXT, false) - .column("var46").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var47").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var48").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var49").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var50").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var51").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var52").isText(false).isOfType(ValueType.TEXT, false) - .column("var53").isText(false).isOfType(ValueType.TEXT, false) - .column("var54").isText(false).isOfType(ValueType.TEXT, false) - .column("var55").isText(false).isOfType(ValueType.TEXT, false) - .column("var56").isText(false).isOfType(ValueType.TEXT, false) - .column("var57").isText(false).isOfType(ValueType.TEXT, false) - .column("var58").isText(false).isOfType(ValueType.TEXT, false) - .column("var59").isUUID(false).isOfType(ValueType.UUID, false) - .column("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) - .column("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) + .column("var2").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var3").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var4").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var5").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var6").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var7").isBoolean(false).isOfType(ValueType.BOOLEAN, false) + .column("var8").isBoolean(false).isOfType(ValueType.BOOLEAN, false) + .column("var9").isBoolean(false).isOfType(ValueType.BOOLEAN, false) + .column("var10").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var11").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var12").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var13").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var14").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var15").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var16").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var17").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var18").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var19").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var20").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var21").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var22").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var23").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var24").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var25").isTime(false).isOfType(ValueType.TIME, false) + .column("var26").isDate(false).isOfType(ValueType.DATE, false) + .column("var27").isDateTime(false).isOfType(ValueType.DATE_TIME, false) + .column("var28").isDateTime(false).isOfType(ValueType.DATE_TIME, false) + .column("var29").isDateTime(false).isOfType(ValueType.DATE_TIME, false) + .column("var30").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var31").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var32").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var33").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var34").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var35") + .column("var36").isText(false).isOfType(ValueType.TEXT, false) + .column("var37").isText(false).isOfType(ValueType.TEXT, false) + .column("var38").isText(false).isOfType(ValueType.TEXT, false) + .column("var39").isText(false).isOfType(ValueType.TEXT, false) + .column("var40").isText(false).isOfType(ValueType.TEXT, false) + .column("var41").isText(false).isOfType(ValueType.TEXT, false) + .column("var42").isText(false).isOfType(ValueType.TEXT, false) + .column("var43").isText(false).isOfType(ValueType.TEXT, false) + .column("var44").isText(false).isOfType(ValueType.TEXT, false) + .column("var45").isText(false).isOfType(ValueType.TEXT, false) + .column("var46").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var47").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var48").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var49").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var50").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var51").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var52").isText(false).isOfType(ValueType.TEXT, false) + .column("var53").isText(false).isOfType(ValueType.TEXT, false) + .column("var54").isText(false).isOfType(ValueType.TEXT, false) + .column("var55").isText(false).isOfType(ValueType.TEXT, false) + .column("var56").isText(false).isOfType(ValueType.TEXT, false) + .column("var57").isText(false).isOfType(ValueType.TEXT, false) + .column("var58").isText(false).isOfType(ValueType.TEXT, false) + .column("var59").isUUID(false).isOfType(ValueType.UUID, false) + .column("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) + .column("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) ; assertThat(changes).change() - .column("var1").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var2").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var3").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var4").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var5").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var6").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var7").isBoolean(false).isOfType(ValueType.BOOLEAN, false) - .column("var8").isBoolean(false).isOfType(ValueType.BOOLEAN, false) - .column("var9").isBoolean(false).isOfType(ValueType.BOOLEAN, false) - .column("var10").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var11").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var12").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var13").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var14").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var15").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var16").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var17").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var18").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var19").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var20").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var21").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var22").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var23").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var24").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var25").isTime(false).isOfType(ValueType.TIME, false) - .column("var26").isDate(false).isOfType(ValueType.DATE, false) - .column("var27").isDateTime(false).isOfType(ValueType.DATE_TIME, false) - .column("var28").isDateTime(false).isOfType(ValueType.DATE_TIME, false) - .column("var29").isDateTime(false).isOfType(ValueType.DATE_TIME, false) - .column("var30").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var31").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var32").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var33").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var34").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var35") - .column("var36").isText(false).isOfType(ValueType.TEXT, false) - .column("var37").isText(false).isOfType(ValueType.TEXT, false) - .column("var38").isText(false).isOfType(ValueType.TEXT, false) - .column("var39").isText(false).isOfType(ValueType.TEXT, false) - .column("var40").isText(false).isOfType(ValueType.TEXT, false) - .column("var41").isText(false).isOfType(ValueType.TEXT, false) - .column("var42").isText(false).isOfType(ValueType.TEXT, false) - .column("var43").isText(false).isOfType(ValueType.TEXT, false) - .column("var44").isText(false).isOfType(ValueType.TEXT, false) - .column("var45").isText(false).isOfType(ValueType.TEXT, false) - .column("var46").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var47").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var48").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var49").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var50").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var51").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var52").isText(false).isOfType(ValueType.TEXT, false) - .column("var53").isText(false).isOfType(ValueType.TEXT, false) - .column("var54").isText(false).isOfType(ValueType.TEXT, false) - .column("var55").isText(false).isOfType(ValueType.TEXT, false) - .column("var56").isText(false).isOfType(ValueType.TEXT, false) - .column("var57").isText(false).isOfType(ValueType.TEXT, false) - .column("var58").isText(false).isOfType(ValueType.TEXT, false) - .column("var59").isUUID(false).isOfType(ValueType.UUID, false) - .column("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) - .column("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) + .column("var1").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var2").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var3").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var4").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var5").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var6").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var7").isBoolean(false).isOfType(ValueType.BOOLEAN, false) + .column("var8").isBoolean(false).isOfType(ValueType.BOOLEAN, false) + .column("var9").isBoolean(false).isOfType(ValueType.BOOLEAN, false) + .column("var10").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var11").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var12").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var13").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var14").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var15").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var16").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var17").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var18").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var19").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var20").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var21").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var22").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var23").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var24").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var25").isTime(false).isOfType(ValueType.TIME, false) + .column("var26").isDate(false).isOfType(ValueType.DATE, false) + .column("var27").isDateTime(false).isOfType(ValueType.DATE_TIME, false) + .column("var28").isDateTime(false).isOfType(ValueType.DATE_TIME, false) + .column("var29").isDateTime(false).isOfType(ValueType.DATE_TIME, false) + .column("var30").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var31").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var32").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var33").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var34").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var35") + .column("var36").isText(false).isOfType(ValueType.TEXT, false) + .column("var37").isText(false).isOfType(ValueType.TEXT, false) + .column("var38").isText(false).isOfType(ValueType.TEXT, false) + .column("var39").isText(false).isOfType(ValueType.TEXT, false) + .column("var40").isText(false).isOfType(ValueType.TEXT, false) + .column("var41").isText(false).isOfType(ValueType.TEXT, false) + .column("var42").isText(false).isOfType(ValueType.TEXT, false) + .column("var43").isText(false).isOfType(ValueType.TEXT, false) + .column("var44").isText(false).isOfType(ValueType.TEXT, false) + .column("var45").isText(false).isOfType(ValueType.TEXT, false) + .column("var46").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var47").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var48").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var49").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var50").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var51").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var52").isText(false).isOfType(ValueType.TEXT, false) + .column("var53").isText(false).isOfType(ValueType.TEXT, false) + .column("var54").isText(false).isOfType(ValueType.TEXT, false) + .column("var55").isText(false).isOfType(ValueType.TEXT, false) + .column("var56").isText(false).isOfType(ValueType.TEXT, false) + .column("var57").isText(false).isOfType(ValueType.TEXT, false) + .column("var58").isText(false).isOfType(ValueType.TEXT, false) + .column("var59").isUUID(false).isOfType(ValueType.UUID, false) + .column("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) + .column("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) ; } @@ -684,146 +695,146 @@ public void test_ColumnOfChangeEquality_hasValues() { changes.setEndPointNow(); assertThat(changes).change() - .column("var1").hasValues(1) - .column("var2").hasValues(2, 20) - .column("var3").hasValues(3) - .column("var4").hasValues(4) - .column("var5").hasValues(5) - .column("var6").hasValues(6) - .column("var7").hasValues(true) - .column("var8").hasValues(false) - .column("var9").hasValues(true) - .column("var10").hasValues(7) - .column("var11").hasValues(8) - .column("var12").hasValues(9) - .column("var13").hasValues(10) - .column("var14").hasValues(11) - .column("var15").hasValues(12) - .column("var16").hasValues(13.13) - .column("var17").hasValues(14.14) - .column("var18").hasValues(15.15) - .column("var19").hasValues(16.16) - .column("var20").hasValues(17.17) - .column("var21").hasValues(18.18) - .column("var22").hasValues(19.19) - .column("var23").hasValues(20.20) - .column("var24").hasValues(21.21) - .column("var25").hasValues(TimeValue.of(9, 1)) - .column("var26").hasValues(DateValue.of(2007, 12, 23)) - .column("var27").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .column("var28").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .column("var29").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .column("var30").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var31").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var32").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var33").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var34").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var35").hasValues(Locale.FRENCH) - .column("var36").hasValues("22") - .column("var37").hasValues("23") - .column("var38").hasValues("24") - .column("var39").hasValues("25") - .column("var40").hasValues("26") - .column("var41").hasValues("27") - .column("var42").hasValues("28") - .column("var43").hasValues("29") - .column("var44").hasValues("30") - .column("var45").hasValues("31") - .column("var46").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var47").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var48").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var49").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var50").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var51").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var52").hasValues("32") - .column("var53").hasValues("33") - .column("var54").hasValues("34") - .column("var55").hasValues("35") - .column("var56").hasValues("36") - .column("var57").hasValues("37") - .column("var58").hasValues("38") - .column("var59").hasValues(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")) - .column("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) - .column("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) + .column("var1").hasValues(1) + .column("var2").hasValues(2, 20) + .column("var3").hasValues(3) + .column("var4").hasValues(4) + .column("var5").hasValues(5) + .column("var6").hasValues(6) + .column("var7").hasValues(true) + .column("var8").hasValues(false) + .column("var9").hasValues(true) + .column("var10").hasValues(7) + .column("var11").hasValues(8) + .column("var12").hasValues(9) + .column("var13").hasValues(10) + .column("var14").hasValues(11) + .column("var15").hasValues(12) + .column("var16").hasValues(13.13) + .column("var17").hasValues(14.14) + .column("var18").hasValues(15.15) + .column("var19").hasValues(16.16) + .column("var20").hasValues(17.17) + .column("var21").hasValues(18.18) + .column("var22").hasValues(19.19) + .column("var23").hasValues(20.20) + .column("var24").hasValues(21.21) + .column("var25").hasValues(TimeValue.of(9, 1)) + .column("var26").hasValues(DateValue.of(2007, 12, 23)) + .column("var27").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .column("var28").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .column("var29").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .column("var30").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var31").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var32").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var33").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var34").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var35").hasValues(Locale.FRENCH) + .column("var36").hasValues("22") + .column("var37").hasValues("23") + .column("var38").hasValues("24") + .column("var39").hasValues("25") + .column("var40").hasValues("26") + .column("var41").hasValues("27") + .column("var42").hasValues("28") + .column("var43").hasValues("29") + .column("var44").hasValues("30") + .column("var45").hasValues("31") + .column("var46").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var47").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var48").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var49").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var50").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var51").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var52").hasValues("32") + .column("var53").hasValues("33") + .column("var54").hasValues("34") + .column("var55").hasValues("35") + .column("var56").hasValues("36") + .column("var57").hasValues("37") + .column("var58").hasValues("38") + .column("var59").hasValues(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")) + .column("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) + .column("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) ; assertThat(changes).change() - .column("var1").hasValues(1, 1) - .column("var2").hasValues(2, 20) - .column("var3").hasValues(3, 3) - .column("var4").hasValues(4, 4) - .column("var5").hasValues(5, 5) - .column("var6").hasValues(6, 6) - .column("var7").hasValues(true, true) - .column("var8").hasValues(false, false) - .column("var9").hasValues(true, true) - .column("var10").hasValues(7, 7) - .column("var11").hasValues(8, 8) - .column("var12").hasValues(9, 9) - .column("var13").hasValues(10, 10) - .column("var14").hasValues(11, 11) - .column("var15").hasValues(12, 12) - .column("var16").hasValues(13.13, 13.13) - .column("var17").hasValues(14.14, 14.14) - .column("var18").hasValues(15.15, 15.15) - .column("var19").hasValues(16.16, 16.16) - .column("var20").hasValues(17.17, 17.17) - .column("var21").hasValues(18.18, 18.18) - .column("var22").hasValues(19.19, 19.19) - .column("var23").hasValues(20.20, 20.20) - .column("var24").hasValues(21.21, 21.21) - .column("var25").hasValues(TimeValue.of(9, 1), TimeValue.of(9, 1)) - .column("var26").hasValues(DateValue.of(2007, 12, 23), DateValue.of(2007, 12, 23)) - .column("var27").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .column("var28").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .column("var29").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .column("var30").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var31").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var32").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var33").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var34").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var35").hasValues(Locale.FRENCH, Locale.FRENCH) - .column("var36").hasValues("22", "22") - .column("var37").hasValues("23", "23") - .column("var38").hasValues("24", "24") - .column("var39").hasValues("25", "25") - .column("var40").hasValues("26", "26") - .column("var41").hasValues("27", "27") - .column("var42").hasValues("28", "28") - .column("var43").hasValues("29", "29") - .column("var44").hasValues("30", "30") - .column("var45").hasValues("31", "31") - .column("var46").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var47").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var48").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var49").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var50").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var51").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var52").hasValues("32", "32") - .column("var53").hasValues("33", "33") - .column("var54").hasValues("34", "34") - .column("var55").hasValues("35", "35") - .column("var56").hasValues("36", "36") - .column("var57").hasValues("37", "37") - .column("var58").hasValues("38", "38") - .column("var59").hasValues(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435"), - UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")) - .column("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) - .column("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) + .column("var1").hasValues(1, 1) + .column("var2").hasValues(2, 20) + .column("var3").hasValues(3, 3) + .column("var4").hasValues(4, 4) + .column("var5").hasValues(5, 5) + .column("var6").hasValues(6, 6) + .column("var7").hasValues(true, true) + .column("var8").hasValues(false, false) + .column("var9").hasValues(true, true) + .column("var10").hasValues(7, 7) + .column("var11").hasValues(8, 8) + .column("var12").hasValues(9, 9) + .column("var13").hasValues(10, 10) + .column("var14").hasValues(11, 11) + .column("var15").hasValues(12, 12) + .column("var16").hasValues(13.13, 13.13) + .column("var17").hasValues(14.14, 14.14) + .column("var18").hasValues(15.15, 15.15) + .column("var19").hasValues(16.16, 16.16) + .column("var20").hasValues(17.17, 17.17) + .column("var21").hasValues(18.18, 18.18) + .column("var22").hasValues(19.19, 19.19) + .column("var23").hasValues(20.20, 20.20) + .column("var24").hasValues(21.21, 21.21) + .column("var25").hasValues(TimeValue.of(9, 1), TimeValue.of(9, 1)) + .column("var26").hasValues(DateValue.of(2007, 12, 23), DateValue.of(2007, 12, 23)) + .column("var27").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .column("var28").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .column("var29").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .column("var30").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var31").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var32").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var33").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var34").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var35").hasValues(Locale.FRENCH, Locale.FRENCH) + .column("var36").hasValues("22", "22") + .column("var37").hasValues("23", "23") + .column("var38").hasValues("24", "24") + .column("var39").hasValues("25", "25") + .column("var40").hasValues("26", "26") + .column("var41").hasValues("27", "27") + .column("var42").hasValues("28", "28") + .column("var43").hasValues("29", "29") + .column("var44").hasValues("30", "30") + .column("var45").hasValues("31", "31") + .column("var46").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var47").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var48").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var49").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var50").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var51").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var52").hasValues("32", "32") + .column("var53").hasValues("33", "33") + .column("var54").hasValues("34", "34") + .column("var55").hasValues("35", "35") + .column("var56").hasValues("36", "36") + .column("var57").hasValues("37", "37") + .column("var58").hasValues("38", "38") + .column("var59").hasValues(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435"), + UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")) + .column("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) + .column("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) ; } @@ -836,131 +847,131 @@ public void test_RowEquality_hasValues() { changes.setEndPointNow(); assertThat(table).row() - .hasValues(1, - 20, - 3, - 4, - 5, - 6, - true, - false, - true, - 7, - 8, - 9, - 10, - 11, - 12, - 13.13, - 14.14, - 15.15, - 16.16, - 17.17, - 18.18, - 19.19, - 20.20, - 21.21, - TimeValue.of(9, 1), - DateValue.of(2007, 12, 23), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)), - bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png"), - Locale.FRENCH, - "22", - "23", - "24", - "25", - "26", - "27", - "28", - "29", - "30", - "31", - bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png"), - "32", - "33", - "34", - "35", - "36", - "37", - "38", - UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435"), - null, - null) + .hasValues(1, + 20, + 3, + 4, + 5, + 6, + true, + false, + true, + 7, + 8, + 9, + 10, + 11, + 12, + 13.13, + 14.14, + 15.15, + 16.16, + 17.17, + 18.18, + 19.19, + 20.20, + 21.21, + TimeValue.of(9, 1), + DateValue.of(2007, 12, 23), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)), + bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png"), + Locale.FRENCH, + "22", + "23", + "24", + "25", + "26", + "27", + "28", + "29", + "30", + "31", + bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png"), + "32", + "33", + "34", + "35", + "36", + "37", + "38", + UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435"), + null, + null) ; assertThat(changes).change().rowAtStartPoint() - .hasValues(1, - 2, - 3, - 4, - 5, - 6, - true, - false, - true, - 7, - 8, - 9, - 10, - 11, - 12, - 13.13, - 14.14, - 15.15, - 16.16, - 17.17, - 18.18, - 19.19, - 20.20, - 21.21, - TimeValue.of(9, 1), - DateValue.of(2007, 12, 23), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)), - bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png"), - Locale.FRENCH, - "22", - "23", - "24", - "25", - "26", - "27", - "28", - "29", - "30", - "31", - bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png"), - "32", - "33", - "34", - "35", - "36", - "37", - "38", - UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435"), - null, - null) + .hasValues(1, + 2, + 3, + 4, + 5, + 6, + true, + false, + true, + 7, + 8, + 9, + 10, + 11, + 12, + 13.13, + 14.14, + 15.15, + 16.16, + 17.17, + 18.18, + 19.19, + 20.20, + 21.21, + TimeValue.of(9, 1), + DateValue.of(2007, 12, 23), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)), + bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png"), + Locale.FRENCH, + "22", + "23", + "24", + "25", + "26", + "27", + "28", + "29", + "30", + "31", + bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png"), + "32", + "33", + "34", + "35", + "36", + "37", + "38", + UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435"), + null, + null) ; } @@ -973,131 +984,131 @@ public void test_ValueClass_isOfClass() { changes.setEndPointNow(); assertThat(table).row() - .value("var1").isOfClass(Long.class) - .value("var2").isOfClass(Integer.class) - .value("var3").isOfClass(Integer.class) - .value("var4").isOfClass(Integer.class) - .value("var5").isOfClass(Integer.class) - .value("var6").isOfClass(Integer.class) - .value("var7").isOfClass(Boolean.class) - .value("var8").isOfClass(Boolean.class) - .value("var9").isOfClass(Boolean.class) - .value("var10").isOfClass(Byte.class) - .value("var11").isOfClass(Short.class) - .value("var12").isOfClass(Short.class) - .value("var13").isOfClass(Short.class) - .value("var14").isOfClass(Long.class) - .value("var15").isOfClass(Long.class) - .value("var16").isOfClass(BigDecimal.class) - .value("var17").isOfClass(BigDecimal.class) - .value("var18").isOfClass(BigDecimal.class) - .value("var19").isOfClass(BigDecimal.class) - .value("var20").isOfClass(Double.class) - .value("var21").isOfClass(Double.class) - .value("var22").isOfClass(Double.class) - .value("var23").isOfClass(Float.class) - .value("var24").isOfClass(Float.class) - .value("var25").isOfClass(Time.class) - .value("var26").isOfClass(Date.class) - .value("var27").isOfClass(Timestamp.class) - .value("var28").isOfClass(Timestamp.class) - .value("var29").isOfClass(Timestamp.class) - .value("var30").isOfClass(byte[].class) - .value("var31").isOfClass(byte[].class) - .value("var32").isOfClass(byte[].class) - .value("var33").isOfClass(byte[].class) - .value("var34").isOfClass(byte[].class) - .value("var35").isOfClass(Locale.class) - .value("var36").isOfClass(String.class) - .value("var37").isOfClass(String.class) - .value("var38").isOfClass(String.class) - .value("var39").isOfClass(String.class) - .value("var40").isOfClass(String.class) - .value("var41").isOfClass(String.class) - .value("var42").isOfClass(String.class) - .value("var43").isOfClass(String.class) - .value("var44").isOfClass(String.class) - .value("var45").isOfClass(String.class) - .value("var46").isOfClass(byte[].class) - .value("var47").isOfClass(byte[].class) - .value("var48").isOfClass(byte[].class) - .value("var49").isOfClass(byte[].class) - .value("var50").isOfClass(byte[].class) - .value("var51").isOfClass(byte[].class) - .value("var52").isOfClass(String.class) - .value("var53").isOfClass(String.class) - .value("var54").isOfClass(String.class) - .value("var55").isOfClass(String.class) - .value("var56").isOfClass(String.class) - .value("var57").isOfClass(String.class) - .value("var58").isOfClass(String.class) - .value("var59").isOfClass(UUID.class) - .value("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) - .value("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) + .value("var1").isOfClass(Long.class) + .value("var2").isOfClass(Integer.class) + .value("var3").isOfClass(Integer.class) + .value("var4").isOfClass(Integer.class) + .value("var5").isOfClass(Integer.class) + .value("var6").isOfClass(Integer.class) + .value("var7").isOfClass(Boolean.class) + .value("var8").isOfClass(Boolean.class) + .value("var9").isOfClass(Boolean.class) + .value("var10").isOfClass(Byte.class) + .value("var11").isOfClass(Short.class) + .value("var12").isOfClass(Short.class) + .value("var13").isOfClass(Short.class) + .value("var14").isOfClass(Long.class) + .value("var15").isOfClass(Long.class) + .value("var16").isOfClass(BigDecimal.class) + .value("var17").isOfClass(BigDecimal.class) + .value("var18").isOfClass(BigDecimal.class) + .value("var19").isOfClass(BigDecimal.class) + .value("var20").isOfClass(Double.class) + .value("var21").isOfClass(Double.class) + .value("var22").isOfClass(Double.class) + .value("var23").isOfClass(Float.class) + .value("var24").isOfClass(Float.class) + .value("var25").isOfClass(Time.class) + .value("var26").isOfClass(Date.class) + .value("var27").isOfClass(Timestamp.class) + .value("var28").isOfClass(Timestamp.class) + .value("var29").isOfClass(Timestamp.class) + .value("var30").isOfClass(byte[].class) + .value("var31").isOfClass(byte[].class) + .value("var32").isOfClass(byte[].class) + .value("var33").isOfClass(byte[].class) + .value("var34").isOfClass(byte[].class) + .value("var35").isOfClass(Locale.class) + .value("var36").isOfClass(String.class) + .value("var37").isOfClass(String.class) + .value("var38").isOfClass(String.class) + .value("var39").isOfClass(String.class) + .value("var40").isOfClass(String.class) + .value("var41").isOfClass(String.class) + .value("var42").isOfClass(String.class) + .value("var43").isOfClass(String.class) + .value("var44").isOfClass(String.class) + .value("var45").isOfClass(String.class) + .value("var46").isOfClass(byte[].class) + .value("var47").isOfClass(byte[].class) + .value("var48").isOfClass(byte[].class) + .value("var49").isOfClass(byte[].class) + .value("var50").isOfClass(byte[].class) + .value("var51").isOfClass(byte[].class) + .value("var52").isOfClass(String.class) + .value("var53").isOfClass(String.class) + .value("var54").isOfClass(String.class) + .value("var55").isOfClass(String.class) + .value("var56").isOfClass(String.class) + .value("var57").isOfClass(String.class) + .value("var58").isOfClass(String.class) + .value("var59").isOfClass(UUID.class) + .value("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) + .value("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) ; assertThat(changes).change().rowAtStartPoint() - .value("var1").isOfClass(Long.class) - .value("var2").isOfClass(Integer.class) - .value("var3").isOfClass(Integer.class) - .value("var4").isOfClass(Integer.class) - .value("var5").isOfClass(Integer.class) - .value("var6").isOfClass(Integer.class) - .value("var7").isOfClass(Boolean.class) - .value("var8").isOfClass(Boolean.class) - .value("var9").isOfClass(Boolean.class) - .value("var10").isOfClass(Byte.class) - .value("var11").isOfClass(Short.class) - .value("var12").isOfClass(Short.class) - .value("var13").isOfClass(Short.class) - .value("var14").isOfClass(Long.class) - .value("var15").isOfClass(Long.class) - .value("var16").isOfClass(BigDecimal.class) - .value("var17").isOfClass(BigDecimal.class) - .value("var18").isOfClass(BigDecimal.class) - .value("var19").isOfClass(BigDecimal.class) - .value("var20").isOfClass(Double.class) - .value("var21").isOfClass(Double.class) - .value("var22").isOfClass(Double.class) - .value("var23").isOfClass(Float.class) - .value("var24").isOfClass(Float.class) - .value("var25").isOfClass(Time.class) - .value("var26").isOfClass(Date.class) - .value("var27").isOfClass(Timestamp.class) - .value("var28").isOfClass(Timestamp.class) - .value("var29").isOfClass(Timestamp.class) - .value("var30").isOfClass(byte[].class) - .value("var31").isOfClass(byte[].class) - .value("var32").isOfClass(byte[].class) - .value("var33").isOfClass(byte[].class) - .value("var34").isOfClass(byte[].class) - .value("var35").isOfClass(Locale.class) - .value("var36").isOfClass(String.class) - .value("var37").isOfClass(String.class) - .value("var38").isOfClass(String.class) - .value("var39").isOfClass(String.class) - .value("var40").isOfClass(String.class) - .value("var41").isOfClass(String.class) - .value("var42").isOfClass(String.class) - .value("var43").isOfClass(String.class) - .value("var44").isOfClass(String.class) - .value("var45").isOfClass(String.class) - .value("var46").isOfClass(byte[].class) - .value("var47").isOfClass(byte[].class) - .value("var48").isOfClass(byte[].class) - .value("var49").isOfClass(byte[].class) - .value("var50").isOfClass(byte[].class) - .value("var51").isOfClass(byte[].class) - .value("var52").isOfClass(String.class) - .value("var53").isOfClass(String.class) - .value("var54").isOfClass(String.class) - .value("var55").isOfClass(String.class) - .value("var56").isOfClass(String.class) - .value("var57").isOfClass(String.class) - .value("var58").isOfClass(String.class) - .value("var59").isOfClass(UUID.class) - .value("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) - .value("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) + .value("var1").isOfClass(Long.class) + .value("var2").isOfClass(Integer.class) + .value("var3").isOfClass(Integer.class) + .value("var4").isOfClass(Integer.class) + .value("var5").isOfClass(Integer.class) + .value("var6").isOfClass(Integer.class) + .value("var7").isOfClass(Boolean.class) + .value("var8").isOfClass(Boolean.class) + .value("var9").isOfClass(Boolean.class) + .value("var10").isOfClass(Byte.class) + .value("var11").isOfClass(Short.class) + .value("var12").isOfClass(Short.class) + .value("var13").isOfClass(Short.class) + .value("var14").isOfClass(Long.class) + .value("var15").isOfClass(Long.class) + .value("var16").isOfClass(BigDecimal.class) + .value("var17").isOfClass(BigDecimal.class) + .value("var18").isOfClass(BigDecimal.class) + .value("var19").isOfClass(BigDecimal.class) + .value("var20").isOfClass(Double.class) + .value("var21").isOfClass(Double.class) + .value("var22").isOfClass(Double.class) + .value("var23").isOfClass(Float.class) + .value("var24").isOfClass(Float.class) + .value("var25").isOfClass(Time.class) + .value("var26").isOfClass(Date.class) + .value("var27").isOfClass(Timestamp.class) + .value("var28").isOfClass(Timestamp.class) + .value("var29").isOfClass(Timestamp.class) + .value("var30").isOfClass(byte[].class) + .value("var31").isOfClass(byte[].class) + .value("var32").isOfClass(byte[].class) + .value("var33").isOfClass(byte[].class) + .value("var34").isOfClass(byte[].class) + .value("var35").isOfClass(Locale.class) + .value("var36").isOfClass(String.class) + .value("var37").isOfClass(String.class) + .value("var38").isOfClass(String.class) + .value("var39").isOfClass(String.class) + .value("var40").isOfClass(String.class) + .value("var41").isOfClass(String.class) + .value("var42").isOfClass(String.class) + .value("var43").isOfClass(String.class) + .value("var44").isOfClass(String.class) + .value("var45").isOfClass(String.class) + .value("var46").isOfClass(byte[].class) + .value("var47").isOfClass(byte[].class) + .value("var48").isOfClass(byte[].class) + .value("var49").isOfClass(byte[].class) + .value("var50").isOfClass(byte[].class) + .value("var51").isOfClass(byte[].class) + .value("var52").isOfClass(String.class) + .value("var53").isOfClass(String.class) + .value("var54").isOfClass(String.class) + .value("var55").isOfClass(String.class) + .value("var56").isOfClass(String.class) + .value("var57").isOfClass(String.class) + .value("var58").isOfClass(String.class) + .value("var59").isOfClass(UUID.class) + .value("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) + .value("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) ; } @@ -1110,131 +1121,131 @@ public void test_ValueEquality_isEqualTo() { changes.setEndPointNow(); assertThat(table).row() - .value("var1").isEqualTo(1) - .value("var2").isEqualTo(20) - .value("var3").isEqualTo(3) - .value("var4").isEqualTo(4) - .value("var5").isEqualTo(5) - .value("var6").isEqualTo(6) - .value("var7").isEqualTo(true) - .value("var8").isEqualTo(false) - .value("var9").isEqualTo(true) - .value("var10").isEqualTo(7) - .value("var11").isEqualTo(8) - .value("var12").isEqualTo(9) - .value("var13").isEqualTo(10) - .value("var14").isEqualTo(11) - .value("var15").isEqualTo(12) - .value("var16").isEqualTo(13.13) - .value("var17").isEqualTo(14.14) - .value("var18").isEqualTo(15.15) - .value("var19").isEqualTo(16.16) - .value("var20").isEqualTo(17.17) - .value("var21").isEqualTo(18.18) - .value("var22").isEqualTo(19.19) - .value("var23").isEqualTo(20.20) - .value("var24").isEqualTo(21.21) - .value("var25").isEqualTo(TimeValue.of(9, 1)) - .value("var26").isEqualTo(DateValue.of(2007, 12, 23)) - .value("var27").isEqualTo(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .value("var28").isEqualTo(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .value("var29").isEqualTo(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .value("var30").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var31").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var32").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var33").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var34").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var35").isEqualTo(Locale.FRENCH) - .value("var36").isEqualTo("22") - .value("var37").isEqualTo("23") - .value("var38").isEqualTo("24") - .value("var39").isEqualTo("25") - .value("var40").isEqualTo("26") - .value("var41").isEqualTo("27") - .value("var42").isEqualTo("28") - .value("var43").isEqualTo("29") - .value("var44").isEqualTo("30") - .value("var45").isEqualTo("31") - .value("var46").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var47").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var48").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var49").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var50").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var51").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var52").isEqualTo("32") - .value("var53").isEqualTo("33") - .value("var54").isEqualTo("34") - .value("var55").isEqualTo("35") - .value("var56").isEqualTo("36") - .value("var57").isEqualTo("37") - .value("var58").isEqualTo("38") - .value("var59").isEqualTo(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")) - .value("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) - .value("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) + .value("var1").isEqualTo(1) + .value("var2").isEqualTo(20) + .value("var3").isEqualTo(3) + .value("var4").isEqualTo(4) + .value("var5").isEqualTo(5) + .value("var6").isEqualTo(6) + .value("var7").isEqualTo(true) + .value("var8").isEqualTo(false) + .value("var9").isEqualTo(true) + .value("var10").isEqualTo(7) + .value("var11").isEqualTo(8) + .value("var12").isEqualTo(9) + .value("var13").isEqualTo(10) + .value("var14").isEqualTo(11) + .value("var15").isEqualTo(12) + .value("var16").isEqualTo(13.13) + .value("var17").isEqualTo(14.14) + .value("var18").isEqualTo(15.15) + .value("var19").isEqualTo(16.16) + .value("var20").isEqualTo(17.17) + .value("var21").isEqualTo(18.18) + .value("var22").isEqualTo(19.19) + .value("var23").isEqualTo(20.20) + .value("var24").isEqualTo(21.21) + .value("var25").isEqualTo(TimeValue.of(9, 1)) + .value("var26").isEqualTo(DateValue.of(2007, 12, 23)) + .value("var27").isEqualTo(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .value("var28").isEqualTo(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .value("var29").isEqualTo(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .value("var30").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var31").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var32").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var33").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var34").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var35").isEqualTo(Locale.FRENCH) + .value("var36").isEqualTo("22") + .value("var37").isEqualTo("23") + .value("var38").isEqualTo("24") + .value("var39").isEqualTo("25") + .value("var40").isEqualTo("26") + .value("var41").isEqualTo("27") + .value("var42").isEqualTo("28") + .value("var43").isEqualTo("29") + .value("var44").isEqualTo("30") + .value("var45").isEqualTo("31") + .value("var46").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var47").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var48").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var49").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var50").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var51").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var52").isEqualTo("32") + .value("var53").isEqualTo("33") + .value("var54").isEqualTo("34") + .value("var55").isEqualTo("35") + .value("var56").isEqualTo("36") + .value("var57").isEqualTo("37") + .value("var58").isEqualTo("38") + .value("var59").isEqualTo(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")) + .value("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) + .value("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) ; assertThat(changes).change().rowAtStartPoint() - .value("var1").isEqualTo(1) - .value("var2").isEqualTo(2) - .value("var3").isEqualTo(3) - .value("var4").isEqualTo(4) - .value("var5").isEqualTo(5) - .value("var6").isEqualTo(6) - .value("var7").isEqualTo(true) - .value("var8").isEqualTo(false) - .value("var9").isEqualTo(true) - .value("var10").isEqualTo(7) - .value("var11").isEqualTo(8) - .value("var12").isEqualTo(9) - .value("var13").isEqualTo(10) - .value("var14").isEqualTo(11) - .value("var15").isEqualTo(12) - .value("var16").isEqualTo(13.13) - .value("var17").isEqualTo(14.14) - .value("var18").isEqualTo(15.15) - .value("var19").isEqualTo(16.16) - .value("var20").isEqualTo(17.17) - .value("var21").isEqualTo(18.18) - .value("var22").isEqualTo(19.19) - .value("var23").isEqualTo(20.20) - .value("var24").isEqualTo(21.21) - .value("var25").isEqualTo(TimeValue.of(9, 1)) - .value("var26").isEqualTo(DateValue.of(2007, 12, 23)) - .value("var27").isEqualTo(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .value("var28").isEqualTo(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .value("var29").isEqualTo(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .value("var30").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var31").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var32").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var33").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var34").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var35").isEqualTo(Locale.FRENCH) - .value("var36").isEqualTo("22") - .value("var37").isEqualTo("23") - .value("var38").isEqualTo("24") - .value("var39").isEqualTo("25") - .value("var40").isEqualTo("26") - .value("var41").isEqualTo("27") - .value("var42").isEqualTo("28") - .value("var43").isEqualTo("29") - .value("var44").isEqualTo("30") - .value("var45").isEqualTo("31") - .value("var46").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var47").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var48").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var49").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var50").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var51").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var52").isEqualTo("32") - .value("var53").isEqualTo("33") - .value("var54").isEqualTo("34") - .value("var55").isEqualTo("35") - .value("var56").isEqualTo("36") - .value("var57").isEqualTo("37") - .value("var58").isEqualTo("38") - .value("var59").isEqualTo(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")) - .value("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) - .value("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) + .value("var1").isEqualTo(1) + .value("var2").isEqualTo(2) + .value("var3").isEqualTo(3) + .value("var4").isEqualTo(4) + .value("var5").isEqualTo(5) + .value("var6").isEqualTo(6) + .value("var7").isEqualTo(true) + .value("var8").isEqualTo(false) + .value("var9").isEqualTo(true) + .value("var10").isEqualTo(7) + .value("var11").isEqualTo(8) + .value("var12").isEqualTo(9) + .value("var13").isEqualTo(10) + .value("var14").isEqualTo(11) + .value("var15").isEqualTo(12) + .value("var16").isEqualTo(13.13) + .value("var17").isEqualTo(14.14) + .value("var18").isEqualTo(15.15) + .value("var19").isEqualTo(16.16) + .value("var20").isEqualTo(17.17) + .value("var21").isEqualTo(18.18) + .value("var22").isEqualTo(19.19) + .value("var23").isEqualTo(20.20) + .value("var24").isEqualTo(21.21) + .value("var25").isEqualTo(TimeValue.of(9, 1)) + .value("var26").isEqualTo(DateValue.of(2007, 12, 23)) + .value("var27").isEqualTo(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .value("var28").isEqualTo(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .value("var29").isEqualTo(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .value("var30").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var31").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var32").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var33").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var34").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var35").isEqualTo(Locale.FRENCH) + .value("var36").isEqualTo("22") + .value("var37").isEqualTo("23") + .value("var38").isEqualTo("24") + .value("var39").isEqualTo("25") + .value("var40").isEqualTo("26") + .value("var41").isEqualTo("27") + .value("var42").isEqualTo("28") + .value("var43").isEqualTo("29") + .value("var44").isEqualTo("30") + .value("var45").isEqualTo("31") + .value("var46").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var47").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var48").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var49").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var50").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var51").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var52").isEqualTo("32") + .value("var53").isEqualTo("33") + .value("var54").isEqualTo("34") + .value("var55").isEqualTo("35") + .value("var56").isEqualTo("36") + .value("var57").isEqualTo("37") + .value("var58").isEqualTo("38") + .value("var59").isEqualTo(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")) + .value("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) + .value("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) ; } @@ -1247,131 +1258,131 @@ public void test_ValueNonEquality_isNotEqualTo() { changes.setEndPointNow(); assertThat(table).row() - .value("var1").isNotEqualTo(10) - .value("var2").isNotEqualTo(200) - .value("var3").isNotEqualTo(30) - .value("var4").isNotEqualTo(40) - .value("var5").isNotEqualTo(50) - .value("var6").isNotEqualTo(60) - .value("var7").isNotEqualTo(false) - .value("var8").isNotEqualTo(true) - .value("var9").isNotEqualTo(false) - .value("var10").isNotEqualTo(70) - .value("var11").isNotEqualTo(80) - .value("var12").isNotEqualTo(90) - .value("var13").isNotEqualTo(100) - .value("var14").isNotEqualTo(110) - .value("var15").isNotEqualTo(120) - .value("var16").isNotEqualTo(130.13) - .value("var17").isNotEqualTo(140.14) - .value("var18").isNotEqualTo(150.15) - .value("var19").isNotEqualTo(160.16) - .value("var20").isNotEqualTo(170.17) - .value("var21").isNotEqualTo(180.18) - .value("var22").isNotEqualTo(190.19) - .value("var23").isNotEqualTo(200.20) - .value("var24").isNotEqualTo(210.21) - .value("var25").isNotEqualTo(TimeValue.of(9, 10)) - .value("var26").isNotEqualTo(DateValue.of(2006, 12, 23)) - .value("var27").isNotEqualTo(DateTimeValue.of(DateValue.of(2006, 12, 23), TimeValue.of(9, 1))) - .value("var28").isNotEqualTo(DateTimeValue.of(DateValue.of(2006, 12, 23), TimeValue.of(9, 1))) - .value("var29").isNotEqualTo(DateTimeValue.of(DateValue.of(2006, 12, 23), TimeValue.of(9, 1))) - .value("var30").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var31").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var32").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var33").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var34").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var35").isNotEqualTo(Locale.ENGLISH) - .value("var36").isNotEqualTo("220") - .value("var37").isNotEqualTo("230") - .value("var38").isNotEqualTo("240") - .value("var39").isNotEqualTo("250") - .value("var40").isNotEqualTo("260") - .value("var41").isNotEqualTo("270") - .value("var42").isNotEqualTo("280") - .value("var43").isNotEqualTo("290") - .value("var44").isNotEqualTo("300") - .value("var45").isNotEqualTo("310") - .value("var46").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var47").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var48").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var49").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var50").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var51").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var52").isNotEqualTo("320") - .value("var53").isNotEqualTo("330") - .value("var54").isNotEqualTo("340") - .value("var55").isNotEqualTo("350") - .value("var56").isNotEqualTo("360") - .value("var57").isNotEqualTo("370") - .value("var58").isNotEqualTo("380") - .value("var59").isNotEqualTo(UUID.fromString("16319617-AE95-4087-9264-D3D21BF611B6")) - .value("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) - .value("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) + .value("var1").isNotEqualTo(10) + .value("var2").isNotEqualTo(200) + .value("var3").isNotEqualTo(30) + .value("var4").isNotEqualTo(40) + .value("var5").isNotEqualTo(50) + .value("var6").isNotEqualTo(60) + .value("var7").isNotEqualTo(false) + .value("var8").isNotEqualTo(true) + .value("var9").isNotEqualTo(false) + .value("var10").isNotEqualTo(70) + .value("var11").isNotEqualTo(80) + .value("var12").isNotEqualTo(90) + .value("var13").isNotEqualTo(100) + .value("var14").isNotEqualTo(110) + .value("var15").isNotEqualTo(120) + .value("var16").isNotEqualTo(130.13) + .value("var17").isNotEqualTo(140.14) + .value("var18").isNotEqualTo(150.15) + .value("var19").isNotEqualTo(160.16) + .value("var20").isNotEqualTo(170.17) + .value("var21").isNotEqualTo(180.18) + .value("var22").isNotEqualTo(190.19) + .value("var23").isNotEqualTo(200.20) + .value("var24").isNotEqualTo(210.21) + .value("var25").isNotEqualTo(TimeValue.of(9, 10)) + .value("var26").isNotEqualTo(DateValue.of(2006, 12, 23)) + .value("var27").isNotEqualTo(DateTimeValue.of(DateValue.of(2006, 12, 23), TimeValue.of(9, 1))) + .value("var28").isNotEqualTo(DateTimeValue.of(DateValue.of(2006, 12, 23), TimeValue.of(9, 1))) + .value("var29").isNotEqualTo(DateTimeValue.of(DateValue.of(2006, 12, 23), TimeValue.of(9, 1))) + .value("var30").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var31").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var32").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var33").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var34").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var35").isNotEqualTo(Locale.ENGLISH) + .value("var36").isNotEqualTo("220") + .value("var37").isNotEqualTo("230") + .value("var38").isNotEqualTo("240") + .value("var39").isNotEqualTo("250") + .value("var40").isNotEqualTo("260") + .value("var41").isNotEqualTo("270") + .value("var42").isNotEqualTo("280") + .value("var43").isNotEqualTo("290") + .value("var44").isNotEqualTo("300") + .value("var45").isNotEqualTo("310") + .value("var46").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var47").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var48").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var49").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var50").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var51").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var52").isNotEqualTo("320") + .value("var53").isNotEqualTo("330") + .value("var54").isNotEqualTo("340") + .value("var55").isNotEqualTo("350") + .value("var56").isNotEqualTo("360") + .value("var57").isNotEqualTo("370") + .value("var58").isNotEqualTo("380") + .value("var59").isNotEqualTo(UUID.fromString("16319617-AE95-4087-9264-D3D21BF611B6")) + .value("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) + .value("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) ; assertThat(changes).change().rowAtStartPoint() - .value("var1").isNotEqualTo(10) - .value("var2").isNotEqualTo(20) - .value("var3").isNotEqualTo(30) - .value("var4").isNotEqualTo(40) - .value("var5").isNotEqualTo(50) - .value("var6").isNotEqualTo(60) - .value("var7").isNotEqualTo(false) - .value("var8").isNotEqualTo(true) - .value("var9").isNotEqualTo(false) - .value("var10").isNotEqualTo(70) - .value("var11").isNotEqualTo(80) - .value("var12").isNotEqualTo(90) - .value("var13").isNotEqualTo(100) - .value("var14").isNotEqualTo(110) - .value("var15").isNotEqualTo(120) - .value("var16").isNotEqualTo(130.13) - .value("var17").isNotEqualTo(140.14) - .value("var18").isNotEqualTo(150.15) - .value("var19").isNotEqualTo(160.16) - .value("var20").isNotEqualTo(170.17) - .value("var21").isNotEqualTo(180.18) - .value("var22").isNotEqualTo(190.19) - .value("var23").isNotEqualTo(200.20) - .value("var24").isNotEqualTo(210.21) - .value("var25").isNotEqualTo(TimeValue.of(9, 10)) - .value("var26").isNotEqualTo(DateValue.of(2006, 12, 23)) - .value("var27").isNotEqualTo(DateTimeValue.of(DateValue.of(2006, 12, 23), TimeValue.of(9, 1))) - .value("var28").isNotEqualTo(DateTimeValue.of(DateValue.of(2006, 12, 23), TimeValue.of(9, 1))) - .value("var29").isNotEqualTo(DateTimeValue.of(DateValue.of(2006, 12, 23), TimeValue.of(9, 1))) - .value("var30").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var31").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var32").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var33").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var34").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var35").isNotEqualTo(Locale.ENGLISH) - .value("var36").isNotEqualTo("220") - .value("var37").isNotEqualTo("230") - .value("var38").isNotEqualTo("240") - .value("var39").isNotEqualTo("250") - .value("var40").isNotEqualTo("260") - .value("var41").isNotEqualTo("270") - .value("var42").isNotEqualTo("280") - .value("var43").isNotEqualTo("290") - .value("var44").isNotEqualTo("300") - .value("var45").isNotEqualTo("310") - .value("var46").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var47").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var48").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var49").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var50").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var51").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var52").isNotEqualTo("320") - .value("var53").isNotEqualTo("330") - .value("var54").isNotEqualTo("340") - .value("var55").isNotEqualTo("350") - .value("var56").isNotEqualTo("360") - .value("var57").isNotEqualTo("370") - .value("var58").isNotEqualTo("380") - .value("var59").isNotEqualTo(UUID.fromString("16319617-AE95-4087-9264-D3D21BF611B6")) - .value("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) - .value("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) + .value("var1").isNotEqualTo(10) + .value("var2").isNotEqualTo(20) + .value("var3").isNotEqualTo(30) + .value("var4").isNotEqualTo(40) + .value("var5").isNotEqualTo(50) + .value("var6").isNotEqualTo(60) + .value("var7").isNotEqualTo(false) + .value("var8").isNotEqualTo(true) + .value("var9").isNotEqualTo(false) + .value("var10").isNotEqualTo(70) + .value("var11").isNotEqualTo(80) + .value("var12").isNotEqualTo(90) + .value("var13").isNotEqualTo(100) + .value("var14").isNotEqualTo(110) + .value("var15").isNotEqualTo(120) + .value("var16").isNotEqualTo(130.13) + .value("var17").isNotEqualTo(140.14) + .value("var18").isNotEqualTo(150.15) + .value("var19").isNotEqualTo(160.16) + .value("var20").isNotEqualTo(170.17) + .value("var21").isNotEqualTo(180.18) + .value("var22").isNotEqualTo(190.19) + .value("var23").isNotEqualTo(200.20) + .value("var24").isNotEqualTo(210.21) + .value("var25").isNotEqualTo(TimeValue.of(9, 10)) + .value("var26").isNotEqualTo(DateValue.of(2006, 12, 23)) + .value("var27").isNotEqualTo(DateTimeValue.of(DateValue.of(2006, 12, 23), TimeValue.of(9, 1))) + .value("var28").isNotEqualTo(DateTimeValue.of(DateValue.of(2006, 12, 23), TimeValue.of(9, 1))) + .value("var29").isNotEqualTo(DateTimeValue.of(DateValue.of(2006, 12, 23), TimeValue.of(9, 1))) + .value("var30").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var31").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var32").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var33").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var34").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var35").isNotEqualTo(Locale.ENGLISH) + .value("var36").isNotEqualTo("220") + .value("var37").isNotEqualTo("230") + .value("var38").isNotEqualTo("240") + .value("var39").isNotEqualTo("250") + .value("var40").isNotEqualTo("260") + .value("var41").isNotEqualTo("270") + .value("var42").isNotEqualTo("280") + .value("var43").isNotEqualTo("290") + .value("var44").isNotEqualTo("300") + .value("var45").isNotEqualTo("310") + .value("var46").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var47").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var48").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var49").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var50").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var51").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var52").isNotEqualTo("320") + .value("var53").isNotEqualTo("330") + .value("var54").isNotEqualTo("340") + .value("var55").isNotEqualTo("350") + .value("var56").isNotEqualTo("360") + .value("var57").isNotEqualTo("370") + .value("var58").isNotEqualTo("380") + .value("var59").isNotEqualTo(UUID.fromString("16319617-AE95-4087-9264-D3D21BF611B6")) + .value("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) + .value("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) ; } @@ -1384,131 +1395,131 @@ public void test_ValueType_isOfType() { changes.setEndPointNow(); assertThat(table).row() - .value("var1").isNumber().isOfType(ValueType.NUMBER) - .value("var2").isNumber().isOfType(ValueType.NUMBER) - .value("var3").isNumber().isOfType(ValueType.NUMBER) - .value("var4").isNumber().isOfType(ValueType.NUMBER) - .value("var5").isNumber().isOfType(ValueType.NUMBER) - .value("var6").isNumber().isOfType(ValueType.NUMBER) - .value("var7").isBoolean().isOfType(ValueType.BOOLEAN) - .value("var8").isBoolean().isOfType(ValueType.BOOLEAN) - .value("var9").isBoolean().isOfType(ValueType.BOOLEAN) - .value("var10").isNumber().isOfType(ValueType.NUMBER) - .value("var11").isNumber().isOfType(ValueType.NUMBER) - .value("var12").isNumber().isOfType(ValueType.NUMBER) - .value("var13").isNumber().isOfType(ValueType.NUMBER) - .value("var14").isNumber().isOfType(ValueType.NUMBER) - .value("var15").isNumber().isOfType(ValueType.NUMBER) - .value("var16").isNumber().isOfType(ValueType.NUMBER) - .value("var17").isNumber().isOfType(ValueType.NUMBER) - .value("var18").isNumber().isOfType(ValueType.NUMBER) - .value("var19").isNumber().isOfType(ValueType.NUMBER) - .value("var20").isNumber().isOfType(ValueType.NUMBER) - .value("var21").isNumber().isOfType(ValueType.NUMBER) - .value("var22").isNumber().isOfType(ValueType.NUMBER) - .value("var23").isNumber().isOfType(ValueType.NUMBER) - .value("var24").isNumber().isOfType(ValueType.NUMBER) - .value("var25").isTime().isOfType(ValueType.TIME) - .value("var26").isDate().isOfType(ValueType.DATE) - .value("var27").isDateTime().isOfType(ValueType.DATE_TIME) - .value("var28").isDateTime().isOfType(ValueType.DATE_TIME) - .value("var29").isDateTime().isOfType(ValueType.DATE_TIME) - .value("var30").isBytes().isOfType(ValueType.BYTES) - .value("var31").isBytes().isOfType(ValueType.BYTES) - .value("var32").isBytes().isOfType(ValueType.BYTES) - .value("var33").isBytes().isOfType(ValueType.BYTES) - .value("var34").isBytes().isOfType(ValueType.BYTES) - .value("var35") - .value("var36").isText().isOfType(ValueType.TEXT) - .value("var37").isText().isOfType(ValueType.TEXT) - .value("var38").isText().isOfType(ValueType.TEXT) - .value("var39").isText().isOfType(ValueType.TEXT) - .value("var40").isText().isOfType(ValueType.TEXT) - .value("var41").isText().isOfType(ValueType.TEXT) - .value("var42").isText().isOfType(ValueType.TEXT) - .value("var43").isText().isOfType(ValueType.TEXT) - .value("var44").isText().isOfType(ValueType.TEXT) - .value("var45").isText().isOfType(ValueType.TEXT) - .value("var46").isBytes().isOfType(ValueType.BYTES) - .value("var47").isBytes().isOfType(ValueType.BYTES) - .value("var48").isBytes().isOfType(ValueType.BYTES) - .value("var49").isBytes().isOfType(ValueType.BYTES) - .value("var50").isBytes().isOfType(ValueType.BYTES) - .value("var51").isBytes().isOfType(ValueType.BYTES) - .value("var52").isText().isOfType(ValueType.TEXT) - .value("var53").isText().isOfType(ValueType.TEXT) - .value("var54").isText().isOfType(ValueType.TEXT) - .value("var55").isText().isOfType(ValueType.TEXT) - .value("var56").isText().isOfType(ValueType.TEXT) - .value("var57").isText().isOfType(ValueType.TEXT) - .value("var58").isText().isOfType(ValueType.TEXT) - .value("var59").isUUID().isOfType(ValueType.UUID) - .value("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) - .value("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) + .value("var1").isNumber().isOfType(ValueType.NUMBER) + .value("var2").isNumber().isOfType(ValueType.NUMBER) + .value("var3").isNumber().isOfType(ValueType.NUMBER) + .value("var4").isNumber().isOfType(ValueType.NUMBER) + .value("var5").isNumber().isOfType(ValueType.NUMBER) + .value("var6").isNumber().isOfType(ValueType.NUMBER) + .value("var7").isBoolean().isOfType(ValueType.BOOLEAN) + .value("var8").isBoolean().isOfType(ValueType.BOOLEAN) + .value("var9").isBoolean().isOfType(ValueType.BOOLEAN) + .value("var10").isNumber().isOfType(ValueType.NUMBER) + .value("var11").isNumber().isOfType(ValueType.NUMBER) + .value("var12").isNumber().isOfType(ValueType.NUMBER) + .value("var13").isNumber().isOfType(ValueType.NUMBER) + .value("var14").isNumber().isOfType(ValueType.NUMBER) + .value("var15").isNumber().isOfType(ValueType.NUMBER) + .value("var16").isNumber().isOfType(ValueType.NUMBER) + .value("var17").isNumber().isOfType(ValueType.NUMBER) + .value("var18").isNumber().isOfType(ValueType.NUMBER) + .value("var19").isNumber().isOfType(ValueType.NUMBER) + .value("var20").isNumber().isOfType(ValueType.NUMBER) + .value("var21").isNumber().isOfType(ValueType.NUMBER) + .value("var22").isNumber().isOfType(ValueType.NUMBER) + .value("var23").isNumber().isOfType(ValueType.NUMBER) + .value("var24").isNumber().isOfType(ValueType.NUMBER) + .value("var25").isTime().isOfType(ValueType.TIME) + .value("var26").isDate().isOfType(ValueType.DATE) + .value("var27").isDateTime().isOfType(ValueType.DATE_TIME) + .value("var28").isDateTime().isOfType(ValueType.DATE_TIME) + .value("var29").isDateTime().isOfType(ValueType.DATE_TIME) + .value("var30").isBytes().isOfType(ValueType.BYTES) + .value("var31").isBytes().isOfType(ValueType.BYTES) + .value("var32").isBytes().isOfType(ValueType.BYTES) + .value("var33").isBytes().isOfType(ValueType.BYTES) + .value("var34").isBytes().isOfType(ValueType.BYTES) + .value("var35") + .value("var36").isText().isOfType(ValueType.TEXT) + .value("var37").isText().isOfType(ValueType.TEXT) + .value("var38").isText().isOfType(ValueType.TEXT) + .value("var39").isText().isOfType(ValueType.TEXT) + .value("var40").isText().isOfType(ValueType.TEXT) + .value("var41").isText().isOfType(ValueType.TEXT) + .value("var42").isText().isOfType(ValueType.TEXT) + .value("var43").isText().isOfType(ValueType.TEXT) + .value("var44").isText().isOfType(ValueType.TEXT) + .value("var45").isText().isOfType(ValueType.TEXT) + .value("var46").isBytes().isOfType(ValueType.BYTES) + .value("var47").isBytes().isOfType(ValueType.BYTES) + .value("var48").isBytes().isOfType(ValueType.BYTES) + .value("var49").isBytes().isOfType(ValueType.BYTES) + .value("var50").isBytes().isOfType(ValueType.BYTES) + .value("var51").isBytes().isOfType(ValueType.BYTES) + .value("var52").isText().isOfType(ValueType.TEXT) + .value("var53").isText().isOfType(ValueType.TEXT) + .value("var54").isText().isOfType(ValueType.TEXT) + .value("var55").isText().isOfType(ValueType.TEXT) + .value("var56").isText().isOfType(ValueType.TEXT) + .value("var57").isText().isOfType(ValueType.TEXT) + .value("var58").isText().isOfType(ValueType.TEXT) + .value("var59").isUUID().isOfType(ValueType.UUID) + .value("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) + .value("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) ; assertThat(changes).change().rowAtStartPoint() - .value("var1").isNumber().isOfType(ValueType.NUMBER) - .value("var2").isNumber().isOfType(ValueType.NUMBER) - .value("var3").isNumber().isOfType(ValueType.NUMBER) - .value("var4").isNumber().isOfType(ValueType.NUMBER) - .value("var5").isNumber().isOfType(ValueType.NUMBER) - .value("var6").isNumber().isOfType(ValueType.NUMBER) - .value("var7").isBoolean().isOfType(ValueType.BOOLEAN) - .value("var8").isBoolean().isOfType(ValueType.BOOLEAN) - .value("var9").isBoolean().isOfType(ValueType.BOOLEAN) - .value("var10").isNumber().isOfType(ValueType.NUMBER) - .value("var11").isNumber().isOfType(ValueType.NUMBER) - .value("var12").isNumber().isOfType(ValueType.NUMBER) - .value("var13").isNumber().isOfType(ValueType.NUMBER) - .value("var14").isNumber().isOfType(ValueType.NUMBER) - .value("var15").isNumber().isOfType(ValueType.NUMBER) - .value("var16").isNumber().isOfType(ValueType.NUMBER) - .value("var17").isNumber().isOfType(ValueType.NUMBER) - .value("var18").isNumber().isOfType(ValueType.NUMBER) - .value("var19").isNumber().isOfType(ValueType.NUMBER) - .value("var20").isNumber().isOfType(ValueType.NUMBER) - .value("var21").isNumber().isOfType(ValueType.NUMBER) - .value("var22").isNumber().isOfType(ValueType.NUMBER) - .value("var23").isNumber().isOfType(ValueType.NUMBER) - .value("var24").isNumber().isOfType(ValueType.NUMBER) - .value("var25").isTime().isOfType(ValueType.TIME) - .value("var26").isDate().isOfType(ValueType.DATE) - .value("var27").isDateTime().isOfType(ValueType.DATE_TIME) - .value("var28").isDateTime().isOfType(ValueType.DATE_TIME) - .value("var29").isDateTime().isOfType(ValueType.DATE_TIME) - .value("var30").isBytes().isOfType(ValueType.BYTES) - .value("var31").isBytes().isOfType(ValueType.BYTES) - .value("var32").isBytes().isOfType(ValueType.BYTES) - .value("var33").isBytes().isOfType(ValueType.BYTES) - .value("var34").isBytes().isOfType(ValueType.BYTES) - .value("var35") - .value("var36").isText().isOfType(ValueType.TEXT) - .value("var37").isText().isOfType(ValueType.TEXT) - .value("var38").isText().isOfType(ValueType.TEXT) - .value("var39").isText().isOfType(ValueType.TEXT) - .value("var40").isText().isOfType(ValueType.TEXT) - .value("var41").isText().isOfType(ValueType.TEXT) - .value("var42").isText().isOfType(ValueType.TEXT) - .value("var43").isText().isOfType(ValueType.TEXT) - .value("var44").isText().isOfType(ValueType.TEXT) - .value("var45").isText().isOfType(ValueType.TEXT) - .value("var46").isBytes().isOfType(ValueType.BYTES) - .value("var47").isBytes().isOfType(ValueType.BYTES) - .value("var48").isBytes().isOfType(ValueType.BYTES) - .value("var49").isBytes().isOfType(ValueType.BYTES) - .value("var50").isBytes().isOfType(ValueType.BYTES) - .value("var51").isBytes().isOfType(ValueType.BYTES) - .value("var52").isText().isOfType(ValueType.TEXT) - .value("var53").isText().isOfType(ValueType.TEXT) - .value("var54").isText().isOfType(ValueType.TEXT) - .value("var55").isText().isOfType(ValueType.TEXT) - .value("var56").isText().isOfType(ValueType.TEXT) - .value("var57").isText().isOfType(ValueType.TEXT) - .value("var58").isText().isOfType(ValueType.TEXT) - .value("var59").isUUID().isOfType(ValueType.UUID) - .value("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) - .value("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) + .value("var1").isNumber().isOfType(ValueType.NUMBER) + .value("var2").isNumber().isOfType(ValueType.NUMBER) + .value("var3").isNumber().isOfType(ValueType.NUMBER) + .value("var4").isNumber().isOfType(ValueType.NUMBER) + .value("var5").isNumber().isOfType(ValueType.NUMBER) + .value("var6").isNumber().isOfType(ValueType.NUMBER) + .value("var7").isBoolean().isOfType(ValueType.BOOLEAN) + .value("var8").isBoolean().isOfType(ValueType.BOOLEAN) + .value("var9").isBoolean().isOfType(ValueType.BOOLEAN) + .value("var10").isNumber().isOfType(ValueType.NUMBER) + .value("var11").isNumber().isOfType(ValueType.NUMBER) + .value("var12").isNumber().isOfType(ValueType.NUMBER) + .value("var13").isNumber().isOfType(ValueType.NUMBER) + .value("var14").isNumber().isOfType(ValueType.NUMBER) + .value("var15").isNumber().isOfType(ValueType.NUMBER) + .value("var16").isNumber().isOfType(ValueType.NUMBER) + .value("var17").isNumber().isOfType(ValueType.NUMBER) + .value("var18").isNumber().isOfType(ValueType.NUMBER) + .value("var19").isNumber().isOfType(ValueType.NUMBER) + .value("var20").isNumber().isOfType(ValueType.NUMBER) + .value("var21").isNumber().isOfType(ValueType.NUMBER) + .value("var22").isNumber().isOfType(ValueType.NUMBER) + .value("var23").isNumber().isOfType(ValueType.NUMBER) + .value("var24").isNumber().isOfType(ValueType.NUMBER) + .value("var25").isTime().isOfType(ValueType.TIME) + .value("var26").isDate().isOfType(ValueType.DATE) + .value("var27").isDateTime().isOfType(ValueType.DATE_TIME) + .value("var28").isDateTime().isOfType(ValueType.DATE_TIME) + .value("var29").isDateTime().isOfType(ValueType.DATE_TIME) + .value("var30").isBytes().isOfType(ValueType.BYTES) + .value("var31").isBytes().isOfType(ValueType.BYTES) + .value("var32").isBytes().isOfType(ValueType.BYTES) + .value("var33").isBytes().isOfType(ValueType.BYTES) + .value("var34").isBytes().isOfType(ValueType.BYTES) + .value("var35") + .value("var36").isText().isOfType(ValueType.TEXT) + .value("var37").isText().isOfType(ValueType.TEXT) + .value("var38").isText().isOfType(ValueType.TEXT) + .value("var39").isText().isOfType(ValueType.TEXT) + .value("var40").isText().isOfType(ValueType.TEXT) + .value("var41").isText().isOfType(ValueType.TEXT) + .value("var42").isText().isOfType(ValueType.TEXT) + .value("var43").isText().isOfType(ValueType.TEXT) + .value("var44").isText().isOfType(ValueType.TEXT) + .value("var45").isText().isOfType(ValueType.TEXT) + .value("var46").isBytes().isOfType(ValueType.BYTES) + .value("var47").isBytes().isOfType(ValueType.BYTES) + .value("var48").isBytes().isOfType(ValueType.BYTES) + .value("var49").isBytes().isOfType(ValueType.BYTES) + .value("var50").isBytes().isOfType(ValueType.BYTES) + .value("var51").isBytes().isOfType(ValueType.BYTES) + .value("var52").isText().isOfType(ValueType.TEXT) + .value("var53").isText().isOfType(ValueType.TEXT) + .value("var54").isText().isOfType(ValueType.TEXT) + .value("var55").isText().isOfType(ValueType.TEXT) + .value("var56").isText().isOfType(ValueType.TEXT) + .value("var57").isText().isOfType(ValueType.TEXT) + .value("var58").isText().isOfType(ValueType.TEXT) + .value("var59").isUUID().isOfType(ValueType.UUID) + .value("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) + .value("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) ; } diff --git a/src/test/java/org/assertj/db/database/h2/H2Database_Source_NSNSNS_Test.java b/src/test/java/org/assertj/db/database/h2/H2Database_Source_NSNSNS_Test.java index 5a4ee56c..ade7a6d8 100644 --- a/src/test/java/org/assertj/db/database/h2/H2Database_Source_NSNSNS_Test.java +++ b/src/test/java/org/assertj/db/database/h2/H2Database_Source_NSNSNS_Test.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.database.h2; @@ -78,190 +78,190 @@ public void test_Outputs_output() { ByteArrayOutputStream byteArrayOutputStream15 = new ByteArrayOutputStream(); ByteArrayOutputStream byteArrayOutputStream16 = new ByteArrayOutputStream(); Outputs.output(table).toStream(byteArrayOutputStream0) - .column().toStream(byteArrayOutputStream1) - .value().toStream(byteArrayOutputStream2) - .row().toStream(byteArrayOutputStream3) - .value().toStream(byteArrayOutputStream4); + .column().toStream(byteArrayOutputStream1) + .value().toStream(byteArrayOutputStream2) + .row().toStream(byteArrayOutputStream3) + .value().toStream(byteArrayOutputStream4); output(changes).toStream(byteArrayOutputStream5) - .change().toStream(byteArrayOutputStream6) - .rowAtEndPoint().toStream(byteArrayOutputStream7) - .value().toStream(byteArrayOutputStream8) - .column().toStream(byteArrayOutputStream9) - .valueAtEndPoint().toStream(byteArrayOutputStream10); + .change().toStream(byteArrayOutputStream6) + .rowAtEndPoint().toStream(byteArrayOutputStream7) + .value().toStream(byteArrayOutputStream8) + .column().toStream(byteArrayOutputStream9) + .valueAtEndPoint().toStream(byteArrayOutputStream10); output(changes2).toStream(byteArrayOutputStream11) - .change().toStream(byteArrayOutputStream12) - .rowAtEndPoint().toStream(byteArrayOutputStream13) - .value().toStream(byteArrayOutputStream14) - .column().toStream(byteArrayOutputStream15) - .valueAtEndPoint().toStream(byteArrayOutputStream16); + .change().toStream(byteArrayOutputStream12) + .rowAtEndPoint().toStream(byteArrayOutputStream13) + .value().toStream(byteArrayOutputStream14) + .column().toStream(byteArrayOutputStream15) + .valueAtEndPoint().toStream(byteArrayOutputStream16); Assertions.assertThat(byteArrayOutputStream0.toString()).isEqualTo(String.format("[TEST table]%n" - + "|-----------|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" - + "| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |%n" - + "| | PRIMARY | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 | VAR20 | VAR21 | VAR22 | VAR23 | VAR24 | VAR25 | VAR26 | VAR27 | VAR28 | VAR29 | VAR30 | VAR31 | VAR32 | VAR33 | VAR34 | VAR35 | VAR36 | VAR37 | VAR38 | VAR39 | VAR40 | VAR41 | VAR42 | VAR43 | VAR44 | VAR45 | VAR46 | VAR47 | VAR48 | VAR49 | VAR50 | VAR51 | VAR52 | VAR53 | VAR54 | VAR55 | VAR56 | VAR57 | VAR58 | VAR59 | VAR60 | VAR61 |%n" - + "| | KEY | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (BOOLEAN) | (BOOLEAN) | (BOOLEAN) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TIME) | (DATE) | (DATE_TIME) | (DATE_TIME) | (DATE_TIME) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (NOT_IDENTIFIED : class java.util.Locale) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (UUID) | (NOT_IDENTIFIED) | (NOT_IDENTIFIED) |%n" - + "| | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 | Index : 19 | Index : 20 | Index : 21 | Index : 22 | Index : 23 | Index : 24 | Index : 25 | Index : 26 | Index : 27 | Index : 28 | Index : 29 | Index : 30 | Index : 31 | Index : 32 | Index : 33 | Index : 34 | Index : 35 | Index : 36 | Index : 37 | Index : 38 | Index : 39 | Index : 40 | Index : 41 | Index : 42 | Index : 43 | Index : 44 | Index : 45 | Index : 46 | Index : 47 | Index : 48 | Index : 49 | Index : 50 | Index : 51 | Index : 52 | Index : 53 | Index : 54 | Index : 55 | Index : 56 | Index : 57 | Index : 58 | Index : 59 | Index : 60 |%n" - + "|-----------|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" - + "| Index : 0 | | 1 | 20 | 3 | 4 | 5 | 6 | true | false | true | 7 | 8 | 9 | 10 | 11 | 12 | 13.13 | 14.14 | 15.15 | 16.16 | 17.17 | 18.18 | 19.19 | 20.2 | 21.21 | 09:01:00.000000000 | 2007-12-23 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | ... | ... | ... | ... | ... | fr | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | ... | ... | ... | ... | ... | ... | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 30b443ae-c0c9-4790-9bec-ce1380808435 | null | null |%n" - + "|-----------|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n")); + + "|-----------|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" + + "| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |%n" + + "| | PRIMARY | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 | VAR20 | VAR21 | VAR22 | VAR23 | VAR24 | VAR25 | VAR26 | VAR27 | VAR28 | VAR29 | VAR30 | VAR31 | VAR32 | VAR33 | VAR34 | VAR35 | VAR36 | VAR37 | VAR38 | VAR39 | VAR40 | VAR41 | VAR42 | VAR43 | VAR44 | VAR45 | VAR46 | VAR47 | VAR48 | VAR49 | VAR50 | VAR51 | VAR52 | VAR53 | VAR54 | VAR55 | VAR56 | VAR57 | VAR58 | VAR59 | VAR60 | VAR61 |%n" + + "| | KEY | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (BOOLEAN) | (BOOLEAN) | (BOOLEAN) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TIME) | (DATE) | (DATE_TIME) | (DATE_TIME) | (DATE_TIME) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (NOT_IDENTIFIED : class java.util.Locale) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (UUID) | (NOT_IDENTIFIED) | (NOT_IDENTIFIED) |%n" + + "| | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 | Index : 19 | Index : 20 | Index : 21 | Index : 22 | Index : 23 | Index : 24 | Index : 25 | Index : 26 | Index : 27 | Index : 28 | Index : 29 | Index : 30 | Index : 31 | Index : 32 | Index : 33 | Index : 34 | Index : 35 | Index : 36 | Index : 37 | Index : 38 | Index : 39 | Index : 40 | Index : 41 | Index : 42 | Index : 43 | Index : 44 | Index : 45 | Index : 46 | Index : 47 | Index : 48 | Index : 49 | Index : 50 | Index : 51 | Index : 52 | Index : 53 | Index : 54 | Index : 55 | Index : 56 | Index : 57 | Index : 58 | Index : 59 | Index : 60 |%n" + + "|-----------|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" + + "| Index : 0 | | 1 | 20 | 3 | 4 | 5 | 6 | true | false | true | 7 | 8 | 9 | 10 | 11 | 12 | 13.13 | 14.14 | 15.15 | 16.16 | 17.17 | 18.18 | 19.19 | 20.2 | 21.21 | 09:01:00.000000000 | 2007-12-23 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | ... | ... | ... | ... | ... | fr | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | ... | ... | ... | ... | ... | ... | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 30b443ae-c0c9-4790-9bec-ce1380808435 | null | null |%n" + + "|-----------|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n")); Assertions.assertThat(byteArrayOutputStream1.toString()).isEqualTo(String.format("[Column at index 0 (column name : VAR1) of TEST table]%n" - + "|-----------|----------|%n" - + "| | VAR1 |%n" - + "| | (NUMBER) |%n" - + "|-----------|----------|%n" - + "| Index : 0 | 1 |%n" - + "|-----------|----------|%n")); + + "|-----------|----------|%n" + + "| | VAR1 |%n" + + "| | (NUMBER) |%n" + + "|-----------|----------|%n" + + "| Index : 0 | 1 |%n" + + "|-----------|----------|%n")); Assertions.assertThat(byteArrayOutputStream2.toString()).isEqualTo(String.format("[Value at index 0 of Column at index 0 (column name : VAR1) of TEST table]%n" - + "|----------|%n" - + "| VAR1 |%n" - + "| (NUMBER) |%n" - + "|----------|%n" - + "| 1 |%n" - + "|----------|%n")); + + "|----------|%n" + + "| VAR1 |%n" + + "| (NUMBER) |%n" + + "|----------|%n" + + "| 1 |%n" + + "|----------|%n")); Assertions.assertThat(byteArrayOutputStream3.toString()).isEqualTo(String.format("[Row at index 0 of TEST table]%n" - + "|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" - + "| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |%n" - + "| PRIMARY | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 | VAR20 | VAR21 | VAR22 | VAR23 | VAR24 | VAR25 | VAR26 | VAR27 | VAR28 | VAR29 | VAR30 | VAR31 | VAR32 | VAR33 | VAR34 | VAR35 | VAR36 | VAR37 | VAR38 | VAR39 | VAR40 | VAR41 | VAR42 | VAR43 | VAR44 | VAR45 | VAR46 | VAR47 | VAR48 | VAR49 | VAR50 | VAR51 | VAR52 | VAR53 | VAR54 | VAR55 | VAR56 | VAR57 | VAR58 | VAR59 | VAR60 | VAR61 |%n" - + "| KEY | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (BOOLEAN) | (BOOLEAN) | (BOOLEAN) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TIME) | (DATE) | (DATE_TIME) | (DATE_TIME) | (DATE_TIME) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (NOT_IDENTIFIED : class java.util.Locale) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (UUID) | (NOT_IDENTIFIED) | (NOT_IDENTIFIED) |%n" - + "| | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 | Index : 19 | Index : 20 | Index : 21 | Index : 22 | Index : 23 | Index : 24 | Index : 25 | Index : 26 | Index : 27 | Index : 28 | Index : 29 | Index : 30 | Index : 31 | Index : 32 | Index : 33 | Index : 34 | Index : 35 | Index : 36 | Index : 37 | Index : 38 | Index : 39 | Index : 40 | Index : 41 | Index : 42 | Index : 43 | Index : 44 | Index : 45 | Index : 46 | Index : 47 | Index : 48 | Index : 49 | Index : 50 | Index : 51 | Index : 52 | Index : 53 | Index : 54 | Index : 55 | Index : 56 | Index : 57 | Index : 58 | Index : 59 | Index : 60 |%n" - + "|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" - + "| | 1 | 20 | 3 | 4 | 5 | 6 | true | false | true | 7 | 8 | 9 | 10 | 11 | 12 | 13.13 | 14.14 | 15.15 | 16.16 | 17.17 | 18.18 | 19.19 | 20.2 | 21.21 | 09:01:00.000000000 | 2007-12-23 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | ... | ... | ... | ... | ... | fr | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | ... | ... | ... | ... | ... | ... | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 30b443ae-c0c9-4790-9bec-ce1380808435 | null | null |%n" - + "|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n")); + + "|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" + + "| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |%n" + + "| PRIMARY | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 | VAR20 | VAR21 | VAR22 | VAR23 | VAR24 | VAR25 | VAR26 | VAR27 | VAR28 | VAR29 | VAR30 | VAR31 | VAR32 | VAR33 | VAR34 | VAR35 | VAR36 | VAR37 | VAR38 | VAR39 | VAR40 | VAR41 | VAR42 | VAR43 | VAR44 | VAR45 | VAR46 | VAR47 | VAR48 | VAR49 | VAR50 | VAR51 | VAR52 | VAR53 | VAR54 | VAR55 | VAR56 | VAR57 | VAR58 | VAR59 | VAR60 | VAR61 |%n" + + "| KEY | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (BOOLEAN) | (BOOLEAN) | (BOOLEAN) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TIME) | (DATE) | (DATE_TIME) | (DATE_TIME) | (DATE_TIME) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (NOT_IDENTIFIED : class java.util.Locale) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (UUID) | (NOT_IDENTIFIED) | (NOT_IDENTIFIED) |%n" + + "| | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 | Index : 19 | Index : 20 | Index : 21 | Index : 22 | Index : 23 | Index : 24 | Index : 25 | Index : 26 | Index : 27 | Index : 28 | Index : 29 | Index : 30 | Index : 31 | Index : 32 | Index : 33 | Index : 34 | Index : 35 | Index : 36 | Index : 37 | Index : 38 | Index : 39 | Index : 40 | Index : 41 | Index : 42 | Index : 43 | Index : 44 | Index : 45 | Index : 46 | Index : 47 | Index : 48 | Index : 49 | Index : 50 | Index : 51 | Index : 52 | Index : 53 | Index : 54 | Index : 55 | Index : 56 | Index : 57 | Index : 58 | Index : 59 | Index : 60 |%n" + + "|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" + + "| | 1 | 20 | 3 | 4 | 5 | 6 | true | false | true | 7 | 8 | 9 | 10 | 11 | 12 | 13.13 | 14.14 | 15.15 | 16.16 | 17.17 | 18.18 | 19.19 | 20.2 | 21.21 | 09:01:00.000000000 | 2007-12-23 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | ... | ... | ... | ... | ... | fr | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | ... | ... | ... | ... | ... | ... | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 30b443ae-c0c9-4790-9bec-ce1380808435 | null | null |%n" + + "|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n")); Assertions.assertThat(byteArrayOutputStream4.toString()).isEqualTo(String.format("[Value at index 0 (column name : VAR1) of Row at index 0 of TEST table]%n" - + "|----------|%n" - + "| VAR1 |%n" - + "| (NUMBER) |%n" - + "|----------|%n" - + "| 1 |%n" - + "|----------|%n")); + + "|----------|%n" + + "| VAR1 |%n" + + "| (NUMBER) |%n" + + "|----------|%n" + + "| 1 |%n" + + "|----------|%n")); Assertions.assertThat(byteArrayOutputStream5.toString()).isEqualTo(String.format("[Changes on TEST table of a data source]%n" - + "|-----------|----------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" - + "| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |%n" - + "| | TYPE | TABLE | PRIMARY | | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 | VAR20 | VAR21 | VAR22 | VAR23 | VAR24 | VAR25 | VAR26 | VAR27 | VAR28 | VAR29 | VAR30 | VAR31 | VAR32 | VAR33 | VAR34 | VAR35 | VAR36 | VAR37 | VAR38 | VAR39 | VAR40 | VAR41 | VAR42 | VAR43 | VAR44 | VAR45 | VAR46 | VAR47 | VAR48 | VAR49 | VAR50 | VAR51 | VAR52 | VAR53 | VAR54 | VAR55 | VAR56 | VAR57 | VAR58 | VAR59 | VAR60 | VAR61 |%n" - + "| | | | KEY | | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (BOOLEAN) | (BOOLEAN) | (BOOLEAN) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TIME) | (DATE) | (DATE_TIME) | (DATE_TIME) | (DATE_TIME) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (NOT_IDENTIFIED : class java.util.Locale) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (UUID) | (NOT_IDENTIFIED) | (NOT_IDENTIFIED) |%n" - + "| | | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 | Index : 19 | Index : 20 | Index : 21 | Index : 22 | Index : 23 | Index : 24 | Index : 25 | Index : 26 | Index : 27 | Index : 28 | Index : 29 | Index : 30 | Index : 31 | Index : 32 | Index : 33 | Index : 34 | Index : 35 | Index : 36 | Index : 37 | Index : 38 | Index : 39 | Index : 40 | Index : 41 | Index : 42 | Index : 43 | Index : 44 | Index : 45 | Index : 46 | Index : 47 | Index : 48 | Index : 49 | Index : 50 | Index : 51 | Index : 52 | Index : 53 | Index : 54 | Index : 55 | Index : 56 | Index : 57 | Index : 58 | Index : 59 | Index : 60 |%n" - + "|-----------|----------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" - + "| | | | | At start point | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |%n" - + "| Index : 0 | CREATION | test | |----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" - + "| | | | | At end point | 1 | 20 | 3 | 4 | 5 | 6 | true | false | true | 7 | 8 | 9 | 10 | 11 | 12 | 13.13 | 14.14 | 15.15 | 16.16 | 17.17 | 18.18 | 19.19 | 20.2 | 21.21 | 09:01:00.000000000 | 2007-12-23 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | ... | ... | ... | ... | ... | fr | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | ... | ... | ... | ... | ... | ... | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 30b443ae-c0c9-4790-9bec-ce1380808435 | null | null |%n" - + "|-----------|----------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" - + "|-----------|----------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" - + "| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |%n" - + "| | TYPE | TABLE | PRIMARY | | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 | VAR20 | VAR21 | VAR22 | VAR23 | VAR24 | VAR25 | VAR26 | VAR27 | VAR28 | VAR29 | VAR30 | VAR31 | VAR32 | VAR33 | VAR34 | VAR35 | VAR36 | VAR37 | VAR38 | VAR39 | VAR40 | VAR41 | VAR42 | VAR43 | VAR44 | VAR45 | VAR46 | VAR47 | VAR48 | VAR49 | VAR50 | VAR51 | VAR52 | VAR53 | VAR54 | VAR55 | VAR56 | VAR57 | VAR58 | VAR59 | VAR60 | VAR61 |%n" - + "| | | | KEY | | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (BOOLEAN) | (BOOLEAN) | (BOOLEAN) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TIME) | (DATE) | (DATE_TIME) | (DATE_TIME) | (DATE_TIME) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (NOT_IDENTIFIED : class java.util.Locale) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (UUID) | (NOT_IDENTIFIED) | (NOT_IDENTIFIED) |%n" - + "| | | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 | Index : 19 | Index : 20 | Index : 21 | Index : 22 | Index : 23 | Index : 24 | Index : 25 | Index : 26 | Index : 27 | Index : 28 | Index : 29 | Index : 30 | Index : 31 | Index : 32 | Index : 33 | Index : 34 | Index : 35 | Index : 36 | Index : 37 | Index : 38 | Index : 39 | Index : 40 | Index : 41 | Index : 42 | Index : 43 | Index : 44 | Index : 45 | Index : 46 | Index : 47 | Index : 48 | Index : 49 | Index : 50 | Index : 51 | Index : 52 | Index : 53 | Index : 54 | Index : 55 | Index : 56 | Index : 57 | Index : 58 | Index : 59 | Index : 60 |%n" - + "|-----------|----------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" - + "| | | | | At start point | 1 | 2 | 3 | 4 | 5 | 6 | true | false | true | 7 | 8 | 9 | 10 | 11 | 12 | 13.13 | 14.14 | 15.15 | 16.16 | 17.17 | 18.18 | 19.19 | 20.2 | 21.21 | 09:01:00.000000000 | 2007-12-23 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | ... | ... | ... | ... | ... | fr | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | ... | ... | ... | ... | ... | ... | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 30b443ae-c0c9-4790-9bec-ce1380808435 | null | null |%n" - + "| Index : 1 | DELETION | test | |----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" - + "| | | | | At end point | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |%n" - + "|-----------|----------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n")); + + "|-----------|----------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" + + "| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |%n" + + "| | TYPE | TABLE | PRIMARY | | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 | VAR20 | VAR21 | VAR22 | VAR23 | VAR24 | VAR25 | VAR26 | VAR27 | VAR28 | VAR29 | VAR30 | VAR31 | VAR32 | VAR33 | VAR34 | VAR35 | VAR36 | VAR37 | VAR38 | VAR39 | VAR40 | VAR41 | VAR42 | VAR43 | VAR44 | VAR45 | VAR46 | VAR47 | VAR48 | VAR49 | VAR50 | VAR51 | VAR52 | VAR53 | VAR54 | VAR55 | VAR56 | VAR57 | VAR58 | VAR59 | VAR60 | VAR61 |%n" + + "| | | | KEY | | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (BOOLEAN) | (BOOLEAN) | (BOOLEAN) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TIME) | (DATE) | (DATE_TIME) | (DATE_TIME) | (DATE_TIME) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (NOT_IDENTIFIED : class java.util.Locale) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (UUID) | (NOT_IDENTIFIED) | (NOT_IDENTIFIED) |%n" + + "| | | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 | Index : 19 | Index : 20 | Index : 21 | Index : 22 | Index : 23 | Index : 24 | Index : 25 | Index : 26 | Index : 27 | Index : 28 | Index : 29 | Index : 30 | Index : 31 | Index : 32 | Index : 33 | Index : 34 | Index : 35 | Index : 36 | Index : 37 | Index : 38 | Index : 39 | Index : 40 | Index : 41 | Index : 42 | Index : 43 | Index : 44 | Index : 45 | Index : 46 | Index : 47 | Index : 48 | Index : 49 | Index : 50 | Index : 51 | Index : 52 | Index : 53 | Index : 54 | Index : 55 | Index : 56 | Index : 57 | Index : 58 | Index : 59 | Index : 60 |%n" + + "|-----------|----------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" + + "| | | | | At start point | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |%n" + + "| Index : 0 | CREATION | test | |----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" + + "| | | | | At end point | 1 | 20 | 3 | 4 | 5 | 6 | true | false | true | 7 | 8 | 9 | 10 | 11 | 12 | 13.13 | 14.14 | 15.15 | 16.16 | 17.17 | 18.18 | 19.19 | 20.2 | 21.21 | 09:01:00.000000000 | 2007-12-23 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | ... | ... | ... | ... | ... | fr | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | ... | ... | ... | ... | ... | ... | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 30b443ae-c0c9-4790-9bec-ce1380808435 | null | null |%n" + + "|-----------|----------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" + + "|-----------|----------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" + + "| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |%n" + + "| | TYPE | TABLE | PRIMARY | | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 | VAR20 | VAR21 | VAR22 | VAR23 | VAR24 | VAR25 | VAR26 | VAR27 | VAR28 | VAR29 | VAR30 | VAR31 | VAR32 | VAR33 | VAR34 | VAR35 | VAR36 | VAR37 | VAR38 | VAR39 | VAR40 | VAR41 | VAR42 | VAR43 | VAR44 | VAR45 | VAR46 | VAR47 | VAR48 | VAR49 | VAR50 | VAR51 | VAR52 | VAR53 | VAR54 | VAR55 | VAR56 | VAR57 | VAR58 | VAR59 | VAR60 | VAR61 |%n" + + "| | | | KEY | | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (BOOLEAN) | (BOOLEAN) | (BOOLEAN) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TIME) | (DATE) | (DATE_TIME) | (DATE_TIME) | (DATE_TIME) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (NOT_IDENTIFIED : class java.util.Locale) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (UUID) | (NOT_IDENTIFIED) | (NOT_IDENTIFIED) |%n" + + "| | | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 | Index : 19 | Index : 20 | Index : 21 | Index : 22 | Index : 23 | Index : 24 | Index : 25 | Index : 26 | Index : 27 | Index : 28 | Index : 29 | Index : 30 | Index : 31 | Index : 32 | Index : 33 | Index : 34 | Index : 35 | Index : 36 | Index : 37 | Index : 38 | Index : 39 | Index : 40 | Index : 41 | Index : 42 | Index : 43 | Index : 44 | Index : 45 | Index : 46 | Index : 47 | Index : 48 | Index : 49 | Index : 50 | Index : 51 | Index : 52 | Index : 53 | Index : 54 | Index : 55 | Index : 56 | Index : 57 | Index : 58 | Index : 59 | Index : 60 |%n" + + "|-----------|----------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" + + "| | | | | At start point | 1 | 2 | 3 | 4 | 5 | 6 | true | false | true | 7 | 8 | 9 | 10 | 11 | 12 | 13.13 | 14.14 | 15.15 | 16.16 | 17.17 | 18.18 | 19.19 | 20.2 | 21.21 | 09:01:00.000000000 | 2007-12-23 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | ... | ... | ... | ... | ... | fr | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | ... | ... | ... | ... | ... | ... | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 30b443ae-c0c9-4790-9bec-ce1380808435 | null | null |%n" + + "| Index : 1 | DELETION | test | |----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" + + "| | | | | At end point | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |%n" + + "|-----------|----------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n")); Assertions.assertThat(byteArrayOutputStream6.toString()).isEqualTo(String.format("[Change at index 0 of Changes on TEST table of a data source]%n" - + "|----------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" - + "| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |%n" - + "| TYPE | TABLE | PRIMARY | | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 | VAR20 | VAR21 | VAR22 | VAR23 | VAR24 | VAR25 | VAR26 | VAR27 | VAR28 | VAR29 | VAR30 | VAR31 | VAR32 | VAR33 | VAR34 | VAR35 | VAR36 | VAR37 | VAR38 | VAR39 | VAR40 | VAR41 | VAR42 | VAR43 | VAR44 | VAR45 | VAR46 | VAR47 | VAR48 | VAR49 | VAR50 | VAR51 | VAR52 | VAR53 | VAR54 | VAR55 | VAR56 | VAR57 | VAR58 | VAR59 | VAR60 | VAR61 |%n" - + "| | | KEY | | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (BOOLEAN) | (BOOLEAN) | (BOOLEAN) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TIME) | (DATE) | (DATE_TIME) | (DATE_TIME) | (DATE_TIME) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (NOT_IDENTIFIED : class java.util.Locale) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (UUID) | (NOT_IDENTIFIED) | (NOT_IDENTIFIED) |%n" - + "| | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 | Index : 19 | Index : 20 | Index : 21 | Index : 22 | Index : 23 | Index : 24 | Index : 25 | Index : 26 | Index : 27 | Index : 28 | Index : 29 | Index : 30 | Index : 31 | Index : 32 | Index : 33 | Index : 34 | Index : 35 | Index : 36 | Index : 37 | Index : 38 | Index : 39 | Index : 40 | Index : 41 | Index : 42 | Index : 43 | Index : 44 | Index : 45 | Index : 46 | Index : 47 | Index : 48 | Index : 49 | Index : 50 | Index : 51 | Index : 52 | Index : 53 | Index : 54 | Index : 55 | Index : 56 | Index : 57 | Index : 58 | Index : 59 | Index : 60 |%n" - + "|----------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" - + "| | | | At start point | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |%n" - + "| CREATION | test | |----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" - + "| | | | At end point | 1 | 20 | 3 | 4 | 5 | 6 | true | false | true | 7 | 8 | 9 | 10 | 11 | 12 | 13.13 | 14.14 | 15.15 | 16.16 | 17.17 | 18.18 | 19.19 | 20.2 | 21.21 | 09:01:00.000000000 | 2007-12-23 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | ... | ... | ... | ... | ... | fr | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | ... | ... | ... | ... | ... | ... | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 30b443ae-c0c9-4790-9bec-ce1380808435 | null | null |%n" - + "|----------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n")); + + "|----------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" + + "| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |%n" + + "| TYPE | TABLE | PRIMARY | | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 | VAR20 | VAR21 | VAR22 | VAR23 | VAR24 | VAR25 | VAR26 | VAR27 | VAR28 | VAR29 | VAR30 | VAR31 | VAR32 | VAR33 | VAR34 | VAR35 | VAR36 | VAR37 | VAR38 | VAR39 | VAR40 | VAR41 | VAR42 | VAR43 | VAR44 | VAR45 | VAR46 | VAR47 | VAR48 | VAR49 | VAR50 | VAR51 | VAR52 | VAR53 | VAR54 | VAR55 | VAR56 | VAR57 | VAR58 | VAR59 | VAR60 | VAR61 |%n" + + "| | | KEY | | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (BOOLEAN) | (BOOLEAN) | (BOOLEAN) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TIME) | (DATE) | (DATE_TIME) | (DATE_TIME) | (DATE_TIME) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (NOT_IDENTIFIED : class java.util.Locale) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (UUID) | (NOT_IDENTIFIED) | (NOT_IDENTIFIED) |%n" + + "| | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 | Index : 19 | Index : 20 | Index : 21 | Index : 22 | Index : 23 | Index : 24 | Index : 25 | Index : 26 | Index : 27 | Index : 28 | Index : 29 | Index : 30 | Index : 31 | Index : 32 | Index : 33 | Index : 34 | Index : 35 | Index : 36 | Index : 37 | Index : 38 | Index : 39 | Index : 40 | Index : 41 | Index : 42 | Index : 43 | Index : 44 | Index : 45 | Index : 46 | Index : 47 | Index : 48 | Index : 49 | Index : 50 | Index : 51 | Index : 52 | Index : 53 | Index : 54 | Index : 55 | Index : 56 | Index : 57 | Index : 58 | Index : 59 | Index : 60 |%n" + + "|----------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" + + "| | | | At start point | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |%n" + + "| CREATION | test | |----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" + + "| | | | At end point | 1 | 20 | 3 | 4 | 5 | 6 | true | false | true | 7 | 8 | 9 | 10 | 11 | 12 | 13.13 | 14.14 | 15.15 | 16.16 | 17.17 | 18.18 | 19.19 | 20.2 | 21.21 | 09:01:00.000000000 | 2007-12-23 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | ... | ... | ... | ... | ... | fr | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | ... | ... | ... | ... | ... | ... | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 30b443ae-c0c9-4790-9bec-ce1380808435 | null | null |%n" + + "|----------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n")); Assertions.assertThat(byteArrayOutputStream7.toString()).isEqualTo(String.format("[Row at end point of Change at index 0 of Changes on TEST table of a data source]%n" - + "|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" - + "| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |%n" - + "| PRIMARY | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 | VAR20 | VAR21 | VAR22 | VAR23 | VAR24 | VAR25 | VAR26 | VAR27 | VAR28 | VAR29 | VAR30 | VAR31 | VAR32 | VAR33 | VAR34 | VAR35 | VAR36 | VAR37 | VAR38 | VAR39 | VAR40 | VAR41 | VAR42 | VAR43 | VAR44 | VAR45 | VAR46 | VAR47 | VAR48 | VAR49 | VAR50 | VAR51 | VAR52 | VAR53 | VAR54 | VAR55 | VAR56 | VAR57 | VAR58 | VAR59 | VAR60 | VAR61 |%n" - + "| KEY | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (BOOLEAN) | (BOOLEAN) | (BOOLEAN) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TIME) | (DATE) | (DATE_TIME) | (DATE_TIME) | (DATE_TIME) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (NOT_IDENTIFIED : class java.util.Locale) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (UUID) | (NOT_IDENTIFIED) | (NOT_IDENTIFIED) |%n" - + "| | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 | Index : 19 | Index : 20 | Index : 21 | Index : 22 | Index : 23 | Index : 24 | Index : 25 | Index : 26 | Index : 27 | Index : 28 | Index : 29 | Index : 30 | Index : 31 | Index : 32 | Index : 33 | Index : 34 | Index : 35 | Index : 36 | Index : 37 | Index : 38 | Index : 39 | Index : 40 | Index : 41 | Index : 42 | Index : 43 | Index : 44 | Index : 45 | Index : 46 | Index : 47 | Index : 48 | Index : 49 | Index : 50 | Index : 51 | Index : 52 | Index : 53 | Index : 54 | Index : 55 | Index : 56 | Index : 57 | Index : 58 | Index : 59 | Index : 60 |%n" - + "|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" - + "| | 1 | 20 | 3 | 4 | 5 | 6 | true | false | true | 7 | 8 | 9 | 10 | 11 | 12 | 13.13 | 14.14 | 15.15 | 16.16 | 17.17 | 18.18 | 19.19 | 20.2 | 21.21 | 09:01:00.000000000 | 2007-12-23 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | ... | ... | ... | ... | ... | fr | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | ... | ... | ... | ... | ... | ... | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 30b443ae-c0c9-4790-9bec-ce1380808435 | null | null |%n" - + "|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n")); + + "|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" + + "| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |%n" + + "| PRIMARY | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 | VAR20 | VAR21 | VAR22 | VAR23 | VAR24 | VAR25 | VAR26 | VAR27 | VAR28 | VAR29 | VAR30 | VAR31 | VAR32 | VAR33 | VAR34 | VAR35 | VAR36 | VAR37 | VAR38 | VAR39 | VAR40 | VAR41 | VAR42 | VAR43 | VAR44 | VAR45 | VAR46 | VAR47 | VAR48 | VAR49 | VAR50 | VAR51 | VAR52 | VAR53 | VAR54 | VAR55 | VAR56 | VAR57 | VAR58 | VAR59 | VAR60 | VAR61 |%n" + + "| KEY | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (BOOLEAN) | (BOOLEAN) | (BOOLEAN) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TIME) | (DATE) | (DATE_TIME) | (DATE_TIME) | (DATE_TIME) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (NOT_IDENTIFIED : class java.util.Locale) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (UUID) | (NOT_IDENTIFIED) | (NOT_IDENTIFIED) |%n" + + "| | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 | Index : 19 | Index : 20 | Index : 21 | Index : 22 | Index : 23 | Index : 24 | Index : 25 | Index : 26 | Index : 27 | Index : 28 | Index : 29 | Index : 30 | Index : 31 | Index : 32 | Index : 33 | Index : 34 | Index : 35 | Index : 36 | Index : 37 | Index : 38 | Index : 39 | Index : 40 | Index : 41 | Index : 42 | Index : 43 | Index : 44 | Index : 45 | Index : 46 | Index : 47 | Index : 48 | Index : 49 | Index : 50 | Index : 51 | Index : 52 | Index : 53 | Index : 54 | Index : 55 | Index : 56 | Index : 57 | Index : 58 | Index : 59 | Index : 60 |%n" + + "|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" + + "| | 1 | 20 | 3 | 4 | 5 | 6 | true | false | true | 7 | 8 | 9 | 10 | 11 | 12 | 13.13 | 14.14 | 15.15 | 16.16 | 17.17 | 18.18 | 19.19 | 20.2 | 21.21 | 09:01:00.000000000 | 2007-12-23 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | ... | ... | ... | ... | ... | fr | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | ... | ... | ... | ... | ... | ... | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 30b443ae-c0c9-4790-9bec-ce1380808435 | null | null |%n" + + "|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n")); Assertions.assertThat(byteArrayOutputStream8.toString()).isEqualTo(String.format("[Value at index 0 (column name : VAR1) of Row at end point of Change at index 0 of Changes on TEST table of a data source]%n" - + "|----------|%n" - + "| VAR1 |%n" - + "| (NUMBER) |%n" - + "|----------|%n" - + "| 1 |%n" - + "|----------|%n")); + + "|----------|%n" + + "| VAR1 |%n" + + "| (NUMBER) |%n" + + "|----------|%n" + + "| 1 |%n" + + "|----------|%n")); Assertions.assertThat(byteArrayOutputStream9.toString()).isEqualTo(String.format("[Column at index 0 (column name : VAR1) of Change at index 0 of Changes on TEST table of a data source]%n" - + "|----------------|----------|%n" - + "| | VAR1 |%n" - + "| | (NUMBER) |%n" - + "|----------------|----------|%n" - + "| At start point | null |%n" - + "|----------------|----------|%n" - + "| At end point | 1 |%n" - + "|----------------|----------|%n")); + + "|----------------|----------|%n" + + "| | VAR1 |%n" + + "| | (NUMBER) |%n" + + "|----------------|----------|%n" + + "| At start point | null |%n" + + "|----------------|----------|%n" + + "| At end point | 1 |%n" + + "|----------------|----------|%n")); Assertions.assertThat(byteArrayOutputStream10.toString()).isEqualTo(String.format("[Value at end point of Column at index 0 (column name : VAR1) of Change at index 0 of Changes on TEST table of a data source]%n" - + "|----------|%n" - + "| VAR1 |%n" - + "| (NUMBER) |%n" - + "|----------|%n" - + "| 1 |%n" - + "|----------|%n")); + + "|----------|%n" + + "| VAR1 |%n" + + "| (NUMBER) |%n" + + "|----------|%n" + + "| 1 |%n" + + "|----------|%n")); Assertions.assertThat(byteArrayOutputStream11.toString()).isEqualTo(String.format("[Changes on TEST table of a data source]%n" - + "|-----------|----------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" - + "| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |%n" - + "| | TYPE | TABLE | PRIMARY | | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 | VAR20 | VAR21 | VAR22 | VAR23 | VAR24 | VAR25 | VAR26 | VAR27 | VAR28 | VAR29 | VAR30 | VAR31 | VAR32 | VAR33 | VAR34 | VAR35 | VAR36 | VAR37 | VAR38 | VAR39 | VAR40 | VAR41 | VAR42 | VAR43 | VAR44 | VAR45 | VAR46 | VAR47 | VAR48 | VAR49 | VAR50 | VAR51 | VAR52 | VAR53 | VAR54 | VAR55 | VAR56 | VAR57 | VAR58 | VAR59 | VAR60 | VAR61 |%n" - + "| | | | KEY | | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (BOOLEAN) | (BOOLEAN) | (BOOLEAN) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TIME) | (DATE) | (DATE_TIME) | (DATE_TIME) | (DATE_TIME) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (NOT_IDENTIFIED : class java.util.Locale) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (UUID) | (NOT_IDENTIFIED) | (NOT_IDENTIFIED) |%n" - + "| | | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 | Index : 19 | Index : 20 | Index : 21 | Index : 22 | Index : 23 | Index : 24 | Index : 25 | Index : 26 | Index : 27 | Index : 28 | Index : 29 | Index : 30 | Index : 31 | Index : 32 | Index : 33 | Index : 34 | Index : 35 | Index : 36 | Index : 37 | Index : 38 | Index : 39 | Index : 40 | Index : 41 | Index : 42 | Index : 43 | Index : 44 | Index : 45 | Index : 46 | Index : 47 | Index : 48 | Index : 49 | Index : 50 | Index : 51 | Index : 52 | Index : 53 | Index : 54 | Index : 55 | Index : 56 | Index : 57 | Index : 58 | Index : 59 | Index : 60 |%n" - + "|-----------|----------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" - + "| | | | | At start point | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |%n" - + "| Index : 0 | CREATION | test | |----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" - + "| | | | | At end point | 1 | 20 | 3 | 4 | 5 | 6 | true | false | true | 7 | 8 | 9 | 10 | 11 | 12 | 13.13 | 14.14 | 15.15 | 16.16 | 17.17 | 18.18 | 19.19 | 20.2 | 21.21 | 09:01:00.000000000 | 2007-12-23 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | ... | ... | ... | ... | ... | fr | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | ... | ... | ... | ... | ... | ... | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 30b443ae-c0c9-4790-9bec-ce1380808435 | null | null |%n" - + "|-----------|----------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" - + "|-----------|----------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" - + "| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |%n" - + "| | TYPE | TABLE | PRIMARY | | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 | VAR20 | VAR21 | VAR22 | VAR23 | VAR24 | VAR25 | VAR26 | VAR27 | VAR28 | VAR29 | VAR30 | VAR31 | VAR32 | VAR33 | VAR34 | VAR35 | VAR36 | VAR37 | VAR38 | VAR39 | VAR40 | VAR41 | VAR42 | VAR43 | VAR44 | VAR45 | VAR46 | VAR47 | VAR48 | VAR49 | VAR50 | VAR51 | VAR52 | VAR53 | VAR54 | VAR55 | VAR56 | VAR57 | VAR58 | VAR59 | VAR60 | VAR61 |%n" - + "| | | | KEY | | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (BOOLEAN) | (BOOLEAN) | (BOOLEAN) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TIME) | (DATE) | (DATE_TIME) | (DATE_TIME) | (DATE_TIME) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (NOT_IDENTIFIED : class java.util.Locale) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (UUID) | (NOT_IDENTIFIED) | (NOT_IDENTIFIED) |%n" - + "| | | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 | Index : 19 | Index : 20 | Index : 21 | Index : 22 | Index : 23 | Index : 24 | Index : 25 | Index : 26 | Index : 27 | Index : 28 | Index : 29 | Index : 30 | Index : 31 | Index : 32 | Index : 33 | Index : 34 | Index : 35 | Index : 36 | Index : 37 | Index : 38 | Index : 39 | Index : 40 | Index : 41 | Index : 42 | Index : 43 | Index : 44 | Index : 45 | Index : 46 | Index : 47 | Index : 48 | Index : 49 | Index : 50 | Index : 51 | Index : 52 | Index : 53 | Index : 54 | Index : 55 | Index : 56 | Index : 57 | Index : 58 | Index : 59 | Index : 60 |%n" - + "|-----------|----------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" - + "| | | | | At start point | 1 | 2 | 3 | 4 | 5 | 6 | true | false | true | 7 | 8 | 9 | 10 | 11 | 12 | 13.13 | 14.14 | 15.15 | 16.16 | 17.17 | 18.18 | 19.19 | 20.2 | 21.21 | 09:01:00.000000000 | 2007-12-23 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | ... | ... | ... | ... | ... | fr | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | ... | ... | ... | ... | ... | ... | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 30b443ae-c0c9-4790-9bec-ce1380808435 | null | null |%n" - + "| Index : 1 | DELETION | test | |----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" - + "| | | | | At end point | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |%n" - + "|-----------|----------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n")); + + "|-----------|----------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" + + "| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |%n" + + "| | TYPE | TABLE | PRIMARY | | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 | VAR20 | VAR21 | VAR22 | VAR23 | VAR24 | VAR25 | VAR26 | VAR27 | VAR28 | VAR29 | VAR30 | VAR31 | VAR32 | VAR33 | VAR34 | VAR35 | VAR36 | VAR37 | VAR38 | VAR39 | VAR40 | VAR41 | VAR42 | VAR43 | VAR44 | VAR45 | VAR46 | VAR47 | VAR48 | VAR49 | VAR50 | VAR51 | VAR52 | VAR53 | VAR54 | VAR55 | VAR56 | VAR57 | VAR58 | VAR59 | VAR60 | VAR61 |%n" + + "| | | | KEY | | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (BOOLEAN) | (BOOLEAN) | (BOOLEAN) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TIME) | (DATE) | (DATE_TIME) | (DATE_TIME) | (DATE_TIME) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (NOT_IDENTIFIED : class java.util.Locale) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (UUID) | (NOT_IDENTIFIED) | (NOT_IDENTIFIED) |%n" + + "| | | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 | Index : 19 | Index : 20 | Index : 21 | Index : 22 | Index : 23 | Index : 24 | Index : 25 | Index : 26 | Index : 27 | Index : 28 | Index : 29 | Index : 30 | Index : 31 | Index : 32 | Index : 33 | Index : 34 | Index : 35 | Index : 36 | Index : 37 | Index : 38 | Index : 39 | Index : 40 | Index : 41 | Index : 42 | Index : 43 | Index : 44 | Index : 45 | Index : 46 | Index : 47 | Index : 48 | Index : 49 | Index : 50 | Index : 51 | Index : 52 | Index : 53 | Index : 54 | Index : 55 | Index : 56 | Index : 57 | Index : 58 | Index : 59 | Index : 60 |%n" + + "|-----------|----------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" + + "| | | | | At start point | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |%n" + + "| Index : 0 | CREATION | test | |----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" + + "| | | | | At end point | 1 | 20 | 3 | 4 | 5 | 6 | true | false | true | 7 | 8 | 9 | 10 | 11 | 12 | 13.13 | 14.14 | 15.15 | 16.16 | 17.17 | 18.18 | 19.19 | 20.2 | 21.21 | 09:01:00.000000000 | 2007-12-23 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | ... | ... | ... | ... | ... | fr | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | ... | ... | ... | ... | ... | ... | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 30b443ae-c0c9-4790-9bec-ce1380808435 | null | null |%n" + + "|-----------|----------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" + + "|-----------|----------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" + + "| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |%n" + + "| | TYPE | TABLE | PRIMARY | | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 | VAR20 | VAR21 | VAR22 | VAR23 | VAR24 | VAR25 | VAR26 | VAR27 | VAR28 | VAR29 | VAR30 | VAR31 | VAR32 | VAR33 | VAR34 | VAR35 | VAR36 | VAR37 | VAR38 | VAR39 | VAR40 | VAR41 | VAR42 | VAR43 | VAR44 | VAR45 | VAR46 | VAR47 | VAR48 | VAR49 | VAR50 | VAR51 | VAR52 | VAR53 | VAR54 | VAR55 | VAR56 | VAR57 | VAR58 | VAR59 | VAR60 | VAR61 |%n" + + "| | | | KEY | | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (BOOLEAN) | (BOOLEAN) | (BOOLEAN) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TIME) | (DATE) | (DATE_TIME) | (DATE_TIME) | (DATE_TIME) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (NOT_IDENTIFIED : class java.util.Locale) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (UUID) | (NOT_IDENTIFIED) | (NOT_IDENTIFIED) |%n" + + "| | | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 | Index : 19 | Index : 20 | Index : 21 | Index : 22 | Index : 23 | Index : 24 | Index : 25 | Index : 26 | Index : 27 | Index : 28 | Index : 29 | Index : 30 | Index : 31 | Index : 32 | Index : 33 | Index : 34 | Index : 35 | Index : 36 | Index : 37 | Index : 38 | Index : 39 | Index : 40 | Index : 41 | Index : 42 | Index : 43 | Index : 44 | Index : 45 | Index : 46 | Index : 47 | Index : 48 | Index : 49 | Index : 50 | Index : 51 | Index : 52 | Index : 53 | Index : 54 | Index : 55 | Index : 56 | Index : 57 | Index : 58 | Index : 59 | Index : 60 |%n" + + "|-----------|----------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" + + "| | | | | At start point | 1 | 2 | 3 | 4 | 5 | 6 | true | false | true | 7 | 8 | 9 | 10 | 11 | 12 | 13.13 | 14.14 | 15.15 | 16.16 | 17.17 | 18.18 | 19.19 | 20.2 | 21.21 | 09:01:00.000000000 | 2007-12-23 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | ... | ... | ... | ... | ... | fr | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | ... | ... | ... | ... | ... | ... | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 30b443ae-c0c9-4790-9bec-ce1380808435 | null | null |%n" + + "| Index : 1 | DELETION | test | |----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" + + "| | | | | At end point | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |%n" + + "|-----------|----------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n")); Assertions.assertThat(byteArrayOutputStream12.toString()).isEqualTo(String.format("[Change at index 0 of Changes on TEST table of a data source]%n" - + "|----------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" - + "| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |%n" - + "| TYPE | TABLE | PRIMARY | | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 | VAR20 | VAR21 | VAR22 | VAR23 | VAR24 | VAR25 | VAR26 | VAR27 | VAR28 | VAR29 | VAR30 | VAR31 | VAR32 | VAR33 | VAR34 | VAR35 | VAR36 | VAR37 | VAR38 | VAR39 | VAR40 | VAR41 | VAR42 | VAR43 | VAR44 | VAR45 | VAR46 | VAR47 | VAR48 | VAR49 | VAR50 | VAR51 | VAR52 | VAR53 | VAR54 | VAR55 | VAR56 | VAR57 | VAR58 | VAR59 | VAR60 | VAR61 |%n" - + "| | | KEY | | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (BOOLEAN) | (BOOLEAN) | (BOOLEAN) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TIME) | (DATE) | (DATE_TIME) | (DATE_TIME) | (DATE_TIME) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (NOT_IDENTIFIED : class java.util.Locale) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (UUID) | (NOT_IDENTIFIED) | (NOT_IDENTIFIED) |%n" - + "| | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 | Index : 19 | Index : 20 | Index : 21 | Index : 22 | Index : 23 | Index : 24 | Index : 25 | Index : 26 | Index : 27 | Index : 28 | Index : 29 | Index : 30 | Index : 31 | Index : 32 | Index : 33 | Index : 34 | Index : 35 | Index : 36 | Index : 37 | Index : 38 | Index : 39 | Index : 40 | Index : 41 | Index : 42 | Index : 43 | Index : 44 | Index : 45 | Index : 46 | Index : 47 | Index : 48 | Index : 49 | Index : 50 | Index : 51 | Index : 52 | Index : 53 | Index : 54 | Index : 55 | Index : 56 | Index : 57 | Index : 58 | Index : 59 | Index : 60 |%n" - + "|----------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" - + "| | | | At start point | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |%n" - + "| CREATION | test | |----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" - + "| | | | At end point | 1 | 20 | 3 | 4 | 5 | 6 | true | false | true | 7 | 8 | 9 | 10 | 11 | 12 | 13.13 | 14.14 | 15.15 | 16.16 | 17.17 | 18.18 | 19.19 | 20.2 | 21.21 | 09:01:00.000000000 | 2007-12-23 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | ... | ... | ... | ... | ... | fr | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | ... | ... | ... | ... | ... | ... | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 30b443ae-c0c9-4790-9bec-ce1380808435 | null | null |%n" - + "|----------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n")); + + "|----------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" + + "| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |%n" + + "| TYPE | TABLE | PRIMARY | | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 | VAR20 | VAR21 | VAR22 | VAR23 | VAR24 | VAR25 | VAR26 | VAR27 | VAR28 | VAR29 | VAR30 | VAR31 | VAR32 | VAR33 | VAR34 | VAR35 | VAR36 | VAR37 | VAR38 | VAR39 | VAR40 | VAR41 | VAR42 | VAR43 | VAR44 | VAR45 | VAR46 | VAR47 | VAR48 | VAR49 | VAR50 | VAR51 | VAR52 | VAR53 | VAR54 | VAR55 | VAR56 | VAR57 | VAR58 | VAR59 | VAR60 | VAR61 |%n" + + "| | | KEY | | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (BOOLEAN) | (BOOLEAN) | (BOOLEAN) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TIME) | (DATE) | (DATE_TIME) | (DATE_TIME) | (DATE_TIME) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (NOT_IDENTIFIED : class java.util.Locale) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (UUID) | (NOT_IDENTIFIED) | (NOT_IDENTIFIED) |%n" + + "| | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 | Index : 19 | Index : 20 | Index : 21 | Index : 22 | Index : 23 | Index : 24 | Index : 25 | Index : 26 | Index : 27 | Index : 28 | Index : 29 | Index : 30 | Index : 31 | Index : 32 | Index : 33 | Index : 34 | Index : 35 | Index : 36 | Index : 37 | Index : 38 | Index : 39 | Index : 40 | Index : 41 | Index : 42 | Index : 43 | Index : 44 | Index : 45 | Index : 46 | Index : 47 | Index : 48 | Index : 49 | Index : 50 | Index : 51 | Index : 52 | Index : 53 | Index : 54 | Index : 55 | Index : 56 | Index : 57 | Index : 58 | Index : 59 | Index : 60 |%n" + + "|----------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" + + "| | | | At start point | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |%n" + + "| CREATION | test | |----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" + + "| | | | At end point | 1 | 20 | 3 | 4 | 5 | 6 | true | false | true | 7 | 8 | 9 | 10 | 11 | 12 | 13.13 | 14.14 | 15.15 | 16.16 | 17.17 | 18.18 | 19.19 | 20.2 | 21.21 | 09:01:00.000000000 | 2007-12-23 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | ... | ... | ... | ... | ... | fr | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | ... | ... | ... | ... | ... | ... | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 30b443ae-c0c9-4790-9bec-ce1380808435 | null | null |%n" + + "|----------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n")); Assertions.assertThat(byteArrayOutputStream13.toString()).isEqualTo(String.format("[Row at end point of Change at index 0 of Changes on TEST table of a data source]%n" - + "|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" - + "| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |%n" - + "| PRIMARY | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 | VAR20 | VAR21 | VAR22 | VAR23 | VAR24 | VAR25 | VAR26 | VAR27 | VAR28 | VAR29 | VAR30 | VAR31 | VAR32 | VAR33 | VAR34 | VAR35 | VAR36 | VAR37 | VAR38 | VAR39 | VAR40 | VAR41 | VAR42 | VAR43 | VAR44 | VAR45 | VAR46 | VAR47 | VAR48 | VAR49 | VAR50 | VAR51 | VAR52 | VAR53 | VAR54 | VAR55 | VAR56 | VAR57 | VAR58 | VAR59 | VAR60 | VAR61 |%n" - + "| KEY | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (BOOLEAN) | (BOOLEAN) | (BOOLEAN) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TIME) | (DATE) | (DATE_TIME) | (DATE_TIME) | (DATE_TIME) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (NOT_IDENTIFIED : class java.util.Locale) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (UUID) | (NOT_IDENTIFIED) | (NOT_IDENTIFIED) |%n" - + "| | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 | Index : 19 | Index : 20 | Index : 21 | Index : 22 | Index : 23 | Index : 24 | Index : 25 | Index : 26 | Index : 27 | Index : 28 | Index : 29 | Index : 30 | Index : 31 | Index : 32 | Index : 33 | Index : 34 | Index : 35 | Index : 36 | Index : 37 | Index : 38 | Index : 39 | Index : 40 | Index : 41 | Index : 42 | Index : 43 | Index : 44 | Index : 45 | Index : 46 | Index : 47 | Index : 48 | Index : 49 | Index : 50 | Index : 51 | Index : 52 | Index : 53 | Index : 54 | Index : 55 | Index : 56 | Index : 57 | Index : 58 | Index : 59 | Index : 60 |%n" - + "|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" - + "| | 1 | 20 | 3 | 4 | 5 | 6 | true | false | true | 7 | 8 | 9 | 10 | 11 | 12 | 13.13 | 14.14 | 15.15 | 16.16 | 17.17 | 18.18 | 19.19 | 20.2 | 21.21 | 09:01:00.000000000 | 2007-12-23 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | ... | ... | ... | ... | ... | fr | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | ... | ... | ... | ... | ... | ... | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 30b443ae-c0c9-4790-9bec-ce1380808435 | null | null |%n" - + "|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n")); + + "|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" + + "| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |%n" + + "| PRIMARY | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 | VAR20 | VAR21 | VAR22 | VAR23 | VAR24 | VAR25 | VAR26 | VAR27 | VAR28 | VAR29 | VAR30 | VAR31 | VAR32 | VAR33 | VAR34 | VAR35 | VAR36 | VAR37 | VAR38 | VAR39 | VAR40 | VAR41 | VAR42 | VAR43 | VAR44 | VAR45 | VAR46 | VAR47 | VAR48 | VAR49 | VAR50 | VAR51 | VAR52 | VAR53 | VAR54 | VAR55 | VAR56 | VAR57 | VAR58 | VAR59 | VAR60 | VAR61 |%n" + + "| KEY | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (BOOLEAN) | (BOOLEAN) | (BOOLEAN) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TIME) | (DATE) | (DATE_TIME) | (DATE_TIME) | (DATE_TIME) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (NOT_IDENTIFIED : class java.util.Locale) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (BYTES) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (UUID) | (NOT_IDENTIFIED) | (NOT_IDENTIFIED) |%n" + + "| | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 | Index : 19 | Index : 20 | Index : 21 | Index : 22 | Index : 23 | Index : 24 | Index : 25 | Index : 26 | Index : 27 | Index : 28 | Index : 29 | Index : 30 | Index : 31 | Index : 32 | Index : 33 | Index : 34 | Index : 35 | Index : 36 | Index : 37 | Index : 38 | Index : 39 | Index : 40 | Index : 41 | Index : 42 | Index : 43 | Index : 44 | Index : 45 | Index : 46 | Index : 47 | Index : 48 | Index : 49 | Index : 50 | Index : 51 | Index : 52 | Index : 53 | Index : 54 | Index : 55 | Index : 56 | Index : 57 | Index : 58 | Index : 59 | Index : 60 |%n" + + "|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n" + + "| | 1 | 20 | 3 | 4 | 5 | 6 | true | false | true | 7 | 8 | 9 | 10 | 11 | 12 | 13.13 | 14.14 | 15.15 | 16.16 | 17.17 | 18.18 | 19.19 | 20.2 | 21.21 | 09:01:00.000000000 | 2007-12-23 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | 2007-12-23T09:01:00.000000000 | ... | ... | ... | ... | ... | fr | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | ... | ... | ... | ... | ... | ... | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 30b443ae-c0c9-4790-9bec-ce1380808435 | null | null |%n" + + "|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------|------------|-------------------------------|-------------------------------|-------------------------------|------------|------------|------------|------------|------------|-------------------------------------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|------------|--------------------------------------|------------------|------------------|%n")); Assertions.assertThat(byteArrayOutputStream14.toString()).isEqualTo(String.format("[Value at index 0 (column name : VAR1) of Row at end point of Change at index 0 of Changes on TEST table of a data source]%n" - + "|----------|%n" - + "| VAR1 |%n" - + "| (NUMBER) |%n" - + "|----------|%n" - + "| 1 |%n" - + "|----------|%n")); + + "|----------|%n" + + "| VAR1 |%n" + + "| (NUMBER) |%n" + + "|----------|%n" + + "| 1 |%n" + + "|----------|%n")); Assertions.assertThat(byteArrayOutputStream15.toString()).isEqualTo(String.format("[Column at index 0 (column name : VAR1) of Change at index 0 of Changes on TEST table of a data source]%n" - + "|----------------|----------|%n" - + "| | VAR1 |%n" - + "| | (NUMBER) |%n" - + "|----------------|----------|%n" - + "| At start point | null |%n" - + "|----------------|----------|%n" - + "| At end point | 1 |%n" - + "|----------------|----------|%n")); + + "|----------------|----------|%n" + + "| | VAR1 |%n" + + "| | (NUMBER) |%n" + + "|----------------|----------|%n" + + "| At start point | null |%n" + + "|----------------|----------|%n" + + "| At end point | 1 |%n" + + "|----------------|----------|%n")); Assertions.assertThat(byteArrayOutputStream16.toString()).isEqualTo(String.format("[Value at end point of Column at index 0 (column name : VAR1) of Change at index 0 of Changes on TEST table of a data source]%n" - + "|----------|%n" - + "| VAR1 |%n" - + "| (NUMBER) |%n" - + "|----------|%n" - + "| 1 |%n" - + "|----------|%n")); + + "|----------|%n" + + "| VAR1 |%n" + + "| (NUMBER) |%n" + + "|----------|%n" + + "| 1 |%n" + + "|----------|%n")); } @Test @@ -277,25 +277,23 @@ public void should_fail_because_primary_key_is_different() { try { assertThat(changes).change().hasPksNames("var1"); fail("An exception must be raised"); - } - catch (AssertionError e) { + } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Change at index 0 of Changes on test table of 'sa/jdbc:h2:mem:testH2' source] %n" - + "Expecting :%n" - + " [\"var1\"]%n" - + "to be the name of the columns of the primary keys but was:%n" - + " []")); + + "Expecting :%n" + + " [\"var1\"]%n" + + "to be the name of the columns of the primary keys but was:%n" + + " []")); } try { assertThat(changes2).change().hasPksNames("var1"); fail("An exception must be raised"); - } - catch (AssertionError e) { + } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:testH2' source] %n" - + "Expecting :%n" - + " [\"var1\"]%n" - + "to be the name of the columns of the primary keys but was:%n" - + " [\"VAR1\"]")); + + "Expecting :%n" + + " [\"var1\"]%n" + + "to be the name of the columns of the primary keys but was:%n" + + " [\"VAR1\"]")); } } @@ -312,71 +310,65 @@ public void should_fail_because_column_name_is_different() { try { assertThat(table).column().hasColumnName("Var1"); fail("An exception must be raised"); - } - catch (AssertionError e) { + } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).as("message1").isEqualTo( - String.format("[Column at index 0 (column name : VAR1) of test table] %n" - + "Expecting :%n" - + " \"Var1\"%n" - + "to be the name of the column but was:%n" - + " \"VAR1\"")); + String.format("[Column at index 0 (column name : VAR1) of test table] %n" + + "Expecting :%n" + + " \"Var1\"%n" + + "to be the name of the column but was:%n" + + " \"VAR1\"")); } try { assertThat(table).row().value().hasColumnName("Var1"); fail("An exception must be raised"); - } - catch (AssertionError e) { + } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).as("message2").isEqualTo(String.format("[Value at index 0 (column name : VAR1) of Row at index 0 of test table] %n" - + "Expecting :%n" - + " \"Var1\"%n" - + "to be the name of the column but was:%n" - + " \"VAR1\"")); + + "Expecting :%n" + + " \"Var1\"%n" + + "to be the name of the column but was:%n" + + " \"VAR1\"")); } try { assertThat(changes).change().column().hasColumnName("Var1"); fail("An exception must be raised"); - } - catch (AssertionError e) { + } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).as("message3").isEqualTo(String.format("[Column at index 0 (column name : VAR1) of Change at index 0 of Changes on test table of 'sa/jdbc:h2:mem:testH2' source] %n" - + "Expecting :%n" - + " \"Var1\"%n" - + "to be the name of the column but was:%n" - + " \"VAR1\"")); + + "Expecting :%n" + + " \"Var1\"%n" + + "to be the name of the column but was:%n" + + " \"VAR1\"")); } try { assertThat(changes).change().rowAtEndPoint().value().hasColumnName("Var1"); fail("An exception must be raised"); - } - catch (AssertionError e) { + } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).as("message4").isEqualTo(String.format("[Value at index 0 (column name : VAR1) of Row at end point of Change at index 0 of Changes on test table of 'sa/jdbc:h2:mem:testH2' source] %n" - + "Expecting :%n" - + " \"Var1\"%n" - + "to be the name of the column but was:%n" - + " \"VAR1\"")); + + "Expecting :%n" + + " \"Var1\"%n" + + "to be the name of the column but was:%n" + + " \"VAR1\"")); } try { assertThat(changes2).change().column().hasColumnName("Var1"); fail("An exception must be raised"); - } - catch (AssertionError e) { + } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).as("message5").isEqualTo(String.format("[Column at index 0 (column name : VAR1) of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:testH2' source] %n" - + "Expecting :%n" - + " \"Var1\"%n" - + "to be the name of the column but was:%n" - + " \"VAR1\"")); + + "Expecting :%n" + + " \"Var1\"%n" + + "to be the name of the column but was:%n" + + " \"VAR1\"")); } try { assertThat(changes2).change().rowAtEndPoint().value().hasColumnName("Var1"); fail("An exception must be raised"); - } - catch (AssertionError e) { + } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).as("message6").isEqualTo(String.format("[Value at index 0 (column name : VAR1) of Row at end point of Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:testH2' source] %n" - + "Expecting :%n" - + " \"Var1\"%n" - + "to be the name of the column but was:%n" - + " \"VAR1\"")); + + "Expecting :%n" + + " \"Var1\"%n" + + "to be the name of the column but was:%n" + + " \"VAR1\"")); } } @@ -393,58 +385,52 @@ public void should_fail_because_column_name_is_wrong_to_navigate() { try { assertThat(table).column("Var1"); fail("An exception must be raised"); - } - catch (AssertJDBException e) { + } catch (AssertJDBException e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("Column does not exist%n" - + "in <[VAR1, VAR2, VAR3, VAR4, VAR5, VAR6, VAR7, VAR8, VAR9, VAR10, VAR11, VAR12, VAR13, VAR14, VAR15, VAR16, VAR17, VAR18, VAR19, VAR20, VAR21, VAR22, VAR23, VAR24, VAR25, VAR26, VAR27, VAR28, VAR29, VAR30, VAR31, VAR32, VAR33, VAR34, VAR35, VAR36, VAR37, VAR38, VAR39, VAR40, VAR41, VAR42, VAR43, VAR44, VAR45, VAR46, VAR47, VAR48, VAR49, VAR50, VAR51, VAR52, VAR53, VAR54, VAR55, VAR56, VAR57, VAR58, VAR59, VAR60, VAR61]>%n" - + "with comparison STRICT - Strictly compare the case")); + + "in <[VAR1, VAR2, VAR3, VAR4, VAR5, VAR6, VAR7, VAR8, VAR9, VAR10, VAR11, VAR12, VAR13, VAR14, VAR15, VAR16, VAR17, VAR18, VAR19, VAR20, VAR21, VAR22, VAR23, VAR24, VAR25, VAR26, VAR27, VAR28, VAR29, VAR30, VAR31, VAR32, VAR33, VAR34, VAR35, VAR36, VAR37, VAR38, VAR39, VAR40, VAR41, VAR42, VAR43, VAR44, VAR45, VAR46, VAR47, VAR48, VAR49, VAR50, VAR51, VAR52, VAR53, VAR54, VAR55, VAR56, VAR57, VAR58, VAR59, VAR60, VAR61]>%n" + + "with comparison STRICT - Strictly compare the case")); } try { assertThat(table).row().value("Var1"); fail("An exception must be raised"); - } - catch (AssertJDBException e) { + } catch (AssertJDBException e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("Column does not exist%n" - + "in <[VAR1, VAR2, VAR3, VAR4, VAR5, VAR6, VAR7, VAR8, VAR9, VAR10, VAR11, VAR12, VAR13, VAR14, VAR15, VAR16, VAR17, VAR18, VAR19, VAR20, VAR21, VAR22, VAR23, VAR24, VAR25, VAR26, VAR27, VAR28, VAR29, VAR30, VAR31, VAR32, VAR33, VAR34, VAR35, VAR36, VAR37, VAR38, VAR39, VAR40, VAR41, VAR42, VAR43, VAR44, VAR45, VAR46, VAR47, VAR48, VAR49, VAR50, VAR51, VAR52, VAR53, VAR54, VAR55, VAR56, VAR57, VAR58, VAR59, VAR60, VAR61]>%n" - + "with comparison STRICT - Strictly compare the case")); + + "in <[VAR1, VAR2, VAR3, VAR4, VAR5, VAR6, VAR7, VAR8, VAR9, VAR10, VAR11, VAR12, VAR13, VAR14, VAR15, VAR16, VAR17, VAR18, VAR19, VAR20, VAR21, VAR22, VAR23, VAR24, VAR25, VAR26, VAR27, VAR28, VAR29, VAR30, VAR31, VAR32, VAR33, VAR34, VAR35, VAR36, VAR37, VAR38, VAR39, VAR40, VAR41, VAR42, VAR43, VAR44, VAR45, VAR46, VAR47, VAR48, VAR49, VAR50, VAR51, VAR52, VAR53, VAR54, VAR55, VAR56, VAR57, VAR58, VAR59, VAR60, VAR61]>%n" + + "with comparison STRICT - Strictly compare the case")); } try { assertThat(changes).change().column("Var1"); fail("An exception must be raised"); - } - catch (AssertJDBException e) { + } catch (AssertJDBException e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("Column does not exist%n" - + "in <[VAR1, VAR2, VAR3, VAR4, VAR5, VAR6, VAR7, VAR8, VAR9, VAR10, VAR11, VAR12, VAR13, VAR14, VAR15, VAR16, VAR17, VAR18, VAR19, VAR20, VAR21, VAR22, VAR23, VAR24, VAR25, VAR26, VAR27, VAR28, VAR29, VAR30, VAR31, VAR32, VAR33, VAR34, VAR35, VAR36, VAR37, VAR38, VAR39, VAR40, VAR41, VAR42, VAR43, VAR44, VAR45, VAR46, VAR47, VAR48, VAR49, VAR50, VAR51, VAR52, VAR53, VAR54, VAR55, VAR56, VAR57, VAR58, VAR59, VAR60, VAR61]>%n" - + "with comparison STRICT - Strictly compare the case")); + + "in <[VAR1, VAR2, VAR3, VAR4, VAR5, VAR6, VAR7, VAR8, VAR9, VAR10, VAR11, VAR12, VAR13, VAR14, VAR15, VAR16, VAR17, VAR18, VAR19, VAR20, VAR21, VAR22, VAR23, VAR24, VAR25, VAR26, VAR27, VAR28, VAR29, VAR30, VAR31, VAR32, VAR33, VAR34, VAR35, VAR36, VAR37, VAR38, VAR39, VAR40, VAR41, VAR42, VAR43, VAR44, VAR45, VAR46, VAR47, VAR48, VAR49, VAR50, VAR51, VAR52, VAR53, VAR54, VAR55, VAR56, VAR57, VAR58, VAR59, VAR60, VAR61]>%n" + + "with comparison STRICT - Strictly compare the case")); } try { assertThat(changes).change().rowAtEndPoint().value("Var1"); fail("An exception must be raised"); - } - catch (AssertJDBException e) { + } catch (AssertJDBException e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("Column does not exist%n" - + "in <[VAR1, VAR2, VAR3, VAR4, VAR5, VAR6, VAR7, VAR8, VAR9, VAR10, VAR11, VAR12, VAR13, VAR14, VAR15, VAR16, VAR17, VAR18, VAR19, VAR20, VAR21, VAR22, VAR23, VAR24, VAR25, VAR26, VAR27, VAR28, VAR29, VAR30, VAR31, VAR32, VAR33, VAR34, VAR35, VAR36, VAR37, VAR38, VAR39, VAR40, VAR41, VAR42, VAR43, VAR44, VAR45, VAR46, VAR47, VAR48, VAR49, VAR50, VAR51, VAR52, VAR53, VAR54, VAR55, VAR56, VAR57, VAR58, VAR59, VAR60, VAR61]>%n" - + "with comparison STRICT - Strictly compare the case")); + + "in <[VAR1, VAR2, VAR3, VAR4, VAR5, VAR6, VAR7, VAR8, VAR9, VAR10, VAR11, VAR12, VAR13, VAR14, VAR15, VAR16, VAR17, VAR18, VAR19, VAR20, VAR21, VAR22, VAR23, VAR24, VAR25, VAR26, VAR27, VAR28, VAR29, VAR30, VAR31, VAR32, VAR33, VAR34, VAR35, VAR36, VAR37, VAR38, VAR39, VAR40, VAR41, VAR42, VAR43, VAR44, VAR45, VAR46, VAR47, VAR48, VAR49, VAR50, VAR51, VAR52, VAR53, VAR54, VAR55, VAR56, VAR57, VAR58, VAR59, VAR60, VAR61]>%n" + + "with comparison STRICT - Strictly compare the case")); } try { assertThat(changes2).change().column("Var1"); fail("An exception must be raised"); - } - catch (AssertJDBException e) { + } catch (AssertJDBException e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("Column does not exist%n" - + "in <[VAR1, VAR2, VAR3, VAR4, VAR5, VAR6, VAR7, VAR8, VAR9, VAR10, VAR11, VAR12, VAR13, VAR14, VAR15, VAR16, VAR17, VAR18, VAR19, VAR20, VAR21, VAR22, VAR23, VAR24, VAR25, VAR26, VAR27, VAR28, VAR29, VAR30, VAR31, VAR32, VAR33, VAR34, VAR35, VAR36, VAR37, VAR38, VAR39, VAR40, VAR41, VAR42, VAR43, VAR44, VAR45, VAR46, VAR47, VAR48, VAR49, VAR50, VAR51, VAR52, VAR53, VAR54, VAR55, VAR56, VAR57, VAR58, VAR59, VAR60, VAR61]>%n" - + "with comparison STRICT - Strictly compare the case")); + + "in <[VAR1, VAR2, VAR3, VAR4, VAR5, VAR6, VAR7, VAR8, VAR9, VAR10, VAR11, VAR12, VAR13, VAR14, VAR15, VAR16, VAR17, VAR18, VAR19, VAR20, VAR21, VAR22, VAR23, VAR24, VAR25, VAR26, VAR27, VAR28, VAR29, VAR30, VAR31, VAR32, VAR33, VAR34, VAR35, VAR36, VAR37, VAR38, VAR39, VAR40, VAR41, VAR42, VAR43, VAR44, VAR45, VAR46, VAR47, VAR48, VAR49, VAR50, VAR51, VAR52, VAR53, VAR54, VAR55, VAR56, VAR57, VAR58, VAR59, VAR60, VAR61]>%n" + + "with comparison STRICT - Strictly compare the case")); } try { assertThat(changes2).change().rowAtEndPoint().value("Var1"); fail("An exception must be raised"); - } - catch (AssertJDBException e) { + } catch (AssertJDBException e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("Column does not exist%n" - + "in <[VAR1, VAR2, VAR3, VAR4, VAR5, VAR6, VAR7, VAR8, VAR9, VAR10, VAR11, VAR12, VAR13, VAR14, VAR15, VAR16, VAR17, VAR18, VAR19, VAR20, VAR21, VAR22, VAR23, VAR24, VAR25, VAR26, VAR27, VAR28, VAR29, VAR30, VAR31, VAR32, VAR33, VAR34, VAR35, VAR36, VAR37, VAR38, VAR39, VAR40, VAR41, VAR42, VAR43, VAR44, VAR45, VAR46, VAR47, VAR48, VAR49, VAR50, VAR51, VAR52, VAR53, VAR54, VAR55, VAR56, VAR57, VAR58, VAR59, VAR60, VAR61]>%n" - + "with comparison STRICT - Strictly compare the case")); + + "in <[VAR1, VAR2, VAR3, VAR4, VAR5, VAR6, VAR7, VAR8, VAR9, VAR10, VAR11, VAR12, VAR13, VAR14, VAR15, VAR16, VAR17, VAR18, VAR19, VAR20, VAR21, VAR22, VAR23, VAR24, VAR25, VAR26, VAR27, VAR28, VAR29, VAR30, VAR31, VAR32, VAR33, VAR34, VAR35, VAR36, VAR37, VAR38, VAR39, VAR40, VAR41, VAR42, VAR43, VAR44, VAR45, VAR46, VAR47, VAR48, VAR49, VAR50, VAR51, VAR52, VAR53, VAR54, VAR55, VAR56, VAR57, VAR58, VAR59, VAR60, VAR61]>%n" + + "with comparison STRICT - Strictly compare the case")); } } @@ -461,24 +447,22 @@ public void should_fail_because_table_name_is_different() { try { assertThat(changes).change().isOnTable("teSt"); fail("An exception must be raised"); - } - catch (AssertionError e) { + } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Change at index 0 of Changes on test table of 'sa/jdbc:h2:mem:testH2' source] %n" - + "Expecting to be on the table:%n" - + " <\"teSt\">%n" - + "but was on the table:%n" - + " <\"test\">")); + + "Expecting to be on the table:%n" + + " <\"teSt\">%n" + + "but was on the table:%n" + + " <\"test\">")); } try { assertThat(changes2).change().isOnTable("teSt"); fail("An exception must be raised"); - } - catch (AssertionError e) { + } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Change at index 0 (with primary key : [1]) of Changes on TEST table of 'sa/jdbc:h2:mem:testH2' source] %n" - + "Expecting to be on the table:%n" - + " <\"teSt\">%n" - + "but was on the table:%n" - + " <\"TEST\">")); + + "Expecting to be on the table:%n" + + " <\"teSt\">%n" + + "but was on the table:%n" + + " <\"TEST\">")); } } @@ -495,44 +479,38 @@ public void should_fail_because_table_name_is_wrong_to_navigate() { try { assertThat(changes).changeOnTable("teSt"); fail("An exception must be raised"); - } - catch (AssertJDBException e) { + } catch (AssertJDBException e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("Index 0 out of the limits [0, 0[")); } try { assertThat(changes).changeOnTable("teSt", 0); fail("An exception must be raised"); - } - catch (AssertJDBException e) { + } catch (AssertJDBException e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("Index 0 out of the limits [0, 0[")); } try { assertThat(changes).changeOnTableWithPks("teSt", 1); fail("An exception must be raised"); - } - catch (AssertJDBException e) { + } catch (AssertJDBException e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("No change found for table teSt and primary keys [1]")); } try { assertThat(changes2).changeOnTable("teSt"); fail("An exception must be raised"); - } - catch (AssertJDBException e) { + } catch (AssertJDBException e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("Index 0 out of the limits [0, 0[")); } try { assertThat(changes2).changeOnTable("teSt", 0); fail("An exception must be raised"); - } - catch (AssertJDBException e) { + } catch (AssertJDBException e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("Index 0 out of the limits [0, 0[")); } try { assertThat(changes2).changeOnTableWithPks("teSt", 1); fail("An exception must be raised"); - } - catch (AssertJDBException e) { + } catch (AssertJDBException e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("No change found for table teSt and primary keys [1]")); } } diff --git a/src/test/java/org/assertj/db/database/h2/H2Database_Source_UIUIUI_Test.java b/src/test/java/org/assertj/db/database/h2/H2Database_Source_UIUIUI_Test.java index 79fd0173..3efd9fb5 100644 --- a/src/test/java/org/assertj/db/database/h2/H2Database_Source_UIUIUI_Test.java +++ b/src/test/java/org/assertj/db/database/h2/H2Database_Source_UIUIUI_Test.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.database.h2; @@ -77,131 +77,131 @@ public void test_ColumnName_hasColumnName() { changes.setEndPointNow(); assertThat(table) - .column().hasColumnName("var1") - .column().hasColumnName("var2") - .column().hasColumnName("var3") - .column().hasColumnName("var4") - .column().hasColumnName("var5") - .column().hasColumnName("var6") - .column().hasColumnName("var7") - .column().hasColumnName("var8") - .column().hasColumnName("var9") - .column().hasColumnName("var10") - .column().hasColumnName("var11") - .column().hasColumnName("var12") - .column().hasColumnName("var13") - .column().hasColumnName("var14") - .column().hasColumnName("var15") - .column().hasColumnName("var16") - .column().hasColumnName("var17") - .column().hasColumnName("var18") - .column().hasColumnName("var19") - .column().hasColumnName("var20") - .column().hasColumnName("var21") - .column().hasColumnName("var22") - .column().hasColumnName("var23") - .column().hasColumnName("var24") - .column().hasColumnName("var25") - .column().hasColumnName("var26") - .column().hasColumnName("var27") - .column().hasColumnName("var28") - .column().hasColumnName("var29") - .column().hasColumnName("var30") - .column().hasColumnName("var31") - .column().hasColumnName("var32") - .column().hasColumnName("var33") - .column().hasColumnName("var34") - .column().hasColumnName("var35") - .column().hasColumnName("var36") - .column().hasColumnName("var37") - .column().hasColumnName("var38") - .column().hasColumnName("var39") - .column().hasColumnName("var40") - .column().hasColumnName("var41") - .column().hasColumnName("var42") - .column().hasColumnName("var43") - .column().hasColumnName("var44") - .column().hasColumnName("var45") - .column().hasColumnName("var46") - .column().hasColumnName("var47") - .column().hasColumnName("var48") - .column().hasColumnName("var49") - .column().hasColumnName("var50") - .column().hasColumnName("var51") - .column().hasColumnName("var52") - .column().hasColumnName("var53") - .column().hasColumnName("var54") - .column().hasColumnName("var55") - .column().hasColumnName("var56") - .column().hasColumnName("var57") - .column().hasColumnName("var58") - .column().hasColumnName("var59") - .column().hasColumnName("var60") - .column().hasColumnName("var61") + .column().hasColumnName("var1") + .column().hasColumnName("var2") + .column().hasColumnName("var3") + .column().hasColumnName("var4") + .column().hasColumnName("var5") + .column().hasColumnName("var6") + .column().hasColumnName("var7") + .column().hasColumnName("var8") + .column().hasColumnName("var9") + .column().hasColumnName("var10") + .column().hasColumnName("var11") + .column().hasColumnName("var12") + .column().hasColumnName("var13") + .column().hasColumnName("var14") + .column().hasColumnName("var15") + .column().hasColumnName("var16") + .column().hasColumnName("var17") + .column().hasColumnName("var18") + .column().hasColumnName("var19") + .column().hasColumnName("var20") + .column().hasColumnName("var21") + .column().hasColumnName("var22") + .column().hasColumnName("var23") + .column().hasColumnName("var24") + .column().hasColumnName("var25") + .column().hasColumnName("var26") + .column().hasColumnName("var27") + .column().hasColumnName("var28") + .column().hasColumnName("var29") + .column().hasColumnName("var30") + .column().hasColumnName("var31") + .column().hasColumnName("var32") + .column().hasColumnName("var33") + .column().hasColumnName("var34") + .column().hasColumnName("var35") + .column().hasColumnName("var36") + .column().hasColumnName("var37") + .column().hasColumnName("var38") + .column().hasColumnName("var39") + .column().hasColumnName("var40") + .column().hasColumnName("var41") + .column().hasColumnName("var42") + .column().hasColumnName("var43") + .column().hasColumnName("var44") + .column().hasColumnName("var45") + .column().hasColumnName("var46") + .column().hasColumnName("var47") + .column().hasColumnName("var48") + .column().hasColumnName("var49") + .column().hasColumnName("var50") + .column().hasColumnName("var51") + .column().hasColumnName("var52") + .column().hasColumnName("var53") + .column().hasColumnName("var54") + .column().hasColumnName("var55") + .column().hasColumnName("var56") + .column().hasColumnName("var57") + .column().hasColumnName("var58") + .column().hasColumnName("var59") + .column().hasColumnName("var60") + .column().hasColumnName("var61") ; assertThat(changes).change() - .column().hasColumnName("var1") - .column().hasColumnName("var2") - .column().hasColumnName("var3") - .column().hasColumnName("var4") - .column().hasColumnName("var5") - .column().hasColumnName("var6") - .column().hasColumnName("var7") - .column().hasColumnName("var8") - .column().hasColumnName("var9") - .column().hasColumnName("var10") - .column().hasColumnName("var11") - .column().hasColumnName("var12") - .column().hasColumnName("var13") - .column().hasColumnName("var14") - .column().hasColumnName("var15") - .column().hasColumnName("var16") - .column().hasColumnName("var17") - .column().hasColumnName("var18") - .column().hasColumnName("var19") - .column().hasColumnName("var20") - .column().hasColumnName("var21") - .column().hasColumnName("var22") - .column().hasColumnName("var23") - .column().hasColumnName("var24") - .column().hasColumnName("var25") - .column().hasColumnName("var26") - .column().hasColumnName("var27") - .column().hasColumnName("var28") - .column().hasColumnName("var29") - .column().hasColumnName("var30") - .column().hasColumnName("var31") - .column().hasColumnName("var32") - .column().hasColumnName("var33") - .column().hasColumnName("var34") - .column().hasColumnName("var35") - .column().hasColumnName("var36") - .column().hasColumnName("var37") - .column().hasColumnName("var38") - .column().hasColumnName("var39") - .column().hasColumnName("var40") - .column().hasColumnName("var41") - .column().hasColumnName("var42") - .column().hasColumnName("var43") - .column().hasColumnName("var44") - .column().hasColumnName("var45") - .column().hasColumnName("var46") - .column().hasColumnName("var47") - .column().hasColumnName("var48") - .column().hasColumnName("var49") - .column().hasColumnName("var50") - .column().hasColumnName("var51") - .column().hasColumnName("var52") - .column().hasColumnName("var53") - .column().hasColumnName("var54") - .column().hasColumnName("var55") - .column().hasColumnName("var56") - .column().hasColumnName("var57") - .column().hasColumnName("var58") - .column().hasColumnName("var59") - .column().hasColumnName("var60") - .column().hasColumnName("var61") + .column().hasColumnName("var1") + .column().hasColumnName("var2") + .column().hasColumnName("var3") + .column().hasColumnName("var4") + .column().hasColumnName("var5") + .column().hasColumnName("var6") + .column().hasColumnName("var7") + .column().hasColumnName("var8") + .column().hasColumnName("var9") + .column().hasColumnName("var10") + .column().hasColumnName("var11") + .column().hasColumnName("var12") + .column().hasColumnName("var13") + .column().hasColumnName("var14") + .column().hasColumnName("var15") + .column().hasColumnName("var16") + .column().hasColumnName("var17") + .column().hasColumnName("var18") + .column().hasColumnName("var19") + .column().hasColumnName("var20") + .column().hasColumnName("var21") + .column().hasColumnName("var22") + .column().hasColumnName("var23") + .column().hasColumnName("var24") + .column().hasColumnName("var25") + .column().hasColumnName("var26") + .column().hasColumnName("var27") + .column().hasColumnName("var28") + .column().hasColumnName("var29") + .column().hasColumnName("var30") + .column().hasColumnName("var31") + .column().hasColumnName("var32") + .column().hasColumnName("var33") + .column().hasColumnName("var34") + .column().hasColumnName("var35") + .column().hasColumnName("var36") + .column().hasColumnName("var37") + .column().hasColumnName("var38") + .column().hasColumnName("var39") + .column().hasColumnName("var40") + .column().hasColumnName("var41") + .column().hasColumnName("var42") + .column().hasColumnName("var43") + .column().hasColumnName("var44") + .column().hasColumnName("var45") + .column().hasColumnName("var46") + .column().hasColumnName("var47") + .column().hasColumnName("var48") + .column().hasColumnName("var49") + .column().hasColumnName("var50") + .column().hasColumnName("var51") + .column().hasColumnName("var52") + .column().hasColumnName("var53") + .column().hasColumnName("var54") + .column().hasColumnName("var55") + .column().hasColumnName("var56") + .column().hasColumnName("var57") + .column().hasColumnName("var58") + .column().hasColumnName("var59") + .column().hasColumnName("var60") + .column().hasColumnName("var61") ; } @@ -214,131 +214,131 @@ public void test_ColumnClass_isOfClass() { changes.setEndPointNow(); assertThat(table) - .column("var1").isOfClass(Long.class, false) - .column("var2").isOfClass(Integer.class, false) - .column("var3").isOfClass(Integer.class, false) - .column("var4").isOfClass(Integer.class, false) - .column("var5").isOfClass(Integer.class, false) - .column("var6").isOfClass(Integer.class, false) - .column("var7").isOfClass(Boolean.class, false) - .column("var8").isOfClass(Boolean.class, false) - .column("var9").isOfClass(Boolean.class, false) - .column("var10").isOfClass(Byte.class, false) - .column("var11").isOfClass(Short.class, false) - .column("var12").isOfClass(Short.class, false) - .column("var13").isOfClass(Short.class, false) - .column("var14").isOfClass(Long.class, false) - .column("var15").isOfClass(Long.class, false) - .column("var16").isOfClass(BigDecimal.class, false) - .column("var17").isOfClass(BigDecimal.class, false) - .column("var18").isOfClass(BigDecimal.class, false) - .column("var19").isOfClass(BigDecimal.class, false) - .column("var20").isOfClass(Double.class, false) - .column("var21").isOfClass(Double.class, false) - .column("var22").isOfClass(Double.class, false) - .column("var23").isOfClass(Float.class, false) - .column("var24").isOfClass(Float.class, false) - .column("var25").isOfClass(Time.class, false) - .column("var26").isOfClass(Date.class, false) - .column("var27").isOfClass(Timestamp.class, false) - .column("var28").isOfClass(Timestamp.class, false) - .column("var29").isOfClass(Timestamp.class, false) - .column("var30").isOfClass(byte[].class, false) - .column("var31").isOfClass(byte[].class, false) - .column("var32").isOfClass(byte[].class, false) - .column("var33").isOfClass(byte[].class, false) - .column("var34").isOfClass(byte[].class, false) - .column("var35").isOfClass(Locale.class, false) - .column("var36").isOfClass(String.class, false) - .column("var37").isOfClass(String.class, false) - .column("var38").isOfClass(String.class, false) - .column("var39").isOfClass(String.class, false) - .column("var40").isOfClass(String.class, false) - .column("var41").isOfClass(String.class, false) - .column("var42").isOfClass(String.class, false) - .column("var43").isOfClass(String.class, false) - .column("var44").isOfClass(String.class, false) - .column("var45").isOfClass(String.class, false) - .column("var46").isOfClass(byte[].class, false) - .column("var47").isOfClass(byte[].class, false) - .column("var48").isOfClass(byte[].class, false) - .column("var49").isOfClass(byte[].class, false) - .column("var50").isOfClass(byte[].class, false) - .column("var51").isOfClass(byte[].class, false) - .column("var52").isOfClass(String.class, false) - .column("var53").isOfClass(String.class, false) - .column("var54").isOfClass(String.class, false) - .column("var55").isOfClass(String.class, false) - .column("var56").isOfClass(String.class, false) - .column("var57").isOfClass(String.class, false) - .column("var58").isOfClass(String.class, false) - .column("var59").isOfClass(UUID.class, false) - .column("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) - .column("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) + .column("var1").isOfClass(Long.class, false) + .column("var2").isOfClass(Integer.class, false) + .column("var3").isOfClass(Integer.class, false) + .column("var4").isOfClass(Integer.class, false) + .column("var5").isOfClass(Integer.class, false) + .column("var6").isOfClass(Integer.class, false) + .column("var7").isOfClass(Boolean.class, false) + .column("var8").isOfClass(Boolean.class, false) + .column("var9").isOfClass(Boolean.class, false) + .column("var10").isOfClass(Byte.class, false) + .column("var11").isOfClass(Short.class, false) + .column("var12").isOfClass(Short.class, false) + .column("var13").isOfClass(Short.class, false) + .column("var14").isOfClass(Long.class, false) + .column("var15").isOfClass(Long.class, false) + .column("var16").isOfClass(BigDecimal.class, false) + .column("var17").isOfClass(BigDecimal.class, false) + .column("var18").isOfClass(BigDecimal.class, false) + .column("var19").isOfClass(BigDecimal.class, false) + .column("var20").isOfClass(Double.class, false) + .column("var21").isOfClass(Double.class, false) + .column("var22").isOfClass(Double.class, false) + .column("var23").isOfClass(Float.class, false) + .column("var24").isOfClass(Float.class, false) + .column("var25").isOfClass(Time.class, false) + .column("var26").isOfClass(Date.class, false) + .column("var27").isOfClass(Timestamp.class, false) + .column("var28").isOfClass(Timestamp.class, false) + .column("var29").isOfClass(Timestamp.class, false) + .column("var30").isOfClass(byte[].class, false) + .column("var31").isOfClass(byte[].class, false) + .column("var32").isOfClass(byte[].class, false) + .column("var33").isOfClass(byte[].class, false) + .column("var34").isOfClass(byte[].class, false) + .column("var35").isOfClass(Locale.class, false) + .column("var36").isOfClass(String.class, false) + .column("var37").isOfClass(String.class, false) + .column("var38").isOfClass(String.class, false) + .column("var39").isOfClass(String.class, false) + .column("var40").isOfClass(String.class, false) + .column("var41").isOfClass(String.class, false) + .column("var42").isOfClass(String.class, false) + .column("var43").isOfClass(String.class, false) + .column("var44").isOfClass(String.class, false) + .column("var45").isOfClass(String.class, false) + .column("var46").isOfClass(byte[].class, false) + .column("var47").isOfClass(byte[].class, false) + .column("var48").isOfClass(byte[].class, false) + .column("var49").isOfClass(byte[].class, false) + .column("var50").isOfClass(byte[].class, false) + .column("var51").isOfClass(byte[].class, false) + .column("var52").isOfClass(String.class, false) + .column("var53").isOfClass(String.class, false) + .column("var54").isOfClass(String.class, false) + .column("var55").isOfClass(String.class, false) + .column("var56").isOfClass(String.class, false) + .column("var57").isOfClass(String.class, false) + .column("var58").isOfClass(String.class, false) + .column("var59").isOfClass(UUID.class, false) + .column("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) + .column("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) ; assertThat(changes).change() - .column("var1").isOfClass(Long.class, false) - .column("var2").isOfClass(Integer.class, false) - .column("var3").isOfClass(Integer.class, false) - .column("var4").isOfClass(Integer.class, false) - .column("var5").isOfClass(Integer.class, false) - .column("var6").isOfClass(Integer.class, false) - .column("var7").isOfClass(Boolean.class, false) - .column("var8").isOfClass(Boolean.class, false) - .column("var9").isOfClass(Boolean.class, false) - .column("var10").isOfClass(Byte.class, false) - .column("var11").isOfClass(Short.class, false) - .column("var12").isOfClass(Short.class, false) - .column("var13").isOfClass(Short.class, false) - .column("var14").isOfClass(Long.class, false) - .column("var15").isOfClass(Long.class, false) - .column("var16").isOfClass(BigDecimal.class, false) - .column("var17").isOfClass(BigDecimal.class, false) - .column("var18").isOfClass(BigDecimal.class, false) - .column("var19").isOfClass(BigDecimal.class, false) - .column("var20").isOfClass(Double.class, false) - .column("var21").isOfClass(Double.class, false) - .column("var22").isOfClass(Double.class, false) - .column("var23").isOfClass(Float.class, false) - .column("var24").isOfClass(Float.class, false) - .column("var25").isOfClass(Time.class, false) - .column("var26").isOfClass(Date.class, false) - .column("var27").isOfClass(Timestamp.class, false) - .column("var28").isOfClass(Timestamp.class, false) - .column("var29").isOfClass(Timestamp.class, false) - .column("var30").isOfClass(byte[].class, false) - .column("var31").isOfClass(byte[].class, false) - .column("var32").isOfClass(byte[].class, false) - .column("var33").isOfClass(byte[].class, false) - .column("var34").isOfClass(byte[].class, false) - .column("var35").isOfClass(Locale.class, false) - .column("var36").isOfClass(String.class, false) - .column("var37").isOfClass(String.class, false) - .column("var38").isOfClass(String.class, false) - .column("var39").isOfClass(String.class, false) - .column("var40").isOfClass(String.class, false) - .column("var41").isOfClass(String.class, false) - .column("var42").isOfClass(String.class, false) - .column("var43").isOfClass(String.class, false) - .column("var44").isOfClass(String.class, false) - .column("var45").isOfClass(String.class, false) - .column("var46").isOfClass(byte[].class, false) - .column("var47").isOfClass(byte[].class, false) - .column("var48").isOfClass(byte[].class, false) - .column("var49").isOfClass(byte[].class, false) - .column("var50").isOfClass(byte[].class, false) - .column("var51").isOfClass(byte[].class, false) - .column("var52").isOfClass(String.class, false) - .column("var53").isOfClass(String.class, false) - .column("var54").isOfClass(String.class, false) - .column("var55").isOfClass(String.class, false) - .column("var56").isOfClass(String.class, false) - .column("var57").isOfClass(String.class, false) - .column("var58").isOfClass(String.class, false) - .column("var59").isOfClass(UUID.class, false) - .column("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) - .column("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) + .column("var1").isOfClass(Long.class, false) + .column("var2").isOfClass(Integer.class, false) + .column("var3").isOfClass(Integer.class, false) + .column("var4").isOfClass(Integer.class, false) + .column("var5").isOfClass(Integer.class, false) + .column("var6").isOfClass(Integer.class, false) + .column("var7").isOfClass(Boolean.class, false) + .column("var8").isOfClass(Boolean.class, false) + .column("var9").isOfClass(Boolean.class, false) + .column("var10").isOfClass(Byte.class, false) + .column("var11").isOfClass(Short.class, false) + .column("var12").isOfClass(Short.class, false) + .column("var13").isOfClass(Short.class, false) + .column("var14").isOfClass(Long.class, false) + .column("var15").isOfClass(Long.class, false) + .column("var16").isOfClass(BigDecimal.class, false) + .column("var17").isOfClass(BigDecimal.class, false) + .column("var18").isOfClass(BigDecimal.class, false) + .column("var19").isOfClass(BigDecimal.class, false) + .column("var20").isOfClass(Double.class, false) + .column("var21").isOfClass(Double.class, false) + .column("var22").isOfClass(Double.class, false) + .column("var23").isOfClass(Float.class, false) + .column("var24").isOfClass(Float.class, false) + .column("var25").isOfClass(Time.class, false) + .column("var26").isOfClass(Date.class, false) + .column("var27").isOfClass(Timestamp.class, false) + .column("var28").isOfClass(Timestamp.class, false) + .column("var29").isOfClass(Timestamp.class, false) + .column("var30").isOfClass(byte[].class, false) + .column("var31").isOfClass(byte[].class, false) + .column("var32").isOfClass(byte[].class, false) + .column("var33").isOfClass(byte[].class, false) + .column("var34").isOfClass(byte[].class, false) + .column("var35").isOfClass(Locale.class, false) + .column("var36").isOfClass(String.class, false) + .column("var37").isOfClass(String.class, false) + .column("var38").isOfClass(String.class, false) + .column("var39").isOfClass(String.class, false) + .column("var40").isOfClass(String.class, false) + .column("var41").isOfClass(String.class, false) + .column("var42").isOfClass(String.class, false) + .column("var43").isOfClass(String.class, false) + .column("var44").isOfClass(String.class, false) + .column("var45").isOfClass(String.class, false) + .column("var46").isOfClass(byte[].class, false) + .column("var47").isOfClass(byte[].class, false) + .column("var48").isOfClass(byte[].class, false) + .column("var49").isOfClass(byte[].class, false) + .column("var50").isOfClass(byte[].class, false) + .column("var51").isOfClass(byte[].class, false) + .column("var52").isOfClass(String.class, false) + .column("var53").isOfClass(String.class, false) + .column("var54").isOfClass(String.class, false) + .column("var55").isOfClass(String.class, false) + .column("var56").isOfClass(String.class, false) + .column("var57").isOfClass(String.class, false) + .column("var58").isOfClass(String.class, false) + .column("var59").isOfClass(UUID.class, false) + .column("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) + .column("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) ; } @@ -351,130 +351,130 @@ public void test_ColumnEquality_hasValues() { changes.setEndPointNow(); assertThat(table).column("var1").hasValues(1) - .column("var2").hasValues(20) - .column("var3").hasValues(3) - .column("var4").hasValues(4) - .column("var5").hasValues(5) - .column("var6").hasValues(6) - .column("var7").hasValues(true) - .column("var8").hasValues(false) - .column("var9").hasValues(true) - .column("var10").hasValues(7) - .column("var11").hasValues(8) - .column("var12").hasValues(9) - .column("var13").hasValues(10) - .column("var14").hasValues(11) - .column("var15").hasValues(12) - .column("var16").hasValues(13.13) - .column("var17").hasValues(14.14) - .column("var18").hasValues(15.15) - .column("var19").hasValues(16.16) - .column("var20").hasValues(17.17) - .column("var21").hasValues(18.18) - .column("var22").hasValues(19.19) - .column("var23").hasValues(20.20) - .column("var24").hasValues(21.21) - .column("var25").hasValues(TimeValue.of(9, 1)) - .column("var26").hasValues(DateValue.of(2007, 12, 23)) - .column("var27").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .column("var28").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .column("var29").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .column("var30").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var31").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var32").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var33").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var34").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var35").hasValues(Locale.FRENCH) - .column("var36").hasValues("22") - .column("var37").hasValues("23") - .column("var38").hasValues("24") - .column("var39").hasValues("25") - .column("var40").hasValues("26") - .column("var41").hasValues("27") - .column("var42").hasValues("28") - .column("var43").hasValues("29") - .column("var44").hasValues("30") - .column("var45").hasValues("31") - .column("var46").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var47").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var48").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var49").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var50").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var51").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var52").hasValues("32") - .column("var53").hasValues("33") - .column("var54").hasValues("34") - .column("var55").hasValues("35") - .column("var56").hasValues("36") - .column("var57").hasValues("37") - .column("var58").hasValues("38") - .column("var59").hasValues(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")) - .column("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) - .column("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) + .column("var2").hasValues(20) + .column("var3").hasValues(3) + .column("var4").hasValues(4) + .column("var5").hasValues(5) + .column("var6").hasValues(6) + .column("var7").hasValues(true) + .column("var8").hasValues(false) + .column("var9").hasValues(true) + .column("var10").hasValues(7) + .column("var11").hasValues(8) + .column("var12").hasValues(9) + .column("var13").hasValues(10) + .column("var14").hasValues(11) + .column("var15").hasValues(12) + .column("var16").hasValues(13.13) + .column("var17").hasValues(14.14) + .column("var18").hasValues(15.15) + .column("var19").hasValues(16.16) + .column("var20").hasValues(17.17) + .column("var21").hasValues(18.18) + .column("var22").hasValues(19.19) + .column("var23").hasValues(20.20) + .column("var24").hasValues(21.21) + .column("var25").hasValues(TimeValue.of(9, 1)) + .column("var26").hasValues(DateValue.of(2007, 12, 23)) + .column("var27").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .column("var28").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .column("var29").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .column("var30").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var31").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var32").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var33").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var34").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var35").hasValues(Locale.FRENCH) + .column("var36").hasValues("22") + .column("var37").hasValues("23") + .column("var38").hasValues("24") + .column("var39").hasValues("25") + .column("var40").hasValues("26") + .column("var41").hasValues("27") + .column("var42").hasValues("28") + .column("var43").hasValues("29") + .column("var44").hasValues("30") + .column("var45").hasValues("31") + .column("var46").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var47").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var48").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var49").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var50").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var51").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var52").hasValues("32") + .column("var53").hasValues("33") + .column("var54").hasValues("34") + .column("var55").hasValues("35") + .column("var56").hasValues("36") + .column("var57").hasValues("37") + .column("var58").hasValues("38") + .column("var59").hasValues(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")) + .column("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) + .column("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) ; assertThat(changes).change() - .column("var1").hasValues(1) - .column("var2").hasValues(2, 20) - .column("var3").hasValues(3) - .column("var4").hasValues(4) - .column("var5").hasValues(5) - .column("var6").hasValues(6) - .column("var7").hasValues(true) - .column("var8").hasValues(false) - .column("var9").hasValues(true) - .column("var10").hasValues(7) - .column("var11").hasValues(8) - .column("var12").hasValues(9) - .column("var13").hasValues(10) - .column("var14").hasValues(11) - .column("var15").hasValues(12) - .column("var16").hasValues(13.13) - .column("var17").hasValues(14.14) - .column("var18").hasValues(15.15) - .column("var19").hasValues(16.16) - .column("var20").hasValues(17.17) - .column("var21").hasValues(18.18) - .column("var22").hasValues(19.19) - .column("var23").hasValues(20.20) - .column("var24").hasValues(21.21) - .column("var25").hasValues(TimeValue.of(9, 1)) - .column("var26").hasValues(DateValue.of(2007, 12, 23)) - .column("var27").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .column("var28").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .column("var29").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .column("var30").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var31").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var32").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var33").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var34").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var35").hasValues(Locale.FRENCH) - .column("var36").hasValues("22") - .column("var37").hasValues("23") - .column("var38").hasValues("24") - .column("var39").hasValues("25") - .column("var40").hasValues("26") - .column("var41").hasValues("27") - .column("var42").hasValues("28") - .column("var43").hasValues("29") - .column("var44").hasValues("30") - .column("var45").hasValues("31") - .column("var46").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var47").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var48").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var49").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var50").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var51").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var52").hasValues("32") - .column("var53").hasValues("33") - .column("var54").hasValues("34") - .column("var55").hasValues("35") - .column("var56").hasValues("36") - .column("var57").hasValues("37") - .column("var58").hasValues("38") - .column("var59").hasValues(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")) - .column("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) - .column("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) + .column("var1").hasValues(1) + .column("var2").hasValues(2, 20) + .column("var3").hasValues(3) + .column("var4").hasValues(4) + .column("var5").hasValues(5) + .column("var6").hasValues(6) + .column("var7").hasValues(true) + .column("var8").hasValues(false) + .column("var9").hasValues(true) + .column("var10").hasValues(7) + .column("var11").hasValues(8) + .column("var12").hasValues(9) + .column("var13").hasValues(10) + .column("var14").hasValues(11) + .column("var15").hasValues(12) + .column("var16").hasValues(13.13) + .column("var17").hasValues(14.14) + .column("var18").hasValues(15.15) + .column("var19").hasValues(16.16) + .column("var20").hasValues(17.17) + .column("var21").hasValues(18.18) + .column("var22").hasValues(19.19) + .column("var23").hasValues(20.20) + .column("var24").hasValues(21.21) + .column("var25").hasValues(TimeValue.of(9, 1)) + .column("var26").hasValues(DateValue.of(2007, 12, 23)) + .column("var27").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .column("var28").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .column("var29").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .column("var30").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var31").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var32").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var33").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var34").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var35").hasValues(Locale.FRENCH) + .column("var36").hasValues("22") + .column("var37").hasValues("23") + .column("var38").hasValues("24") + .column("var39").hasValues("25") + .column("var40").hasValues("26") + .column("var41").hasValues("27") + .column("var42").hasValues("28") + .column("var43").hasValues("29") + .column("var44").hasValues("30") + .column("var45").hasValues("31") + .column("var46").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var47").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var48").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var49").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var50").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var51").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var52").hasValues("32") + .column("var53").hasValues("33") + .column("var54").hasValues("34") + .column("var55").hasValues("35") + .column("var56").hasValues("36") + .column("var57").hasValues("37") + .column("var58").hasValues("38") + .column("var59").hasValues(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")) + .column("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) + .column("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) ; } @@ -487,66 +487,66 @@ public void test_ColumnEquality_containsValues() { changes.setEndPointNow(); assertThat(table).column("var1").containsValues(1) - .column("var2").containsValues(20) - .column("var3").containsValues(3) - .column("var4").containsValues(4) - .column("var5").containsValues(5) - .column("var6").containsValues(6) - .column("var7").containsValues(true) - .column("var8").containsValues(false) - .column("var9").containsValues(true) - .column("var10").containsValues(7) - .column("var11").containsValues(8) - .column("var12").containsValues(9) - .column("var13").containsValues(10) - .column("var14").containsValues(11) - .column("var15").containsValues(12) - .column("var16").containsValues(13.13) - .column("var17").containsValues(14.14) - .column("var18").containsValues(15.15) - .column("var19").containsValues(16.16) - .column("var20").containsValues(17.17) - .column("var21").containsValues(18.18) - .column("var22").containsValues(19.19) - .column("var23").containsValues(20.20) - .column("var24").containsValues(21.21) - .column("var25").containsValues(TimeValue.of(9, 1)) - .column("var26").containsValues(DateValue.of(2007, 12, 23)) - .column("var27").containsValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .column("var28").containsValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .column("var29").containsValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .column("var30").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var31").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var32").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var33").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var34").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var35").containsValues(Locale.FRENCH) - .column("var36").containsValues("22") - .column("var37").containsValues("23") - .column("var38").containsValues("24") - .column("var39").containsValues("25") - .column("var40").containsValues("26") - .column("var41").containsValues("27") - .column("var42").containsValues("28") - .column("var43").containsValues("29") - .column("var44").containsValues("30") - .column("var45").containsValues("31") - .column("var46").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var47").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var48").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var49").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var50").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var51").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var52").containsValues("32") - .column("var53").containsValues("33") - .column("var54").containsValues("34") - .column("var55").containsValues("35") - .column("var56").containsValues("36") - .column("var57").containsValues("37") - .column("var58").containsValues("38") - .column("var59").containsValues(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")) - .column("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) - .column("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) + .column("var2").containsValues(20) + .column("var3").containsValues(3) + .column("var4").containsValues(4) + .column("var5").containsValues(5) + .column("var6").containsValues(6) + .column("var7").containsValues(true) + .column("var8").containsValues(false) + .column("var9").containsValues(true) + .column("var10").containsValues(7) + .column("var11").containsValues(8) + .column("var12").containsValues(9) + .column("var13").containsValues(10) + .column("var14").containsValues(11) + .column("var15").containsValues(12) + .column("var16").containsValues(13.13) + .column("var17").containsValues(14.14) + .column("var18").containsValues(15.15) + .column("var19").containsValues(16.16) + .column("var20").containsValues(17.17) + .column("var21").containsValues(18.18) + .column("var22").containsValues(19.19) + .column("var23").containsValues(20.20) + .column("var24").containsValues(21.21) + .column("var25").containsValues(TimeValue.of(9, 1)) + .column("var26").containsValues(DateValue.of(2007, 12, 23)) + .column("var27").containsValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .column("var28").containsValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .column("var29").containsValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .column("var30").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var31").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var32").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var33").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var34").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var35").containsValues(Locale.FRENCH) + .column("var36").containsValues("22") + .column("var37").containsValues("23") + .column("var38").containsValues("24") + .column("var39").containsValues("25") + .column("var40").containsValues("26") + .column("var41").containsValues("27") + .column("var42").containsValues("28") + .column("var43").containsValues("29") + .column("var44").containsValues("30") + .column("var45").containsValues("31") + .column("var46").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var47").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var48").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var49").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var50").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var51").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var52").containsValues("32") + .column("var53").containsValues("33") + .column("var54").containsValues("34") + .column("var55").containsValues("35") + .column("var56").containsValues("36") + .column("var57").containsValues("37") + .column("var58").containsValues("38") + .column("var59").containsValues(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")) + .column("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) + .column("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) ; } @@ -559,130 +559,130 @@ public void test_ColumnType_isOfType() { changes.setEndPointNow(); assertThat(table).column("var1").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var2").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var3").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var4").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var5").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var6").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var7").isBoolean(false).isOfType(ValueType.BOOLEAN, false) - .column("var8").isBoolean(false).isOfType(ValueType.BOOLEAN, false) - .column("var9").isBoolean(false).isOfType(ValueType.BOOLEAN, false) - .column("var10").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var11").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var12").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var13").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var14").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var15").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var16").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var17").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var18").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var19").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var20").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var21").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var22").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var23").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var24").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var25").isTime(false).isOfType(ValueType.TIME, false) - .column("var26").isDate(false).isOfType(ValueType.DATE, false) - .column("var27").isDateTime(false).isOfType(ValueType.DATE_TIME, false) - .column("var28").isDateTime(false).isOfType(ValueType.DATE_TIME, false) - .column("var29").isDateTime(false).isOfType(ValueType.DATE_TIME, false) - .column("var30").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var31").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var32").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var33").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var34").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var35") - .column("var36").isText(false).isOfType(ValueType.TEXT, false) - .column("var37").isText(false).isOfType(ValueType.TEXT, false) - .column("var38").isText(false).isOfType(ValueType.TEXT, false) - .column("var39").isText(false).isOfType(ValueType.TEXT, false) - .column("var40").isText(false).isOfType(ValueType.TEXT, false) - .column("var41").isText(false).isOfType(ValueType.TEXT, false) - .column("var42").isText(false).isOfType(ValueType.TEXT, false) - .column("var43").isText(false).isOfType(ValueType.TEXT, false) - .column("var44").isText(false).isOfType(ValueType.TEXT, false) - .column("var45").isText(false).isOfType(ValueType.TEXT, false) - .column("var46").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var47").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var48").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var49").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var50").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var51").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var52").isText(false).isOfType(ValueType.TEXT, false) - .column("var53").isText(false).isOfType(ValueType.TEXT, false) - .column("var54").isText(false).isOfType(ValueType.TEXT, false) - .column("var55").isText(false).isOfType(ValueType.TEXT, false) - .column("var56").isText(false).isOfType(ValueType.TEXT, false) - .column("var57").isText(false).isOfType(ValueType.TEXT, false) - .column("var58").isText(false).isOfType(ValueType.TEXT, false) - .column("var59").isUUID(false).isOfType(ValueType.UUID, false) - .column("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) - .column("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) + .column("var2").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var3").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var4").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var5").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var6").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var7").isBoolean(false).isOfType(ValueType.BOOLEAN, false) + .column("var8").isBoolean(false).isOfType(ValueType.BOOLEAN, false) + .column("var9").isBoolean(false).isOfType(ValueType.BOOLEAN, false) + .column("var10").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var11").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var12").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var13").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var14").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var15").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var16").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var17").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var18").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var19").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var20").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var21").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var22").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var23").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var24").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var25").isTime(false).isOfType(ValueType.TIME, false) + .column("var26").isDate(false).isOfType(ValueType.DATE, false) + .column("var27").isDateTime(false).isOfType(ValueType.DATE_TIME, false) + .column("var28").isDateTime(false).isOfType(ValueType.DATE_TIME, false) + .column("var29").isDateTime(false).isOfType(ValueType.DATE_TIME, false) + .column("var30").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var31").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var32").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var33").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var34").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var35") + .column("var36").isText(false).isOfType(ValueType.TEXT, false) + .column("var37").isText(false).isOfType(ValueType.TEXT, false) + .column("var38").isText(false).isOfType(ValueType.TEXT, false) + .column("var39").isText(false).isOfType(ValueType.TEXT, false) + .column("var40").isText(false).isOfType(ValueType.TEXT, false) + .column("var41").isText(false).isOfType(ValueType.TEXT, false) + .column("var42").isText(false).isOfType(ValueType.TEXT, false) + .column("var43").isText(false).isOfType(ValueType.TEXT, false) + .column("var44").isText(false).isOfType(ValueType.TEXT, false) + .column("var45").isText(false).isOfType(ValueType.TEXT, false) + .column("var46").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var47").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var48").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var49").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var50").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var51").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var52").isText(false).isOfType(ValueType.TEXT, false) + .column("var53").isText(false).isOfType(ValueType.TEXT, false) + .column("var54").isText(false).isOfType(ValueType.TEXT, false) + .column("var55").isText(false).isOfType(ValueType.TEXT, false) + .column("var56").isText(false).isOfType(ValueType.TEXT, false) + .column("var57").isText(false).isOfType(ValueType.TEXT, false) + .column("var58").isText(false).isOfType(ValueType.TEXT, false) + .column("var59").isUUID(false).isOfType(ValueType.UUID, false) + .column("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) + .column("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) ; assertThat(changes).change() - .column("var1").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var2").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var3").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var4").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var5").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var6").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var7").isBoolean(false).isOfType(ValueType.BOOLEAN, false) - .column("var8").isBoolean(false).isOfType(ValueType.BOOLEAN, false) - .column("var9").isBoolean(false).isOfType(ValueType.BOOLEAN, false) - .column("var10").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var11").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var12").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var13").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var14").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var15").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var16").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var17").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var18").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var19").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var20").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var21").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var22").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var23").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var24").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var25").isTime(false).isOfType(ValueType.TIME, false) - .column("var26").isDate(false).isOfType(ValueType.DATE, false) - .column("var27").isDateTime(false).isOfType(ValueType.DATE_TIME, false) - .column("var28").isDateTime(false).isOfType(ValueType.DATE_TIME, false) - .column("var29").isDateTime(false).isOfType(ValueType.DATE_TIME, false) - .column("var30").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var31").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var32").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var33").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var34").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var35") - .column("var36").isText(false).isOfType(ValueType.TEXT, false) - .column("var37").isText(false).isOfType(ValueType.TEXT, false) - .column("var38").isText(false).isOfType(ValueType.TEXT, false) - .column("var39").isText(false).isOfType(ValueType.TEXT, false) - .column("var40").isText(false).isOfType(ValueType.TEXT, false) - .column("var41").isText(false).isOfType(ValueType.TEXT, false) - .column("var42").isText(false).isOfType(ValueType.TEXT, false) - .column("var43").isText(false).isOfType(ValueType.TEXT, false) - .column("var44").isText(false).isOfType(ValueType.TEXT, false) - .column("var45").isText(false).isOfType(ValueType.TEXT, false) - .column("var46").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var47").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var48").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var49").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var50").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var51").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var52").isText(false).isOfType(ValueType.TEXT, false) - .column("var53").isText(false).isOfType(ValueType.TEXT, false) - .column("var54").isText(false).isOfType(ValueType.TEXT, false) - .column("var55").isText(false).isOfType(ValueType.TEXT, false) - .column("var56").isText(false).isOfType(ValueType.TEXT, false) - .column("var57").isText(false).isOfType(ValueType.TEXT, false) - .column("var58").isText(false).isOfType(ValueType.TEXT, false) - .column("var59").isUUID(false).isOfType(ValueType.UUID, false) - .column("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) - .column("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) + .column("var1").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var2").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var3").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var4").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var5").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var6").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var7").isBoolean(false).isOfType(ValueType.BOOLEAN, false) + .column("var8").isBoolean(false).isOfType(ValueType.BOOLEAN, false) + .column("var9").isBoolean(false).isOfType(ValueType.BOOLEAN, false) + .column("var10").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var11").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var12").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var13").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var14").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var15").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var16").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var17").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var18").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var19").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var20").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var21").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var22").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var23").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var24").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var25").isTime(false).isOfType(ValueType.TIME, false) + .column("var26").isDate(false).isOfType(ValueType.DATE, false) + .column("var27").isDateTime(false).isOfType(ValueType.DATE_TIME, false) + .column("var28").isDateTime(false).isOfType(ValueType.DATE_TIME, false) + .column("var29").isDateTime(false).isOfType(ValueType.DATE_TIME, false) + .column("var30").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var31").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var32").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var33").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var34").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var35") + .column("var36").isText(false).isOfType(ValueType.TEXT, false) + .column("var37").isText(false).isOfType(ValueType.TEXT, false) + .column("var38").isText(false).isOfType(ValueType.TEXT, false) + .column("var39").isText(false).isOfType(ValueType.TEXT, false) + .column("var40").isText(false).isOfType(ValueType.TEXT, false) + .column("var41").isText(false).isOfType(ValueType.TEXT, false) + .column("var42").isText(false).isOfType(ValueType.TEXT, false) + .column("var43").isText(false).isOfType(ValueType.TEXT, false) + .column("var44").isText(false).isOfType(ValueType.TEXT, false) + .column("var45").isText(false).isOfType(ValueType.TEXT, false) + .column("var46").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var47").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var48").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var49").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var50").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var51").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var52").isText(false).isOfType(ValueType.TEXT, false) + .column("var53").isText(false).isOfType(ValueType.TEXT, false) + .column("var54").isText(false).isOfType(ValueType.TEXT, false) + .column("var55").isText(false).isOfType(ValueType.TEXT, false) + .column("var56").isText(false).isOfType(ValueType.TEXT, false) + .column("var57").isText(false).isOfType(ValueType.TEXT, false) + .column("var58").isText(false).isOfType(ValueType.TEXT, false) + .column("var59").isUUID(false).isOfType(ValueType.UUID, false) + .column("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) + .column("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) ; } @@ -695,146 +695,146 @@ public void test_ColumnOfChangeEquality_hasValues() { changes.setEndPointNow(); assertThat(changes).change() - .column("var1").hasValues(1) - .column("var2").hasValues(2, 20) - .column("var3").hasValues(3) - .column("var4").hasValues(4) - .column("var5").hasValues(5) - .column("var6").hasValues(6) - .column("var7").hasValues(true) - .column("var8").hasValues(false) - .column("var9").hasValues(true) - .column("var10").hasValues(7) - .column("var11").hasValues(8) - .column("var12").hasValues(9) - .column("var13").hasValues(10) - .column("var14").hasValues(11) - .column("var15").hasValues(12) - .column("var16").hasValues(13.13) - .column("var17").hasValues(14.14) - .column("var18").hasValues(15.15) - .column("var19").hasValues(16.16) - .column("var20").hasValues(17.17) - .column("var21").hasValues(18.18) - .column("var22").hasValues(19.19) - .column("var23").hasValues(20.20) - .column("var24").hasValues(21.21) - .column("var25").hasValues(TimeValue.of(9, 1)) - .column("var26").hasValues(DateValue.of(2007, 12, 23)) - .column("var27").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .column("var28").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .column("var29").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .column("var30").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var31").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var32").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var33").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var34").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var35").hasValues(Locale.FRENCH) - .column("var36").hasValues("22") - .column("var37").hasValues("23") - .column("var38").hasValues("24") - .column("var39").hasValues("25") - .column("var40").hasValues("26") - .column("var41").hasValues("27") - .column("var42").hasValues("28") - .column("var43").hasValues("29") - .column("var44").hasValues("30") - .column("var45").hasValues("31") - .column("var46").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var47").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var48").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var49").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var50").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var51").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var52").hasValues("32") - .column("var53").hasValues("33") - .column("var54").hasValues("34") - .column("var55").hasValues("35") - .column("var56").hasValues("36") - .column("var57").hasValues("37") - .column("var58").hasValues("38") - .column("var59").hasValues(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")) - .column("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) - .column("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) + .column("var1").hasValues(1) + .column("var2").hasValues(2, 20) + .column("var3").hasValues(3) + .column("var4").hasValues(4) + .column("var5").hasValues(5) + .column("var6").hasValues(6) + .column("var7").hasValues(true) + .column("var8").hasValues(false) + .column("var9").hasValues(true) + .column("var10").hasValues(7) + .column("var11").hasValues(8) + .column("var12").hasValues(9) + .column("var13").hasValues(10) + .column("var14").hasValues(11) + .column("var15").hasValues(12) + .column("var16").hasValues(13.13) + .column("var17").hasValues(14.14) + .column("var18").hasValues(15.15) + .column("var19").hasValues(16.16) + .column("var20").hasValues(17.17) + .column("var21").hasValues(18.18) + .column("var22").hasValues(19.19) + .column("var23").hasValues(20.20) + .column("var24").hasValues(21.21) + .column("var25").hasValues(TimeValue.of(9, 1)) + .column("var26").hasValues(DateValue.of(2007, 12, 23)) + .column("var27").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .column("var28").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .column("var29").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .column("var30").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var31").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var32").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var33").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var34").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var35").hasValues(Locale.FRENCH) + .column("var36").hasValues("22") + .column("var37").hasValues("23") + .column("var38").hasValues("24") + .column("var39").hasValues("25") + .column("var40").hasValues("26") + .column("var41").hasValues("27") + .column("var42").hasValues("28") + .column("var43").hasValues("29") + .column("var44").hasValues("30") + .column("var45").hasValues("31") + .column("var46").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var47").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var48").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var49").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var50").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var51").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var52").hasValues("32") + .column("var53").hasValues("33") + .column("var54").hasValues("34") + .column("var55").hasValues("35") + .column("var56").hasValues("36") + .column("var57").hasValues("37") + .column("var58").hasValues("38") + .column("var59").hasValues(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")) + .column("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) + .column("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) ; assertThat(changes).change() - .column("var1").hasValues(1, 1) - .column("var2").hasValues(2, 20) - .column("var3").hasValues(3, 3) - .column("var4").hasValues(4, 4) - .column("var5").hasValues(5, 5) - .column("var6").hasValues(6, 6) - .column("var7").hasValues(true, true) - .column("var8").hasValues(false, false) - .column("var9").hasValues(true, true) - .column("var10").hasValues(7, 7) - .column("var11").hasValues(8, 8) - .column("var12").hasValues(9, 9) - .column("var13").hasValues(10, 10) - .column("var14").hasValues(11, 11) - .column("var15").hasValues(12, 12) - .column("var16").hasValues(13.13, 13.13) - .column("var17").hasValues(14.14, 14.14) - .column("var18").hasValues(15.15, 15.15) - .column("var19").hasValues(16.16, 16.16) - .column("var20").hasValues(17.17, 17.17) - .column("var21").hasValues(18.18, 18.18) - .column("var22").hasValues(19.19, 19.19) - .column("var23").hasValues(20.20, 20.20) - .column("var24").hasValues(21.21, 21.21) - .column("var25").hasValues(TimeValue.of(9, 1), TimeValue.of(9, 1)) - .column("var26").hasValues(DateValue.of(2007, 12, 23), DateValue.of(2007, 12, 23)) - .column("var27").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .column("var28").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .column("var29").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .column("var30").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var31").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var32").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var33").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var34").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var35").hasValues(Locale.FRENCH, Locale.FRENCH) - .column("var36").hasValues("22", "22") - .column("var37").hasValues("23", "23") - .column("var38").hasValues("24", "24") - .column("var39").hasValues("25", "25") - .column("var40").hasValues("26", "26") - .column("var41").hasValues("27", "27") - .column("var42").hasValues("28", "28") - .column("var43").hasValues("29", "29") - .column("var44").hasValues("30", "30") - .column("var45").hasValues("31", "31") - .column("var46").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var47").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var48").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var49").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var50").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var51").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var52").hasValues("32", "32") - .column("var53").hasValues("33", "33") - .column("var54").hasValues("34", "34") - .column("var55").hasValues("35", "35") - .column("var56").hasValues("36", "36") - .column("var57").hasValues("37", "37") - .column("var58").hasValues("38", "38") - .column("var59").hasValues(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435"), - UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")) - .column("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) - .column("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) + .column("var1").hasValues(1, 1) + .column("var2").hasValues(2, 20) + .column("var3").hasValues(3, 3) + .column("var4").hasValues(4, 4) + .column("var5").hasValues(5, 5) + .column("var6").hasValues(6, 6) + .column("var7").hasValues(true, true) + .column("var8").hasValues(false, false) + .column("var9").hasValues(true, true) + .column("var10").hasValues(7, 7) + .column("var11").hasValues(8, 8) + .column("var12").hasValues(9, 9) + .column("var13").hasValues(10, 10) + .column("var14").hasValues(11, 11) + .column("var15").hasValues(12, 12) + .column("var16").hasValues(13.13, 13.13) + .column("var17").hasValues(14.14, 14.14) + .column("var18").hasValues(15.15, 15.15) + .column("var19").hasValues(16.16, 16.16) + .column("var20").hasValues(17.17, 17.17) + .column("var21").hasValues(18.18, 18.18) + .column("var22").hasValues(19.19, 19.19) + .column("var23").hasValues(20.20, 20.20) + .column("var24").hasValues(21.21, 21.21) + .column("var25").hasValues(TimeValue.of(9, 1), TimeValue.of(9, 1)) + .column("var26").hasValues(DateValue.of(2007, 12, 23), DateValue.of(2007, 12, 23)) + .column("var27").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .column("var28").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .column("var29").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .column("var30").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var31").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var32").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var33").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var34").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var35").hasValues(Locale.FRENCH, Locale.FRENCH) + .column("var36").hasValues("22", "22") + .column("var37").hasValues("23", "23") + .column("var38").hasValues("24", "24") + .column("var39").hasValues("25", "25") + .column("var40").hasValues("26", "26") + .column("var41").hasValues("27", "27") + .column("var42").hasValues("28", "28") + .column("var43").hasValues("29", "29") + .column("var44").hasValues("30", "30") + .column("var45").hasValues("31", "31") + .column("var46").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var47").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var48").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var49").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var50").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var51").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var52").hasValues("32", "32") + .column("var53").hasValues("33", "33") + .column("var54").hasValues("34", "34") + .column("var55").hasValues("35", "35") + .column("var56").hasValues("36", "36") + .column("var57").hasValues("37", "37") + .column("var58").hasValues("38", "38") + .column("var59").hasValues(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435"), + UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")) + .column("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) + .column("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) ; } @@ -847,131 +847,131 @@ public void test_RowEquality_hasValues() { changes.setEndPointNow(); assertThat(table).row() - .hasValues(1, - 20, - 3, - 4, - 5, - 6, - true, - false, - true, - 7, - 8, - 9, - 10, - 11, - 12, - 13.13, - 14.14, - 15.15, - 16.16, - 17.17, - 18.18, - 19.19, - 20.20, - 21.21, - TimeValue.of(9, 1), - DateValue.of(2007, 12, 23), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)), - bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png"), - Locale.FRENCH, - "22", - "23", - "24", - "25", - "26", - "27", - "28", - "29", - "30", - "31", - bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png"), - "32", - "33", - "34", - "35", - "36", - "37", - "38", - UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435"), - null, - null) + .hasValues(1, + 20, + 3, + 4, + 5, + 6, + true, + false, + true, + 7, + 8, + 9, + 10, + 11, + 12, + 13.13, + 14.14, + 15.15, + 16.16, + 17.17, + 18.18, + 19.19, + 20.20, + 21.21, + TimeValue.of(9, 1), + DateValue.of(2007, 12, 23), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)), + bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png"), + Locale.FRENCH, + "22", + "23", + "24", + "25", + "26", + "27", + "28", + "29", + "30", + "31", + bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png"), + "32", + "33", + "34", + "35", + "36", + "37", + "38", + UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435"), + null, + null) ; assertThat(changes).change().rowAtStartPoint() - .hasValues(1, - 2, - 3, - 4, - 5, - 6, - true, - false, - true, - 7, - 8, - 9, - 10, - 11, - 12, - 13.13, - 14.14, - 15.15, - 16.16, - 17.17, - 18.18, - 19.19, - 20.20, - 21.21, - TimeValue.of(9, 1), - DateValue.of(2007, 12, 23), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)), - bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png"), - Locale.FRENCH, - "22", - "23", - "24", - "25", - "26", - "27", - "28", - "29", - "30", - "31", - bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png"), - "32", - "33", - "34", - "35", - "36", - "37", - "38", - UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435"), - null, - null) + .hasValues(1, + 2, + 3, + 4, + 5, + 6, + true, + false, + true, + 7, + 8, + 9, + 10, + 11, + 12, + 13.13, + 14.14, + 15.15, + 16.16, + 17.17, + 18.18, + 19.19, + 20.20, + 21.21, + TimeValue.of(9, 1), + DateValue.of(2007, 12, 23), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)), + bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png"), + Locale.FRENCH, + "22", + "23", + "24", + "25", + "26", + "27", + "28", + "29", + "30", + "31", + bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png"), + "32", + "33", + "34", + "35", + "36", + "37", + "38", + UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435"), + null, + null) ; } @@ -984,131 +984,131 @@ public void test_ValueClass_isOfClass() { changes.setEndPointNow(); assertThat(table).row() - .value("var1").isOfClass(Long.class) - .value("var2").isOfClass(Integer.class) - .value("var3").isOfClass(Integer.class) - .value("var4").isOfClass(Integer.class) - .value("var5").isOfClass(Integer.class) - .value("var6").isOfClass(Integer.class) - .value("var7").isOfClass(Boolean.class) - .value("var8").isOfClass(Boolean.class) - .value("var9").isOfClass(Boolean.class) - .value("var10").isOfClass(Byte.class) - .value("var11").isOfClass(Short.class) - .value("var12").isOfClass(Short.class) - .value("var13").isOfClass(Short.class) - .value("var14").isOfClass(Long.class) - .value("var15").isOfClass(Long.class) - .value("var16").isOfClass(BigDecimal.class) - .value("var17").isOfClass(BigDecimal.class) - .value("var18").isOfClass(BigDecimal.class) - .value("var19").isOfClass(BigDecimal.class) - .value("var20").isOfClass(Double.class) - .value("var21").isOfClass(Double.class) - .value("var22").isOfClass(Double.class) - .value("var23").isOfClass(Float.class) - .value("var24").isOfClass(Float.class) - .value("var25").isOfClass(Time.class) - .value("var26").isOfClass(Date.class) - .value("var27").isOfClass(Timestamp.class) - .value("var28").isOfClass(Timestamp.class) - .value("var29").isOfClass(Timestamp.class) - .value("var30").isOfClass(byte[].class) - .value("var31").isOfClass(byte[].class) - .value("var32").isOfClass(byte[].class) - .value("var33").isOfClass(byte[].class) - .value("var34").isOfClass(byte[].class) - .value("var35").isOfClass(Locale.class) - .value("var36").isOfClass(String.class) - .value("var37").isOfClass(String.class) - .value("var38").isOfClass(String.class) - .value("var39").isOfClass(String.class) - .value("var40").isOfClass(String.class) - .value("var41").isOfClass(String.class) - .value("var42").isOfClass(String.class) - .value("var43").isOfClass(String.class) - .value("var44").isOfClass(String.class) - .value("var45").isOfClass(String.class) - .value("var46").isOfClass(byte[].class) - .value("var47").isOfClass(byte[].class) - .value("var48").isOfClass(byte[].class) - .value("var49").isOfClass(byte[].class) - .value("var50").isOfClass(byte[].class) - .value("var51").isOfClass(byte[].class) - .value("var52").isOfClass(String.class) - .value("var53").isOfClass(String.class) - .value("var54").isOfClass(String.class) - .value("var55").isOfClass(String.class) - .value("var56").isOfClass(String.class) - .value("var57").isOfClass(String.class) - .value("var58").isOfClass(String.class) - .value("var59").isOfClass(UUID.class) - .value("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) - .value("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) + .value("var1").isOfClass(Long.class) + .value("var2").isOfClass(Integer.class) + .value("var3").isOfClass(Integer.class) + .value("var4").isOfClass(Integer.class) + .value("var5").isOfClass(Integer.class) + .value("var6").isOfClass(Integer.class) + .value("var7").isOfClass(Boolean.class) + .value("var8").isOfClass(Boolean.class) + .value("var9").isOfClass(Boolean.class) + .value("var10").isOfClass(Byte.class) + .value("var11").isOfClass(Short.class) + .value("var12").isOfClass(Short.class) + .value("var13").isOfClass(Short.class) + .value("var14").isOfClass(Long.class) + .value("var15").isOfClass(Long.class) + .value("var16").isOfClass(BigDecimal.class) + .value("var17").isOfClass(BigDecimal.class) + .value("var18").isOfClass(BigDecimal.class) + .value("var19").isOfClass(BigDecimal.class) + .value("var20").isOfClass(Double.class) + .value("var21").isOfClass(Double.class) + .value("var22").isOfClass(Double.class) + .value("var23").isOfClass(Float.class) + .value("var24").isOfClass(Float.class) + .value("var25").isOfClass(Time.class) + .value("var26").isOfClass(Date.class) + .value("var27").isOfClass(Timestamp.class) + .value("var28").isOfClass(Timestamp.class) + .value("var29").isOfClass(Timestamp.class) + .value("var30").isOfClass(byte[].class) + .value("var31").isOfClass(byte[].class) + .value("var32").isOfClass(byte[].class) + .value("var33").isOfClass(byte[].class) + .value("var34").isOfClass(byte[].class) + .value("var35").isOfClass(Locale.class) + .value("var36").isOfClass(String.class) + .value("var37").isOfClass(String.class) + .value("var38").isOfClass(String.class) + .value("var39").isOfClass(String.class) + .value("var40").isOfClass(String.class) + .value("var41").isOfClass(String.class) + .value("var42").isOfClass(String.class) + .value("var43").isOfClass(String.class) + .value("var44").isOfClass(String.class) + .value("var45").isOfClass(String.class) + .value("var46").isOfClass(byte[].class) + .value("var47").isOfClass(byte[].class) + .value("var48").isOfClass(byte[].class) + .value("var49").isOfClass(byte[].class) + .value("var50").isOfClass(byte[].class) + .value("var51").isOfClass(byte[].class) + .value("var52").isOfClass(String.class) + .value("var53").isOfClass(String.class) + .value("var54").isOfClass(String.class) + .value("var55").isOfClass(String.class) + .value("var56").isOfClass(String.class) + .value("var57").isOfClass(String.class) + .value("var58").isOfClass(String.class) + .value("var59").isOfClass(UUID.class) + .value("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) + .value("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) ; assertThat(changes).change().rowAtStartPoint() - .value("var1").isOfClass(Long.class) - .value("var2").isOfClass(Integer.class) - .value("var3").isOfClass(Integer.class) - .value("var4").isOfClass(Integer.class) - .value("var5").isOfClass(Integer.class) - .value("var6").isOfClass(Integer.class) - .value("var7").isOfClass(Boolean.class) - .value("var8").isOfClass(Boolean.class) - .value("var9").isOfClass(Boolean.class) - .value("var10").isOfClass(Byte.class) - .value("var11").isOfClass(Short.class) - .value("var12").isOfClass(Short.class) - .value("var13").isOfClass(Short.class) - .value("var14").isOfClass(Long.class) - .value("var15").isOfClass(Long.class) - .value("var16").isOfClass(BigDecimal.class) - .value("var17").isOfClass(BigDecimal.class) - .value("var18").isOfClass(BigDecimal.class) - .value("var19").isOfClass(BigDecimal.class) - .value("var20").isOfClass(Double.class) - .value("var21").isOfClass(Double.class) - .value("var22").isOfClass(Double.class) - .value("var23").isOfClass(Float.class) - .value("var24").isOfClass(Float.class) - .value("var25").isOfClass(Time.class) - .value("var26").isOfClass(Date.class) - .value("var27").isOfClass(Timestamp.class) - .value("var28").isOfClass(Timestamp.class) - .value("var29").isOfClass(Timestamp.class) - .value("var30").isOfClass(byte[].class) - .value("var31").isOfClass(byte[].class) - .value("var32").isOfClass(byte[].class) - .value("var33").isOfClass(byte[].class) - .value("var34").isOfClass(byte[].class) - .value("var35").isOfClass(Locale.class) - .value("var36").isOfClass(String.class) - .value("var37").isOfClass(String.class) - .value("var38").isOfClass(String.class) - .value("var39").isOfClass(String.class) - .value("var40").isOfClass(String.class) - .value("var41").isOfClass(String.class) - .value("var42").isOfClass(String.class) - .value("var43").isOfClass(String.class) - .value("var44").isOfClass(String.class) - .value("var45").isOfClass(String.class) - .value("var46").isOfClass(byte[].class) - .value("var47").isOfClass(byte[].class) - .value("var48").isOfClass(byte[].class) - .value("var49").isOfClass(byte[].class) - .value("var50").isOfClass(byte[].class) - .value("var51").isOfClass(byte[].class) - .value("var52").isOfClass(String.class) - .value("var53").isOfClass(String.class) - .value("var54").isOfClass(String.class) - .value("var55").isOfClass(String.class) - .value("var56").isOfClass(String.class) - .value("var57").isOfClass(String.class) - .value("var58").isOfClass(String.class) - .value("var59").isOfClass(UUID.class) - .value("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) - .value("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) + .value("var1").isOfClass(Long.class) + .value("var2").isOfClass(Integer.class) + .value("var3").isOfClass(Integer.class) + .value("var4").isOfClass(Integer.class) + .value("var5").isOfClass(Integer.class) + .value("var6").isOfClass(Integer.class) + .value("var7").isOfClass(Boolean.class) + .value("var8").isOfClass(Boolean.class) + .value("var9").isOfClass(Boolean.class) + .value("var10").isOfClass(Byte.class) + .value("var11").isOfClass(Short.class) + .value("var12").isOfClass(Short.class) + .value("var13").isOfClass(Short.class) + .value("var14").isOfClass(Long.class) + .value("var15").isOfClass(Long.class) + .value("var16").isOfClass(BigDecimal.class) + .value("var17").isOfClass(BigDecimal.class) + .value("var18").isOfClass(BigDecimal.class) + .value("var19").isOfClass(BigDecimal.class) + .value("var20").isOfClass(Double.class) + .value("var21").isOfClass(Double.class) + .value("var22").isOfClass(Double.class) + .value("var23").isOfClass(Float.class) + .value("var24").isOfClass(Float.class) + .value("var25").isOfClass(Time.class) + .value("var26").isOfClass(Date.class) + .value("var27").isOfClass(Timestamp.class) + .value("var28").isOfClass(Timestamp.class) + .value("var29").isOfClass(Timestamp.class) + .value("var30").isOfClass(byte[].class) + .value("var31").isOfClass(byte[].class) + .value("var32").isOfClass(byte[].class) + .value("var33").isOfClass(byte[].class) + .value("var34").isOfClass(byte[].class) + .value("var35").isOfClass(Locale.class) + .value("var36").isOfClass(String.class) + .value("var37").isOfClass(String.class) + .value("var38").isOfClass(String.class) + .value("var39").isOfClass(String.class) + .value("var40").isOfClass(String.class) + .value("var41").isOfClass(String.class) + .value("var42").isOfClass(String.class) + .value("var43").isOfClass(String.class) + .value("var44").isOfClass(String.class) + .value("var45").isOfClass(String.class) + .value("var46").isOfClass(byte[].class) + .value("var47").isOfClass(byte[].class) + .value("var48").isOfClass(byte[].class) + .value("var49").isOfClass(byte[].class) + .value("var50").isOfClass(byte[].class) + .value("var51").isOfClass(byte[].class) + .value("var52").isOfClass(String.class) + .value("var53").isOfClass(String.class) + .value("var54").isOfClass(String.class) + .value("var55").isOfClass(String.class) + .value("var56").isOfClass(String.class) + .value("var57").isOfClass(String.class) + .value("var58").isOfClass(String.class) + .value("var59").isOfClass(UUID.class) + .value("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) + .value("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) ; } @@ -1121,131 +1121,131 @@ public void test_ValueEquality_isEqualTo() { changes.setEndPointNow(); assertThat(table).row() - .value("var1").isEqualTo(1) - .value("var2").isEqualTo(20) - .value("var3").isEqualTo(3) - .value("var4").isEqualTo(4) - .value("var5").isEqualTo(5) - .value("var6").isEqualTo(6) - .value("var7").isEqualTo(true) - .value("var8").isEqualTo(false) - .value("var9").isEqualTo(true) - .value("var10").isEqualTo(7) - .value("var11").isEqualTo(8) - .value("var12").isEqualTo(9) - .value("var13").isEqualTo(10) - .value("var14").isEqualTo(11) - .value("var15").isEqualTo(12) - .value("var16").isEqualTo(13.13) - .value("var17").isEqualTo(14.14) - .value("var18").isEqualTo(15.15) - .value("var19").isEqualTo(16.16) - .value("var20").isEqualTo(17.17) - .value("var21").isEqualTo(18.18) - .value("var22").isEqualTo(19.19) - .value("var23").isEqualTo(20.20) - .value("var24").isEqualTo(21.21) - .value("var25").isEqualTo(TimeValue.of(9, 1)) - .value("var26").isEqualTo(DateValue.of(2007, 12, 23)) - .value("var27").isEqualTo(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .value("var28").isEqualTo(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .value("var29").isEqualTo(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .value("var30").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var31").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var32").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var33").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var34").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var35").isEqualTo(Locale.FRENCH) - .value("var36").isEqualTo("22") - .value("var37").isEqualTo("23") - .value("var38").isEqualTo("24") - .value("var39").isEqualTo("25") - .value("var40").isEqualTo("26") - .value("var41").isEqualTo("27") - .value("var42").isEqualTo("28") - .value("var43").isEqualTo("29") - .value("var44").isEqualTo("30") - .value("var45").isEqualTo("31") - .value("var46").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var47").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var48").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var49").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var50").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var51").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var52").isEqualTo("32") - .value("var53").isEqualTo("33") - .value("var54").isEqualTo("34") - .value("var55").isEqualTo("35") - .value("var56").isEqualTo("36") - .value("var57").isEqualTo("37") - .value("var58").isEqualTo("38") - .value("var59").isEqualTo(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")) - .value("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) - .value("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) + .value("var1").isEqualTo(1) + .value("var2").isEqualTo(20) + .value("var3").isEqualTo(3) + .value("var4").isEqualTo(4) + .value("var5").isEqualTo(5) + .value("var6").isEqualTo(6) + .value("var7").isEqualTo(true) + .value("var8").isEqualTo(false) + .value("var9").isEqualTo(true) + .value("var10").isEqualTo(7) + .value("var11").isEqualTo(8) + .value("var12").isEqualTo(9) + .value("var13").isEqualTo(10) + .value("var14").isEqualTo(11) + .value("var15").isEqualTo(12) + .value("var16").isEqualTo(13.13) + .value("var17").isEqualTo(14.14) + .value("var18").isEqualTo(15.15) + .value("var19").isEqualTo(16.16) + .value("var20").isEqualTo(17.17) + .value("var21").isEqualTo(18.18) + .value("var22").isEqualTo(19.19) + .value("var23").isEqualTo(20.20) + .value("var24").isEqualTo(21.21) + .value("var25").isEqualTo(TimeValue.of(9, 1)) + .value("var26").isEqualTo(DateValue.of(2007, 12, 23)) + .value("var27").isEqualTo(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .value("var28").isEqualTo(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .value("var29").isEqualTo(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .value("var30").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var31").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var32").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var33").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var34").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var35").isEqualTo(Locale.FRENCH) + .value("var36").isEqualTo("22") + .value("var37").isEqualTo("23") + .value("var38").isEqualTo("24") + .value("var39").isEqualTo("25") + .value("var40").isEqualTo("26") + .value("var41").isEqualTo("27") + .value("var42").isEqualTo("28") + .value("var43").isEqualTo("29") + .value("var44").isEqualTo("30") + .value("var45").isEqualTo("31") + .value("var46").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var47").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var48").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var49").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var50").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var51").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var52").isEqualTo("32") + .value("var53").isEqualTo("33") + .value("var54").isEqualTo("34") + .value("var55").isEqualTo("35") + .value("var56").isEqualTo("36") + .value("var57").isEqualTo("37") + .value("var58").isEqualTo("38") + .value("var59").isEqualTo(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")) + .value("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) + .value("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) ; assertThat(changes).change().rowAtStartPoint() - .value("var1").isEqualTo(1) - .value("var2").isEqualTo(2) - .value("var3").isEqualTo(3) - .value("var4").isEqualTo(4) - .value("var5").isEqualTo(5) - .value("var6").isEqualTo(6) - .value("var7").isEqualTo(true) - .value("var8").isEqualTo(false) - .value("var9").isEqualTo(true) - .value("var10").isEqualTo(7) - .value("var11").isEqualTo(8) - .value("var12").isEqualTo(9) - .value("var13").isEqualTo(10) - .value("var14").isEqualTo(11) - .value("var15").isEqualTo(12) - .value("var16").isEqualTo(13.13) - .value("var17").isEqualTo(14.14) - .value("var18").isEqualTo(15.15) - .value("var19").isEqualTo(16.16) - .value("var20").isEqualTo(17.17) - .value("var21").isEqualTo(18.18) - .value("var22").isEqualTo(19.19) - .value("var23").isEqualTo(20.20) - .value("var24").isEqualTo(21.21) - .value("var25").isEqualTo(TimeValue.of(9, 1)) - .value("var26").isEqualTo(DateValue.of(2007, 12, 23)) - .value("var27").isEqualTo(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .value("var28").isEqualTo(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .value("var29").isEqualTo(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .value("var30").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var31").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var32").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var33").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var34").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var35").isEqualTo(Locale.FRENCH) - .value("var36").isEqualTo("22") - .value("var37").isEqualTo("23") - .value("var38").isEqualTo("24") - .value("var39").isEqualTo("25") - .value("var40").isEqualTo("26") - .value("var41").isEqualTo("27") - .value("var42").isEqualTo("28") - .value("var43").isEqualTo("29") - .value("var44").isEqualTo("30") - .value("var45").isEqualTo("31") - .value("var46").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var47").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var48").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var49").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var50").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var51").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var52").isEqualTo("32") - .value("var53").isEqualTo("33") - .value("var54").isEqualTo("34") - .value("var55").isEqualTo("35") - .value("var56").isEqualTo("36") - .value("var57").isEqualTo("37") - .value("var58").isEqualTo("38") - .value("var59").isEqualTo(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")) - .value("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) - .value("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) + .value("var1").isEqualTo(1) + .value("var2").isEqualTo(2) + .value("var3").isEqualTo(3) + .value("var4").isEqualTo(4) + .value("var5").isEqualTo(5) + .value("var6").isEqualTo(6) + .value("var7").isEqualTo(true) + .value("var8").isEqualTo(false) + .value("var9").isEqualTo(true) + .value("var10").isEqualTo(7) + .value("var11").isEqualTo(8) + .value("var12").isEqualTo(9) + .value("var13").isEqualTo(10) + .value("var14").isEqualTo(11) + .value("var15").isEqualTo(12) + .value("var16").isEqualTo(13.13) + .value("var17").isEqualTo(14.14) + .value("var18").isEqualTo(15.15) + .value("var19").isEqualTo(16.16) + .value("var20").isEqualTo(17.17) + .value("var21").isEqualTo(18.18) + .value("var22").isEqualTo(19.19) + .value("var23").isEqualTo(20.20) + .value("var24").isEqualTo(21.21) + .value("var25").isEqualTo(TimeValue.of(9, 1)) + .value("var26").isEqualTo(DateValue.of(2007, 12, 23)) + .value("var27").isEqualTo(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .value("var28").isEqualTo(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .value("var29").isEqualTo(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .value("var30").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var31").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var32").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var33").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var34").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var35").isEqualTo(Locale.FRENCH) + .value("var36").isEqualTo("22") + .value("var37").isEqualTo("23") + .value("var38").isEqualTo("24") + .value("var39").isEqualTo("25") + .value("var40").isEqualTo("26") + .value("var41").isEqualTo("27") + .value("var42").isEqualTo("28") + .value("var43").isEqualTo("29") + .value("var44").isEqualTo("30") + .value("var45").isEqualTo("31") + .value("var46").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var47").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var48").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var49").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var50").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var51").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var52").isEqualTo("32") + .value("var53").isEqualTo("33") + .value("var54").isEqualTo("34") + .value("var55").isEqualTo("35") + .value("var56").isEqualTo("36") + .value("var57").isEqualTo("37") + .value("var58").isEqualTo("38") + .value("var59").isEqualTo(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")) + .value("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) + .value("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) ; } @@ -1258,131 +1258,131 @@ public void test_ValueNonEquality_isNotEqualTo() { changes.setEndPointNow(); assertThat(table).row() - .value("var1").isNotEqualTo(10) - .value("var2").isNotEqualTo(200) - .value("var3").isNotEqualTo(30) - .value("var4").isNotEqualTo(40) - .value("var5").isNotEqualTo(50) - .value("var6").isNotEqualTo(60) - .value("var7").isNotEqualTo(false) - .value("var8").isNotEqualTo(true) - .value("var9").isNotEqualTo(false) - .value("var10").isNotEqualTo(70) - .value("var11").isNotEqualTo(80) - .value("var12").isNotEqualTo(90) - .value("var13").isNotEqualTo(100) - .value("var14").isNotEqualTo(110) - .value("var15").isNotEqualTo(120) - .value("var16").isNotEqualTo(130.13) - .value("var17").isNotEqualTo(140.14) - .value("var18").isNotEqualTo(150.15) - .value("var19").isNotEqualTo(160.16) - .value("var20").isNotEqualTo(170.17) - .value("var21").isNotEqualTo(180.18) - .value("var22").isNotEqualTo(190.19) - .value("var23").isNotEqualTo(200.20) - .value("var24").isNotEqualTo(210.21) - .value("var25").isNotEqualTo(TimeValue.of(9, 10)) - .value("var26").isNotEqualTo(DateValue.of(2006, 12, 23)) - .value("var27").isNotEqualTo(DateTimeValue.of(DateValue.of(2006, 12, 23), TimeValue.of(9, 1))) - .value("var28").isNotEqualTo(DateTimeValue.of(DateValue.of(2006, 12, 23), TimeValue.of(9, 1))) - .value("var29").isNotEqualTo(DateTimeValue.of(DateValue.of(2006, 12, 23), TimeValue.of(9, 1))) - .value("var30").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var31").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var32").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var33").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var34").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var35").isNotEqualTo(Locale.ENGLISH) - .value("var36").isNotEqualTo("220") - .value("var37").isNotEqualTo("230") - .value("var38").isNotEqualTo("240") - .value("var39").isNotEqualTo("250") - .value("var40").isNotEqualTo("260") - .value("var41").isNotEqualTo("270") - .value("var42").isNotEqualTo("280") - .value("var43").isNotEqualTo("290") - .value("var44").isNotEqualTo("300") - .value("var45").isNotEqualTo("310") - .value("var46").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var47").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var48").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var49").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var50").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var51").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var52").isNotEqualTo("320") - .value("var53").isNotEqualTo("330") - .value("var54").isNotEqualTo("340") - .value("var55").isNotEqualTo("350") - .value("var56").isNotEqualTo("360") - .value("var57").isNotEqualTo("370") - .value("var58").isNotEqualTo("380") - .value("var59").isNotEqualTo(UUID.fromString("16319617-AE95-4087-9264-D3D21BF611B6")) - .value("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) - .value("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) + .value("var1").isNotEqualTo(10) + .value("var2").isNotEqualTo(200) + .value("var3").isNotEqualTo(30) + .value("var4").isNotEqualTo(40) + .value("var5").isNotEqualTo(50) + .value("var6").isNotEqualTo(60) + .value("var7").isNotEqualTo(false) + .value("var8").isNotEqualTo(true) + .value("var9").isNotEqualTo(false) + .value("var10").isNotEqualTo(70) + .value("var11").isNotEqualTo(80) + .value("var12").isNotEqualTo(90) + .value("var13").isNotEqualTo(100) + .value("var14").isNotEqualTo(110) + .value("var15").isNotEqualTo(120) + .value("var16").isNotEqualTo(130.13) + .value("var17").isNotEqualTo(140.14) + .value("var18").isNotEqualTo(150.15) + .value("var19").isNotEqualTo(160.16) + .value("var20").isNotEqualTo(170.17) + .value("var21").isNotEqualTo(180.18) + .value("var22").isNotEqualTo(190.19) + .value("var23").isNotEqualTo(200.20) + .value("var24").isNotEqualTo(210.21) + .value("var25").isNotEqualTo(TimeValue.of(9, 10)) + .value("var26").isNotEqualTo(DateValue.of(2006, 12, 23)) + .value("var27").isNotEqualTo(DateTimeValue.of(DateValue.of(2006, 12, 23), TimeValue.of(9, 1))) + .value("var28").isNotEqualTo(DateTimeValue.of(DateValue.of(2006, 12, 23), TimeValue.of(9, 1))) + .value("var29").isNotEqualTo(DateTimeValue.of(DateValue.of(2006, 12, 23), TimeValue.of(9, 1))) + .value("var30").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var31").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var32").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var33").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var34").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var35").isNotEqualTo(Locale.ENGLISH) + .value("var36").isNotEqualTo("220") + .value("var37").isNotEqualTo("230") + .value("var38").isNotEqualTo("240") + .value("var39").isNotEqualTo("250") + .value("var40").isNotEqualTo("260") + .value("var41").isNotEqualTo("270") + .value("var42").isNotEqualTo("280") + .value("var43").isNotEqualTo("290") + .value("var44").isNotEqualTo("300") + .value("var45").isNotEqualTo("310") + .value("var46").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var47").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var48").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var49").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var50").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var51").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var52").isNotEqualTo("320") + .value("var53").isNotEqualTo("330") + .value("var54").isNotEqualTo("340") + .value("var55").isNotEqualTo("350") + .value("var56").isNotEqualTo("360") + .value("var57").isNotEqualTo("370") + .value("var58").isNotEqualTo("380") + .value("var59").isNotEqualTo(UUID.fromString("16319617-AE95-4087-9264-D3D21BF611B6")) + .value("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) + .value("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) ; assertThat(changes).change().rowAtStartPoint() - .value("var1").isNotEqualTo(10) - .value("var2").isNotEqualTo(20) - .value("var3").isNotEqualTo(30) - .value("var4").isNotEqualTo(40) - .value("var5").isNotEqualTo(50) - .value("var6").isNotEqualTo(60) - .value("var7").isNotEqualTo(false) - .value("var8").isNotEqualTo(true) - .value("var9").isNotEqualTo(false) - .value("var10").isNotEqualTo(70) - .value("var11").isNotEqualTo(80) - .value("var12").isNotEqualTo(90) - .value("var13").isNotEqualTo(100) - .value("var14").isNotEqualTo(110) - .value("var15").isNotEqualTo(120) - .value("var16").isNotEqualTo(130.13) - .value("var17").isNotEqualTo(140.14) - .value("var18").isNotEqualTo(150.15) - .value("var19").isNotEqualTo(160.16) - .value("var20").isNotEqualTo(170.17) - .value("var21").isNotEqualTo(180.18) - .value("var22").isNotEqualTo(190.19) - .value("var23").isNotEqualTo(200.20) - .value("var24").isNotEqualTo(210.21) - .value("var25").isNotEqualTo(TimeValue.of(9, 10)) - .value("var26").isNotEqualTo(DateValue.of(2006, 12, 23)) - .value("var27").isNotEqualTo(DateTimeValue.of(DateValue.of(2006, 12, 23), TimeValue.of(9, 1))) - .value("var28").isNotEqualTo(DateTimeValue.of(DateValue.of(2006, 12, 23), TimeValue.of(9, 1))) - .value("var29").isNotEqualTo(DateTimeValue.of(DateValue.of(2006, 12, 23), TimeValue.of(9, 1))) - .value("var30").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var31").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var32").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var33").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var34").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var35").isNotEqualTo(Locale.ENGLISH) - .value("var36").isNotEqualTo("220") - .value("var37").isNotEqualTo("230") - .value("var38").isNotEqualTo("240") - .value("var39").isNotEqualTo("250") - .value("var40").isNotEqualTo("260") - .value("var41").isNotEqualTo("270") - .value("var42").isNotEqualTo("280") - .value("var43").isNotEqualTo("290") - .value("var44").isNotEqualTo("300") - .value("var45").isNotEqualTo("310") - .value("var46").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var47").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var48").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var49").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var50").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var51").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var52").isNotEqualTo("320") - .value("var53").isNotEqualTo("330") - .value("var54").isNotEqualTo("340") - .value("var55").isNotEqualTo("350") - .value("var56").isNotEqualTo("360") - .value("var57").isNotEqualTo("370") - .value("var58").isNotEqualTo("380") - .value("var59").isNotEqualTo(UUID.fromString("16319617-AE95-4087-9264-D3D21BF611B6")) - .value("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) - .value("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) + .value("var1").isNotEqualTo(10) + .value("var2").isNotEqualTo(20) + .value("var3").isNotEqualTo(30) + .value("var4").isNotEqualTo(40) + .value("var5").isNotEqualTo(50) + .value("var6").isNotEqualTo(60) + .value("var7").isNotEqualTo(false) + .value("var8").isNotEqualTo(true) + .value("var9").isNotEqualTo(false) + .value("var10").isNotEqualTo(70) + .value("var11").isNotEqualTo(80) + .value("var12").isNotEqualTo(90) + .value("var13").isNotEqualTo(100) + .value("var14").isNotEqualTo(110) + .value("var15").isNotEqualTo(120) + .value("var16").isNotEqualTo(130.13) + .value("var17").isNotEqualTo(140.14) + .value("var18").isNotEqualTo(150.15) + .value("var19").isNotEqualTo(160.16) + .value("var20").isNotEqualTo(170.17) + .value("var21").isNotEqualTo(180.18) + .value("var22").isNotEqualTo(190.19) + .value("var23").isNotEqualTo(200.20) + .value("var24").isNotEqualTo(210.21) + .value("var25").isNotEqualTo(TimeValue.of(9, 10)) + .value("var26").isNotEqualTo(DateValue.of(2006, 12, 23)) + .value("var27").isNotEqualTo(DateTimeValue.of(DateValue.of(2006, 12, 23), TimeValue.of(9, 1))) + .value("var28").isNotEqualTo(DateTimeValue.of(DateValue.of(2006, 12, 23), TimeValue.of(9, 1))) + .value("var29").isNotEqualTo(DateTimeValue.of(DateValue.of(2006, 12, 23), TimeValue.of(9, 1))) + .value("var30").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var31").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var32").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var33").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var34").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var35").isNotEqualTo(Locale.ENGLISH) + .value("var36").isNotEqualTo("220") + .value("var37").isNotEqualTo("230") + .value("var38").isNotEqualTo("240") + .value("var39").isNotEqualTo("250") + .value("var40").isNotEqualTo("260") + .value("var41").isNotEqualTo("270") + .value("var42").isNotEqualTo("280") + .value("var43").isNotEqualTo("290") + .value("var44").isNotEqualTo("300") + .value("var45").isNotEqualTo("310") + .value("var46").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var47").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var48").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var49").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var50").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var51").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var52").isNotEqualTo("320") + .value("var53").isNotEqualTo("330") + .value("var54").isNotEqualTo("340") + .value("var55").isNotEqualTo("350") + .value("var56").isNotEqualTo("360") + .value("var57").isNotEqualTo("370") + .value("var58").isNotEqualTo("380") + .value("var59").isNotEqualTo(UUID.fromString("16319617-AE95-4087-9264-D3D21BF611B6")) + .value("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) + .value("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) ; } @@ -1395,131 +1395,131 @@ public void test_ValueType_isOfType() { changes.setEndPointNow(); assertThat(table).row() - .value("var1").isNumber().isOfType(ValueType.NUMBER) - .value("var2").isNumber().isOfType(ValueType.NUMBER) - .value("var3").isNumber().isOfType(ValueType.NUMBER) - .value("var4").isNumber().isOfType(ValueType.NUMBER) - .value("var5").isNumber().isOfType(ValueType.NUMBER) - .value("var6").isNumber().isOfType(ValueType.NUMBER) - .value("var7").isBoolean().isOfType(ValueType.BOOLEAN) - .value("var8").isBoolean().isOfType(ValueType.BOOLEAN) - .value("var9").isBoolean().isOfType(ValueType.BOOLEAN) - .value("var10").isNumber().isOfType(ValueType.NUMBER) - .value("var11").isNumber().isOfType(ValueType.NUMBER) - .value("var12").isNumber().isOfType(ValueType.NUMBER) - .value("var13").isNumber().isOfType(ValueType.NUMBER) - .value("var14").isNumber().isOfType(ValueType.NUMBER) - .value("var15").isNumber().isOfType(ValueType.NUMBER) - .value("var16").isNumber().isOfType(ValueType.NUMBER) - .value("var17").isNumber().isOfType(ValueType.NUMBER) - .value("var18").isNumber().isOfType(ValueType.NUMBER) - .value("var19").isNumber().isOfType(ValueType.NUMBER) - .value("var20").isNumber().isOfType(ValueType.NUMBER) - .value("var21").isNumber().isOfType(ValueType.NUMBER) - .value("var22").isNumber().isOfType(ValueType.NUMBER) - .value("var23").isNumber().isOfType(ValueType.NUMBER) - .value("var24").isNumber().isOfType(ValueType.NUMBER) - .value("var25").isTime().isOfType(ValueType.TIME) - .value("var26").isDate().isOfType(ValueType.DATE) - .value("var27").isDateTime().isOfType(ValueType.DATE_TIME) - .value("var28").isDateTime().isOfType(ValueType.DATE_TIME) - .value("var29").isDateTime().isOfType(ValueType.DATE_TIME) - .value("var30").isBytes().isOfType(ValueType.BYTES) - .value("var31").isBytes().isOfType(ValueType.BYTES) - .value("var32").isBytes().isOfType(ValueType.BYTES) - .value("var33").isBytes().isOfType(ValueType.BYTES) - .value("var34").isBytes().isOfType(ValueType.BYTES) - .value("var35") - .value("var36").isText().isOfType(ValueType.TEXT) - .value("var37").isText().isOfType(ValueType.TEXT) - .value("var38").isText().isOfType(ValueType.TEXT) - .value("var39").isText().isOfType(ValueType.TEXT) - .value("var40").isText().isOfType(ValueType.TEXT) - .value("var41").isText().isOfType(ValueType.TEXT) - .value("var42").isText().isOfType(ValueType.TEXT) - .value("var43").isText().isOfType(ValueType.TEXT) - .value("var44").isText().isOfType(ValueType.TEXT) - .value("var45").isText().isOfType(ValueType.TEXT) - .value("var46").isBytes().isOfType(ValueType.BYTES) - .value("var47").isBytes().isOfType(ValueType.BYTES) - .value("var48").isBytes().isOfType(ValueType.BYTES) - .value("var49").isBytes().isOfType(ValueType.BYTES) - .value("var50").isBytes().isOfType(ValueType.BYTES) - .value("var51").isBytes().isOfType(ValueType.BYTES) - .value("var52").isText().isOfType(ValueType.TEXT) - .value("var53").isText().isOfType(ValueType.TEXT) - .value("var54").isText().isOfType(ValueType.TEXT) - .value("var55").isText().isOfType(ValueType.TEXT) - .value("var56").isText().isOfType(ValueType.TEXT) - .value("var57").isText().isOfType(ValueType.TEXT) - .value("var58").isText().isOfType(ValueType.TEXT) - .value("var59").isUUID().isOfType(ValueType.UUID) - .value("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) - .value("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) + .value("var1").isNumber().isOfType(ValueType.NUMBER) + .value("var2").isNumber().isOfType(ValueType.NUMBER) + .value("var3").isNumber().isOfType(ValueType.NUMBER) + .value("var4").isNumber().isOfType(ValueType.NUMBER) + .value("var5").isNumber().isOfType(ValueType.NUMBER) + .value("var6").isNumber().isOfType(ValueType.NUMBER) + .value("var7").isBoolean().isOfType(ValueType.BOOLEAN) + .value("var8").isBoolean().isOfType(ValueType.BOOLEAN) + .value("var9").isBoolean().isOfType(ValueType.BOOLEAN) + .value("var10").isNumber().isOfType(ValueType.NUMBER) + .value("var11").isNumber().isOfType(ValueType.NUMBER) + .value("var12").isNumber().isOfType(ValueType.NUMBER) + .value("var13").isNumber().isOfType(ValueType.NUMBER) + .value("var14").isNumber().isOfType(ValueType.NUMBER) + .value("var15").isNumber().isOfType(ValueType.NUMBER) + .value("var16").isNumber().isOfType(ValueType.NUMBER) + .value("var17").isNumber().isOfType(ValueType.NUMBER) + .value("var18").isNumber().isOfType(ValueType.NUMBER) + .value("var19").isNumber().isOfType(ValueType.NUMBER) + .value("var20").isNumber().isOfType(ValueType.NUMBER) + .value("var21").isNumber().isOfType(ValueType.NUMBER) + .value("var22").isNumber().isOfType(ValueType.NUMBER) + .value("var23").isNumber().isOfType(ValueType.NUMBER) + .value("var24").isNumber().isOfType(ValueType.NUMBER) + .value("var25").isTime().isOfType(ValueType.TIME) + .value("var26").isDate().isOfType(ValueType.DATE) + .value("var27").isDateTime().isOfType(ValueType.DATE_TIME) + .value("var28").isDateTime().isOfType(ValueType.DATE_TIME) + .value("var29").isDateTime().isOfType(ValueType.DATE_TIME) + .value("var30").isBytes().isOfType(ValueType.BYTES) + .value("var31").isBytes().isOfType(ValueType.BYTES) + .value("var32").isBytes().isOfType(ValueType.BYTES) + .value("var33").isBytes().isOfType(ValueType.BYTES) + .value("var34").isBytes().isOfType(ValueType.BYTES) + .value("var35") + .value("var36").isText().isOfType(ValueType.TEXT) + .value("var37").isText().isOfType(ValueType.TEXT) + .value("var38").isText().isOfType(ValueType.TEXT) + .value("var39").isText().isOfType(ValueType.TEXT) + .value("var40").isText().isOfType(ValueType.TEXT) + .value("var41").isText().isOfType(ValueType.TEXT) + .value("var42").isText().isOfType(ValueType.TEXT) + .value("var43").isText().isOfType(ValueType.TEXT) + .value("var44").isText().isOfType(ValueType.TEXT) + .value("var45").isText().isOfType(ValueType.TEXT) + .value("var46").isBytes().isOfType(ValueType.BYTES) + .value("var47").isBytes().isOfType(ValueType.BYTES) + .value("var48").isBytes().isOfType(ValueType.BYTES) + .value("var49").isBytes().isOfType(ValueType.BYTES) + .value("var50").isBytes().isOfType(ValueType.BYTES) + .value("var51").isBytes().isOfType(ValueType.BYTES) + .value("var52").isText().isOfType(ValueType.TEXT) + .value("var53").isText().isOfType(ValueType.TEXT) + .value("var54").isText().isOfType(ValueType.TEXT) + .value("var55").isText().isOfType(ValueType.TEXT) + .value("var56").isText().isOfType(ValueType.TEXT) + .value("var57").isText().isOfType(ValueType.TEXT) + .value("var58").isText().isOfType(ValueType.TEXT) + .value("var59").isUUID().isOfType(ValueType.UUID) + .value("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) + .value("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) ; assertThat(changes).change().rowAtStartPoint() - .value("var1").isNumber().isOfType(ValueType.NUMBER) - .value("var2").isNumber().isOfType(ValueType.NUMBER) - .value("var3").isNumber().isOfType(ValueType.NUMBER) - .value("var4").isNumber().isOfType(ValueType.NUMBER) - .value("var5").isNumber().isOfType(ValueType.NUMBER) - .value("var6").isNumber().isOfType(ValueType.NUMBER) - .value("var7").isBoolean().isOfType(ValueType.BOOLEAN) - .value("var8").isBoolean().isOfType(ValueType.BOOLEAN) - .value("var9").isBoolean().isOfType(ValueType.BOOLEAN) - .value("var10").isNumber().isOfType(ValueType.NUMBER) - .value("var11").isNumber().isOfType(ValueType.NUMBER) - .value("var12").isNumber().isOfType(ValueType.NUMBER) - .value("var13").isNumber().isOfType(ValueType.NUMBER) - .value("var14").isNumber().isOfType(ValueType.NUMBER) - .value("var15").isNumber().isOfType(ValueType.NUMBER) - .value("var16").isNumber().isOfType(ValueType.NUMBER) - .value("var17").isNumber().isOfType(ValueType.NUMBER) - .value("var18").isNumber().isOfType(ValueType.NUMBER) - .value("var19").isNumber().isOfType(ValueType.NUMBER) - .value("var20").isNumber().isOfType(ValueType.NUMBER) - .value("var21").isNumber().isOfType(ValueType.NUMBER) - .value("var22").isNumber().isOfType(ValueType.NUMBER) - .value("var23").isNumber().isOfType(ValueType.NUMBER) - .value("var24").isNumber().isOfType(ValueType.NUMBER) - .value("var25").isTime().isOfType(ValueType.TIME) - .value("var26").isDate().isOfType(ValueType.DATE) - .value("var27").isDateTime().isOfType(ValueType.DATE_TIME) - .value("var28").isDateTime().isOfType(ValueType.DATE_TIME) - .value("var29").isDateTime().isOfType(ValueType.DATE_TIME) - .value("var30").isBytes().isOfType(ValueType.BYTES) - .value("var31").isBytes().isOfType(ValueType.BYTES) - .value("var32").isBytes().isOfType(ValueType.BYTES) - .value("var33").isBytes().isOfType(ValueType.BYTES) - .value("var34").isBytes().isOfType(ValueType.BYTES) - .value("var35") - .value("var36").isText().isOfType(ValueType.TEXT) - .value("var37").isText().isOfType(ValueType.TEXT) - .value("var38").isText().isOfType(ValueType.TEXT) - .value("var39").isText().isOfType(ValueType.TEXT) - .value("var40").isText().isOfType(ValueType.TEXT) - .value("var41").isText().isOfType(ValueType.TEXT) - .value("var42").isText().isOfType(ValueType.TEXT) - .value("var43").isText().isOfType(ValueType.TEXT) - .value("var44").isText().isOfType(ValueType.TEXT) - .value("var45").isText().isOfType(ValueType.TEXT) - .value("var46").isBytes().isOfType(ValueType.BYTES) - .value("var47").isBytes().isOfType(ValueType.BYTES) - .value("var48").isBytes().isOfType(ValueType.BYTES) - .value("var49").isBytes().isOfType(ValueType.BYTES) - .value("var50").isBytes().isOfType(ValueType.BYTES) - .value("var51").isBytes().isOfType(ValueType.BYTES) - .value("var52").isText().isOfType(ValueType.TEXT) - .value("var53").isText().isOfType(ValueType.TEXT) - .value("var54").isText().isOfType(ValueType.TEXT) - .value("var55").isText().isOfType(ValueType.TEXT) - .value("var56").isText().isOfType(ValueType.TEXT) - .value("var57").isText().isOfType(ValueType.TEXT) - .value("var58").isText().isOfType(ValueType.TEXT) - .value("var59").isUUID().isOfType(ValueType.UUID) - .value("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) - .value("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) + .value("var1").isNumber().isOfType(ValueType.NUMBER) + .value("var2").isNumber().isOfType(ValueType.NUMBER) + .value("var3").isNumber().isOfType(ValueType.NUMBER) + .value("var4").isNumber().isOfType(ValueType.NUMBER) + .value("var5").isNumber().isOfType(ValueType.NUMBER) + .value("var6").isNumber().isOfType(ValueType.NUMBER) + .value("var7").isBoolean().isOfType(ValueType.BOOLEAN) + .value("var8").isBoolean().isOfType(ValueType.BOOLEAN) + .value("var9").isBoolean().isOfType(ValueType.BOOLEAN) + .value("var10").isNumber().isOfType(ValueType.NUMBER) + .value("var11").isNumber().isOfType(ValueType.NUMBER) + .value("var12").isNumber().isOfType(ValueType.NUMBER) + .value("var13").isNumber().isOfType(ValueType.NUMBER) + .value("var14").isNumber().isOfType(ValueType.NUMBER) + .value("var15").isNumber().isOfType(ValueType.NUMBER) + .value("var16").isNumber().isOfType(ValueType.NUMBER) + .value("var17").isNumber().isOfType(ValueType.NUMBER) + .value("var18").isNumber().isOfType(ValueType.NUMBER) + .value("var19").isNumber().isOfType(ValueType.NUMBER) + .value("var20").isNumber().isOfType(ValueType.NUMBER) + .value("var21").isNumber().isOfType(ValueType.NUMBER) + .value("var22").isNumber().isOfType(ValueType.NUMBER) + .value("var23").isNumber().isOfType(ValueType.NUMBER) + .value("var24").isNumber().isOfType(ValueType.NUMBER) + .value("var25").isTime().isOfType(ValueType.TIME) + .value("var26").isDate().isOfType(ValueType.DATE) + .value("var27").isDateTime().isOfType(ValueType.DATE_TIME) + .value("var28").isDateTime().isOfType(ValueType.DATE_TIME) + .value("var29").isDateTime().isOfType(ValueType.DATE_TIME) + .value("var30").isBytes().isOfType(ValueType.BYTES) + .value("var31").isBytes().isOfType(ValueType.BYTES) + .value("var32").isBytes().isOfType(ValueType.BYTES) + .value("var33").isBytes().isOfType(ValueType.BYTES) + .value("var34").isBytes().isOfType(ValueType.BYTES) + .value("var35") + .value("var36").isText().isOfType(ValueType.TEXT) + .value("var37").isText().isOfType(ValueType.TEXT) + .value("var38").isText().isOfType(ValueType.TEXT) + .value("var39").isText().isOfType(ValueType.TEXT) + .value("var40").isText().isOfType(ValueType.TEXT) + .value("var41").isText().isOfType(ValueType.TEXT) + .value("var42").isText().isOfType(ValueType.TEXT) + .value("var43").isText().isOfType(ValueType.TEXT) + .value("var44").isText().isOfType(ValueType.TEXT) + .value("var45").isText().isOfType(ValueType.TEXT) + .value("var46").isBytes().isOfType(ValueType.BYTES) + .value("var47").isBytes().isOfType(ValueType.BYTES) + .value("var48").isBytes().isOfType(ValueType.BYTES) + .value("var49").isBytes().isOfType(ValueType.BYTES) + .value("var50").isBytes().isOfType(ValueType.BYTES) + .value("var51").isBytes().isOfType(ValueType.BYTES) + .value("var52").isText().isOfType(ValueType.TEXT) + .value("var53").isText().isOfType(ValueType.TEXT) + .value("var54").isText().isOfType(ValueType.TEXT) + .value("var55").isText().isOfType(ValueType.TEXT) + .value("var56").isText().isOfType(ValueType.TEXT) + .value("var57").isText().isOfType(ValueType.TEXT) + .value("var58").isText().isOfType(ValueType.TEXT) + .value("var59").isUUID().isOfType(ValueType.UUID) + .value("var60") // ARRAY is not implemented (no idea of the goal so wait a issue from user) + .value("var61") // GEOMETRY is not implemented (no idea of the goal so wait a issue from user) ; } diff --git a/src/test/java/org/assertj/db/database/h2/ReservedH2Configuration.java b/src/test/java/org/assertj/db/database/h2/ReservedH2Configuration.java index bec85aa2..a85b3d34 100644 --- a/src/test/java/org/assertj/db/database/h2/ReservedH2Configuration.java +++ b/src/test/java/org/assertj/db/database/h2/ReservedH2Configuration.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.database.h2; @@ -23,9 +23,8 @@ /** * Provides the configuration for the tests with reserved names in SQL structure. - * + * * @author Régis Pouiller - * */ @Configuration public class ReservedH2Configuration { @@ -33,7 +32,7 @@ public class ReservedH2Configuration { @Bean public DataSource dataSource() { return new EmbeddedDatabaseBuilder().setName("testReservedH2").setType(EmbeddedDatabaseType.H2).addScript("schemaReservedH2.sql") - .build(); + .build(); } @Bean diff --git a/src/test/java/org/assertj/db/database/h2/ReservedH2DataBase_Test.java b/src/test/java/org/assertj/db/database/h2/ReservedH2DataBase_Test.java index 9380199d..4006dbec 100644 --- a/src/test/java/org/assertj/db/database/h2/ReservedH2DataBase_Test.java +++ b/src/test/java/org/assertj/db/database/h2/ReservedH2DataBase_Test.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.database.h2; @@ -71,7 +71,7 @@ public void test_schema_for_source() throws SQLException { public void test_tables_for_data_source() throws SQLException { try (Connection connection = dataSource.getConnection()) { DatabaseMetaData databaseMetaData = connection.getMetaData(); - ResultSet resultSet = databaseMetaData.getTables("TESTRESERVEDH2", null, null, new String[] { "TABLE" }); + ResultSet resultSet = databaseMetaData.getTables("TESTRESERVEDH2", null, null, new String[]{"TABLE"}); assertThat(resultSet.next()).isTrue(); assertThat(resultSet.getString("TABLE_NAME")).isEqualTo("GROUP"); assertThat(resultSet.next()).isTrue(); @@ -84,7 +84,7 @@ public void test_tables_for_data_source() throws SQLException { public void test_tables_for_source() throws SQLException { try (Connection connection = DriverManager.getConnection(URL, USER, PASSWORD)) { DatabaseMetaData databaseMetaData = connection.getMetaData(); - ResultSet resultSet = databaseMetaData.getTables("TESTRESERVEDH2", null, null, new String[] { "TABLE" }); + ResultSet resultSet = databaseMetaData.getTables("TESTRESERVEDH2", null, null, new String[]{"TABLE"}); assertThat(resultSet.next()).isTrue(); assertThat(resultSet.getString("TABLE_NAME")).isEqualTo("GROUP"); assertThat(resultSet.next()).isTrue(); diff --git a/src/test/java/org/assertj/db/database/h2/ReservedH2Database_DataSource_DDD_Test.java b/src/test/java/org/assertj/db/database/h2/ReservedH2Database_DataSource_DDD_Test.java index a0506b0f..16f93ae6 100644 --- a/src/test/java/org/assertj/db/database/h2/ReservedH2Database_DataSource_DDD_Test.java +++ b/src/test/java/org/assertj/db/database/h2/ReservedH2Database_DataSource_DDD_Test.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.database.h2; @@ -67,33 +67,33 @@ public void test_ColumnName_hasColumnName() { changes2.setEndPointNow(); assertThat(table1) - .column().hasColumnName("read") - .column().hasColumnName("by") - .column().hasColumnName("select") - .column().hasColumnName("from") - .column().hasColumnName("where") - .column().hasColumnName("order") + .column().hasColumnName("read") + .column().hasColumnName("by") + .column().hasColumnName("select") + .column().hasColumnName("from") + .column().hasColumnName("where") + .column().hasColumnName("order") ; assertThat(changes1).change() - .column().hasColumnName("read") - .column().hasColumnName("by") - .column().hasColumnName("select") - .column().hasColumnName("from") - .column().hasColumnName("where") - .column().hasColumnName("order") + .column().hasColumnName("read") + .column().hasColumnName("by") + .column().hasColumnName("select") + .column().hasColumnName("from") + .column().hasColumnName("where") + .column().hasColumnName("order") ; assertThat(table2) - .column().hasColumnName("primary key") - .column().hasColumnName("column name") - .column().hasColumnName("test%test") + .column().hasColumnName("primary key") + .column().hasColumnName("column name") + .column().hasColumnName("test%test") ; assertThat(changes2).change() - .column().hasColumnName("primary key") - .column().hasColumnName("column name") - .column().hasColumnName("test%test") + .column().hasColumnName("primary key") + .column().hasColumnName("column name") + .column().hasColumnName("test%test") ; } @@ -101,13 +101,13 @@ public void test_ColumnName_hasColumnName() { @NeedReload public void test_ColumnName_hasColumnName_with_columns_to_check() { Table table1 = new Table(dataSource, "group", '`', '`') - .setColumnsToCheck(new String[] { - "read", "by", "select", "from" - }); + .setColumnsToCheck(new String[]{ + "read", "by", "select", "from" + }); Table table2 = new Table(dataSource, "two words", '`', '`') - .setColumnsToCheck(new String[] { - "primary key", "column name", "test%test" - }); + .setColumnsToCheck(new String[]{ + "primary key", "column name", "test%test" + }); Changes changes1 = new Changes(table1).setStartPointNow(); Changes changes2 = new Changes(table2).setStartPointNow(); update(); @@ -115,29 +115,29 @@ public void test_ColumnName_hasColumnName_with_columns_to_check() { changes2.setEndPointNow(); assertThat(table1) - .column().hasColumnName("read") - .column().hasColumnName("by") - .column().hasColumnName("select") - .column().hasColumnName("from") + .column().hasColumnName("read") + .column().hasColumnName("by") + .column().hasColumnName("select") + .column().hasColumnName("from") ; assertThat(changes1).change() - .column().hasColumnName("read") - .column().hasColumnName("by") - .column().hasColumnName("select") - .column().hasColumnName("from") + .column().hasColumnName("read") + .column().hasColumnName("by") + .column().hasColumnName("select") + .column().hasColumnName("from") ; assertThat(table2) - .column().hasColumnName("primary key") - .column().hasColumnName("column name") - .column().hasColumnName("test%test") + .column().hasColumnName("primary key") + .column().hasColumnName("column name") + .column().hasColumnName("test%test") ; assertThat(changes2).change() - .column().hasColumnName("primary key") - .column().hasColumnName("column name") - .column().hasColumnName("test%test") + .column().hasColumnName("primary key") + .column().hasColumnName("column name") + .column().hasColumnName("test%test") ; } @@ -145,13 +145,13 @@ public void test_ColumnName_hasColumnName_with_columns_to_check() { @NeedReload public void test_ColumnName_hasColumnName_with_columns_to_exclude() { Table table1 = new Table(dataSource, "group", '`', '`') - .setColumnsToExclude(new String[] { - "read", "by", "from" - }); + .setColumnsToExclude(new String[]{ + "read", "by", "from" + }); Table table2 = new Table(dataSource, "two words", '`', '`') - .setColumnsToExclude(new String[] { - "column name" - }); + .setColumnsToExclude(new String[]{ + "column name" + }); Changes changes1 = new Changes(table1).setStartPointNow(); Changes changes2 = new Changes(table2).setStartPointNow(); update(); @@ -159,25 +159,25 @@ public void test_ColumnName_hasColumnName_with_columns_to_exclude() { changes2.setEndPointNow(); assertThat(table1) - .column().hasColumnName("select") - .column().hasColumnName("where") - .column().hasColumnName("order") + .column().hasColumnName("select") + .column().hasColumnName("where") + .column().hasColumnName("order") ; assertThat(changes1).change() - .column().hasColumnName("select") - .column().hasColumnName("where") - .column().hasColumnName("order") + .column().hasColumnName("select") + .column().hasColumnName("where") + .column().hasColumnName("order") ; assertThat(table2) - .column().hasColumnName("primary key") - .column().hasColumnName("test%test") + .column().hasColumnName("primary key") + .column().hasColumnName("test%test") ; assertThat(changes2).change() - .column().hasColumnName("primary key") - .column().hasColumnName("test%test") + .column().hasColumnName("primary key") + .column().hasColumnName("test%test") ; } @@ -185,13 +185,13 @@ public void test_ColumnName_hasColumnName_with_columns_to_exclude() { @NeedReload public void test_ColumnName_hasColumnName_with_order() { Table table1 = new Table(dataSource, "group", '`', '`') - .setColumnsToOrder(new Order[] { - Order.asc("where") - }); + .setColumnsToOrder(new Order[]{ + Order.asc("where") + }); Table table2 = new Table(dataSource, "two words", '`', '`') - .setColumnsToOrder(new Order[] { - Order.asc("primary key") - }); + .setColumnsToOrder(new Order[]{ + Order.asc("primary key") + }); Changes changes1 = new Changes(table1).setStartPointNow(); Changes changes2 = new Changes(table2).setStartPointNow(); update(); @@ -199,33 +199,33 @@ public void test_ColumnName_hasColumnName_with_order() { changes2.setEndPointNow(); assertThat(table1) - .column().hasColumnName("read") - .column().hasColumnName("by") - .column().hasColumnName("select") - .column().hasColumnName("from") - .column().hasColumnName("where") - .column().hasColumnName("order") + .column().hasColumnName("read") + .column().hasColumnName("by") + .column().hasColumnName("select") + .column().hasColumnName("from") + .column().hasColumnName("where") + .column().hasColumnName("order") ; assertThat(changes1).change() - .column().hasColumnName("read") - .column().hasColumnName("by") - .column().hasColumnName("select") - .column().hasColumnName("from") - .column().hasColumnName("where") - .column().hasColumnName("order") + .column().hasColumnName("read") + .column().hasColumnName("by") + .column().hasColumnName("select") + .column().hasColumnName("from") + .column().hasColumnName("where") + .column().hasColumnName("order") ; assertThat(table2) - .column().hasColumnName("primary key") - .column().hasColumnName("column name") - .column().hasColumnName("test%test") + .column().hasColumnName("primary key") + .column().hasColumnName("column name") + .column().hasColumnName("test%test") ; assertThat(changes2).change() - .column().hasColumnName("primary key") - .column().hasColumnName("column name") - .column().hasColumnName("test%test") + .column().hasColumnName("primary key") + .column().hasColumnName("column name") + .column().hasColumnName("test%test") ; } diff --git a/src/test/java/org/assertj/db/database/h2/ReservedH2Database_DataSource_NSNSNS_Test.java b/src/test/java/org/assertj/db/database/h2/ReservedH2Database_DataSource_NSNSNS_Test.java index 0b932d57..3723d07d 100644 --- a/src/test/java/org/assertj/db/database/h2/ReservedH2Database_DataSource_NSNSNS_Test.java +++ b/src/test/java/org/assertj/db/database/h2/ReservedH2Database_DataSource_NSNSNS_Test.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.database.h2; @@ -66,33 +66,33 @@ public void test_ColumnName_hasColumnName() { changes2.setEndPointNow(); assertThat(table1) - .column().hasColumnName("READ") - .column().hasColumnName("BY") - .column().hasColumnName("SELECT") - .column().hasColumnName("FROM") - .column().hasColumnName("WHERE") - .column().hasColumnName("ORDER") + .column().hasColumnName("READ") + .column().hasColumnName("BY") + .column().hasColumnName("SELECT") + .column().hasColumnName("FROM") + .column().hasColumnName("WHERE") + .column().hasColumnName("ORDER") ; assertThat(changes1).change() - .column().hasColumnName("READ") - .column().hasColumnName("BY") - .column().hasColumnName("SELECT") - .column().hasColumnName("FROM") - .column().hasColumnName("WHERE") - .column().hasColumnName("ORDER") + .column().hasColumnName("READ") + .column().hasColumnName("BY") + .column().hasColumnName("SELECT") + .column().hasColumnName("FROM") + .column().hasColumnName("WHERE") + .column().hasColumnName("ORDER") ; assertThat(table2) - .column().hasColumnName("PRIMARY KEY") - .column().hasColumnName("COLUMN NAME") - .column().hasColumnName("TEST%TEST") + .column().hasColumnName("PRIMARY KEY") + .column().hasColumnName("COLUMN NAME") + .column().hasColumnName("TEST%TEST") ; assertThat(changes2).change() - .column().hasColumnName("PRIMARY KEY") - .column().hasColumnName("COLUMN NAME") - .column().hasColumnName("TEST%TEST") + .column().hasColumnName("PRIMARY KEY") + .column().hasColumnName("COLUMN NAME") + .column().hasColumnName("TEST%TEST") ; } @@ -100,13 +100,13 @@ public void test_ColumnName_hasColumnName() { @NeedReload public void test_ColumnName_hasColumnName_with_columns_to_check() { Table table1 = new Table(dataSource, "GROUP", '`', '`') - .setColumnsToCheck(new String[] { - "READ", "BY", "SELECT", "FROM" - }); + .setColumnsToCheck(new String[]{ + "READ", "BY", "SELECT", "FROM" + }); Table table2 = new Table(dataSource, "TWO WORDS", '`', '`') - .setColumnsToCheck(new String[] { - "PRIMARY KEY", "COLUMN NAME", "TEST%TEST" - }); + .setColumnsToCheck(new String[]{ + "PRIMARY KEY", "COLUMN NAME", "TEST%TEST" + }); Changes changes1 = new Changes(table1).setStartPointNow(); Changes changes2 = new Changes(table2).setStartPointNow(); update(); @@ -114,29 +114,29 @@ public void test_ColumnName_hasColumnName_with_columns_to_check() { changes2.setEndPointNow(); assertThat(table1) - .column().hasColumnName("READ") - .column().hasColumnName("BY") - .column().hasColumnName("SELECT") - .column().hasColumnName("FROM") + .column().hasColumnName("READ") + .column().hasColumnName("BY") + .column().hasColumnName("SELECT") + .column().hasColumnName("FROM") ; assertThat(changes1).change() - .column().hasColumnName("READ") - .column().hasColumnName("BY") - .column().hasColumnName("SELECT") - .column().hasColumnName("FROM") + .column().hasColumnName("READ") + .column().hasColumnName("BY") + .column().hasColumnName("SELECT") + .column().hasColumnName("FROM") ; assertThat(table2) - .column().hasColumnName("PRIMARY KEY") - .column().hasColumnName("COLUMN NAME") - .column().hasColumnName("TEST%TEST") + .column().hasColumnName("PRIMARY KEY") + .column().hasColumnName("COLUMN NAME") + .column().hasColumnName("TEST%TEST") ; assertThat(changes2).change() - .column().hasColumnName("PRIMARY KEY") - .column().hasColumnName("COLUMN NAME") - .column().hasColumnName("TEST%TEST") + .column().hasColumnName("PRIMARY KEY") + .column().hasColumnName("COLUMN NAME") + .column().hasColumnName("TEST%TEST") ; } @@ -144,13 +144,13 @@ public void test_ColumnName_hasColumnName_with_columns_to_check() { @NeedReload public void test_ColumnName_hasColumnName_with_columns_to_exclude() { Table table1 = new Table(dataSource, "GROUP", '`', '`') - .setColumnsToExclude(new String[] { - "READ", "BY", "FROM" - }); + .setColumnsToExclude(new String[]{ + "READ", "BY", "FROM" + }); Table table2 = new Table(dataSource, "TWO WORDS", '`', '`') - .setColumnsToExclude(new String[] { - "COLUMN NAME" - }); + .setColumnsToExclude(new String[]{ + "COLUMN NAME" + }); Changes changes1 = new Changes(table1).setStartPointNow(); Changes changes2 = new Changes(table2).setStartPointNow(); update(); @@ -158,25 +158,25 @@ public void test_ColumnName_hasColumnName_with_columns_to_exclude() { changes2.setEndPointNow(); assertThat(table1) - .column().hasColumnName("SELECT") - .column().hasColumnName("WHERE") - .column().hasColumnName("ORDER") + .column().hasColumnName("SELECT") + .column().hasColumnName("WHERE") + .column().hasColumnName("ORDER") ; assertThat(changes1).change() - .column().hasColumnName("SELECT") - .column().hasColumnName("WHERE") - .column().hasColumnName("ORDER") + .column().hasColumnName("SELECT") + .column().hasColumnName("WHERE") + .column().hasColumnName("ORDER") ; assertThat(table2) - .column().hasColumnName("PRIMARY KEY") - .column().hasColumnName("TEST%TEST") + .column().hasColumnName("PRIMARY KEY") + .column().hasColumnName("TEST%TEST") ; assertThat(changes2).change() - .column().hasColumnName("PRIMARY KEY") - .column().hasColumnName("TEST%TEST") + .column().hasColumnName("PRIMARY KEY") + .column().hasColumnName("TEST%TEST") ; } @@ -184,13 +184,13 @@ public void test_ColumnName_hasColumnName_with_columns_to_exclude() { @NeedReload public void test_ColumnName_hasColumnName_with_order() { Table table1 = new Table(dataSource, "GROUP", '`', '`') - .setColumnsToOrder(new Order[] { - Order.asc("WHERE") - }); + .setColumnsToOrder(new Order[]{ + Order.asc("WHERE") + }); Table table2 = new Table(dataSource, "TWO WORDS", '`', '`') - .setColumnsToOrder(new Order[] { - Order.asc("PRIMARY KEY") - }); + .setColumnsToOrder(new Order[]{ + Order.asc("PRIMARY KEY") + }); Changes changes1 = new Changes(table1).setStartPointNow(); Changes changes2 = new Changes(table2).setStartPointNow(); update(); @@ -198,33 +198,33 @@ public void test_ColumnName_hasColumnName_with_order() { changes2.setEndPointNow(); assertThat(table1) - .column().hasColumnName("READ") - .column().hasColumnName("BY") - .column().hasColumnName("SELECT") - .column().hasColumnName("FROM") - .column().hasColumnName("WHERE") - .column().hasColumnName("ORDER") + .column().hasColumnName("READ") + .column().hasColumnName("BY") + .column().hasColumnName("SELECT") + .column().hasColumnName("FROM") + .column().hasColumnName("WHERE") + .column().hasColumnName("ORDER") ; assertThat(changes1).change() - .column().hasColumnName("READ") - .column().hasColumnName("BY") - .column().hasColumnName("SELECT") - .column().hasColumnName("FROM") - .column().hasColumnName("WHERE") - .column().hasColumnName("ORDER") + .column().hasColumnName("READ") + .column().hasColumnName("BY") + .column().hasColumnName("SELECT") + .column().hasColumnName("FROM") + .column().hasColumnName("WHERE") + .column().hasColumnName("ORDER") ; assertThat(table2) - .column().hasColumnName("PRIMARY KEY") - .column().hasColumnName("COLUMN NAME") - .column().hasColumnName("TEST%TEST") + .column().hasColumnName("PRIMARY KEY") + .column().hasColumnName("COLUMN NAME") + .column().hasColumnName("TEST%TEST") ; assertThat(changes2).change() - .column().hasColumnName("PRIMARY KEY") - .column().hasColumnName("COLUMN NAME") - .column().hasColumnName("TEST%TEST") + .column().hasColumnName("PRIMARY KEY") + .column().hasColumnName("COLUMN NAME") + .column().hasColumnName("TEST%TEST") ; } diff --git a/src/test/java/org/assertj/db/database/h2/ReservedH2Database_DataSource_UIUIUI_Test.java b/src/test/java/org/assertj/db/database/h2/ReservedH2Database_DataSource_UIUIUI_Test.java index c181ec00..84395bdb 100644 --- a/src/test/java/org/assertj/db/database/h2/ReservedH2Database_DataSource_UIUIUI_Test.java +++ b/src/test/java/org/assertj/db/database/h2/ReservedH2Database_DataSource_UIUIUI_Test.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.database.h2; @@ -47,7 +47,7 @@ public void test_PrimaryKey_hasPksNames() { update(); changes1.setEndPointNow(); changes2.setEndPointNow(); - + assertThat(changes1).change().hasPksNames("read") ; @@ -67,33 +67,33 @@ public void test_ColumnName_hasColumnName() { changes2.setEndPointNow(); assertThat(table1) - .column().hasColumnName("read") - .column().hasColumnName("by") - .column().hasColumnName("select") - .column().hasColumnName("from") - .column().hasColumnName("where") - .column().hasColumnName("order") + .column().hasColumnName("read") + .column().hasColumnName("by") + .column().hasColumnName("select") + .column().hasColumnName("from") + .column().hasColumnName("where") + .column().hasColumnName("order") ; assertThat(changes1).change() - .column().hasColumnName("read") - .column().hasColumnName("by") - .column().hasColumnName("select") - .column().hasColumnName("from") - .column().hasColumnName("where") - .column().hasColumnName("order") + .column().hasColumnName("read") + .column().hasColumnName("by") + .column().hasColumnName("select") + .column().hasColumnName("from") + .column().hasColumnName("where") + .column().hasColumnName("order") ; assertThat(table2) - .column().hasColumnName("primary key") - .column().hasColumnName("column name") - .column().hasColumnName("test%test") + .column().hasColumnName("primary key") + .column().hasColumnName("column name") + .column().hasColumnName("test%test") ; assertThat(changes2).change() - .column().hasColumnName("primary key") - .column().hasColumnName("column name") - .column().hasColumnName("test%test") + .column().hasColumnName("primary key") + .column().hasColumnName("column name") + .column().hasColumnName("test%test") ; } @@ -101,13 +101,13 @@ public void test_ColumnName_hasColumnName() { @NeedReload public void test_ColumnName_hasColumnName_with_columns_to_check() { Table table1 = new Table(dataSource, "group", '`', '`') - .setColumnsToCheck(new String[] { - "read", "by", "select", "from" - }); + .setColumnsToCheck(new String[]{ + "read", "by", "select", "from" + }); Table table2 = new Table(dataSource, "two words", '`', '`') - .setColumnsToCheck(new String[] { - "primary key", "column name", "test%test" - }); + .setColumnsToCheck(new String[]{ + "primary key", "column name", "test%test" + }); Changes changes1 = new Changes(table1).setStartPointNow(); Changes changes2 = new Changes(table2).setStartPointNow(); update(); @@ -115,29 +115,29 @@ public void test_ColumnName_hasColumnName_with_columns_to_check() { changes2.setEndPointNow(); assertThat(table1) - .column().hasColumnName("read") - .column().hasColumnName("by") - .column().hasColumnName("select") - .column().hasColumnName("from") + .column().hasColumnName("read") + .column().hasColumnName("by") + .column().hasColumnName("select") + .column().hasColumnName("from") ; assertThat(changes1).change() - .column().hasColumnName("read") - .column().hasColumnName("by") - .column().hasColumnName("select") - .column().hasColumnName("from") + .column().hasColumnName("read") + .column().hasColumnName("by") + .column().hasColumnName("select") + .column().hasColumnName("from") ; assertThat(table2) - .column().hasColumnName("primary key") - .column().hasColumnName("column name") - .column().hasColumnName("test%test") + .column().hasColumnName("primary key") + .column().hasColumnName("column name") + .column().hasColumnName("test%test") ; assertThat(changes2).change() - .column().hasColumnName("primary key") - .column().hasColumnName("column name") - .column().hasColumnName("test%test") + .column().hasColumnName("primary key") + .column().hasColumnName("column name") + .column().hasColumnName("test%test") ; } @@ -145,13 +145,13 @@ public void test_ColumnName_hasColumnName_with_columns_to_check() { @NeedReload public void test_ColumnName_hasColumnName_with_columns_to_exclude() { Table table1 = new Table(dataSource, "group", '`', '`') - .setColumnsToExclude(new String[] { - "read", "by", "from" - }); + .setColumnsToExclude(new String[]{ + "read", "by", "from" + }); Table table2 = new Table(dataSource, "two words", '`', '`') - .setColumnsToExclude(new String[] { - "column name" - }); + .setColumnsToExclude(new String[]{ + "column name" + }); Changes changes1 = new Changes(table1).setStartPointNow(); Changes changes2 = new Changes(table2).setStartPointNow(); update(); @@ -159,25 +159,25 @@ public void test_ColumnName_hasColumnName_with_columns_to_exclude() { changes2.setEndPointNow(); assertThat(table1) - .column().hasColumnName("select") - .column().hasColumnName("where") - .column().hasColumnName("order") + .column().hasColumnName("select") + .column().hasColumnName("where") + .column().hasColumnName("order") ; assertThat(changes1).change() - .column().hasColumnName("select") - .column().hasColumnName("where") - .column().hasColumnName("order") + .column().hasColumnName("select") + .column().hasColumnName("where") + .column().hasColumnName("order") ; assertThat(table2) - .column().hasColumnName("primary key") - .column().hasColumnName("test%test") + .column().hasColumnName("primary key") + .column().hasColumnName("test%test") ; assertThat(changes2).change() - .column().hasColumnName("primary key") - .column().hasColumnName("test%test") + .column().hasColumnName("primary key") + .column().hasColumnName("test%test") ; } @@ -185,13 +185,13 @@ public void test_ColumnName_hasColumnName_with_columns_to_exclude() { @NeedReload public void test_ColumnName_hasColumnName_with_order() { Table table1 = new Table(dataSource, "group", '`', '`') - .setColumnsToOrder(new Order[] { - Order.asc("where") - }); + .setColumnsToOrder(new Order[]{ + Order.asc("where") + }); Table table2 = new Table(dataSource, "two words", '`', '`') - .setColumnsToOrder(new Order[] { - Order.asc("primary key") - }); + .setColumnsToOrder(new Order[]{ + Order.asc("primary key") + }); Changes changes1 = new Changes(table1).setStartPointNow(); Changes changes2 = new Changes(table2).setStartPointNow(); update(); @@ -199,33 +199,33 @@ public void test_ColumnName_hasColumnName_with_order() { changes2.setEndPointNow(); assertThat(table1) - .column().hasColumnName("read") - .column().hasColumnName("by") - .column().hasColumnName("select") - .column().hasColumnName("from") - .column().hasColumnName("where") - .column().hasColumnName("order") + .column().hasColumnName("read") + .column().hasColumnName("by") + .column().hasColumnName("select") + .column().hasColumnName("from") + .column().hasColumnName("where") + .column().hasColumnName("order") ; assertThat(changes1).change() - .column().hasColumnName("read") - .column().hasColumnName("by") - .column().hasColumnName("select") - .column().hasColumnName("from") - .column().hasColumnName("where") - .column().hasColumnName("order") + .column().hasColumnName("read") + .column().hasColumnName("by") + .column().hasColumnName("select") + .column().hasColumnName("from") + .column().hasColumnName("where") + .column().hasColumnName("order") ; assertThat(table2) - .column().hasColumnName("primary key") - .column().hasColumnName("column name") - .column().hasColumnName("test%test") + .column().hasColumnName("primary key") + .column().hasColumnName("column name") + .column().hasColumnName("test%test") ; assertThat(changes2).change() - .column().hasColumnName("primary key") - .column().hasColumnName("column name") - .column().hasColumnName("test%test") + .column().hasColumnName("primary key") + .column().hasColumnName("column name") + .column().hasColumnName("test%test") ; } } diff --git a/src/test/java/org/assertj/db/database/h2/ReservedH2Database_Source_DDD_Test.java b/src/test/java/org/assertj/db/database/h2/ReservedH2Database_Source_DDD_Test.java index 1093efff..5b1088dd 100644 --- a/src/test/java/org/assertj/db/database/h2/ReservedH2Database_Source_DDD_Test.java +++ b/src/test/java/org/assertj/db/database/h2/ReservedH2Database_Source_DDD_Test.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.database.h2; @@ -65,33 +65,33 @@ public void test_ColumnName_hasColumnName() { changes2.setEndPointNow(); assertThat(table1) - .column().hasColumnName("read") - .column().hasColumnName("by") - .column().hasColumnName("select") - .column().hasColumnName("from") - .column().hasColumnName("where") - .column().hasColumnName("order") + .column().hasColumnName("read") + .column().hasColumnName("by") + .column().hasColumnName("select") + .column().hasColumnName("from") + .column().hasColumnName("where") + .column().hasColumnName("order") ; assertThat(changes1).change() - .column().hasColumnName("read") - .column().hasColumnName("by") - .column().hasColumnName("select") - .column().hasColumnName("from") - .column().hasColumnName("where") - .column().hasColumnName("order") + .column().hasColumnName("read") + .column().hasColumnName("by") + .column().hasColumnName("select") + .column().hasColumnName("from") + .column().hasColumnName("where") + .column().hasColumnName("order") ; assertThat(table2) - .column().hasColumnName("primary key") - .column().hasColumnName("column name") - .column().hasColumnName("test%test") + .column().hasColumnName("primary key") + .column().hasColumnName("column name") + .column().hasColumnName("test%test") ; assertThat(changes2).change() - .column().hasColumnName("primary key") - .column().hasColumnName("column name") - .column().hasColumnName("test%test") + .column().hasColumnName("primary key") + .column().hasColumnName("column name") + .column().hasColumnName("test%test") ; } @@ -99,13 +99,13 @@ public void test_ColumnName_hasColumnName() { @NeedReload public void test_ColumnName_hasColumnName_with_columns_to_check() { Table table1 = new Table(source, "group", '`', '`') - .setColumnsToCheck(new String[] { - "read", "by", "select", "from" - }); + .setColumnsToCheck(new String[]{ + "read", "by", "select", "from" + }); Table table2 = new Table(source, "two words", '`', '`') - .setColumnsToCheck(new String[] { - "primary key", "column name", "test%test" - }); + .setColumnsToCheck(new String[]{ + "primary key", "column name", "test%test" + }); Changes changes1 = new Changes(table1).setStartPointNow(); Changes changes2 = new Changes(table2).setStartPointNow(); update(); @@ -113,29 +113,29 @@ public void test_ColumnName_hasColumnName_with_columns_to_check() { changes2.setEndPointNow(); assertThat(table1) - .column().hasColumnName("read") - .column().hasColumnName("by") - .column().hasColumnName("select") - .column().hasColumnName("from") + .column().hasColumnName("read") + .column().hasColumnName("by") + .column().hasColumnName("select") + .column().hasColumnName("from") ; assertThat(changes1).change() - .column().hasColumnName("read") - .column().hasColumnName("by") - .column().hasColumnName("select") - .column().hasColumnName("from") + .column().hasColumnName("read") + .column().hasColumnName("by") + .column().hasColumnName("select") + .column().hasColumnName("from") ; assertThat(table2) - .column().hasColumnName("primary key") - .column().hasColumnName("column name") - .column().hasColumnName("test%test") + .column().hasColumnName("primary key") + .column().hasColumnName("column name") + .column().hasColumnName("test%test") ; assertThat(changes2).change() - .column().hasColumnName("primary key") - .column().hasColumnName("column name") - .column().hasColumnName("test%test") + .column().hasColumnName("primary key") + .column().hasColumnName("column name") + .column().hasColumnName("test%test") ; } @@ -143,13 +143,13 @@ public void test_ColumnName_hasColumnName_with_columns_to_check() { @NeedReload public void test_ColumnName_hasColumnName_with_columns_to_exclude() { Table table1 = new Table(source, "group", '`', '`') - .setColumnsToExclude(new String[] { - "read", "by", "from" - }); + .setColumnsToExclude(new String[]{ + "read", "by", "from" + }); Table table2 = new Table(source, "two words", '`', '`') - .setColumnsToExclude(new String[] { - "column name" - }); + .setColumnsToExclude(new String[]{ + "column name" + }); Changes changes1 = new Changes(table1).setStartPointNow(); Changes changes2 = new Changes(table2).setStartPointNow(); update(); @@ -157,25 +157,25 @@ public void test_ColumnName_hasColumnName_with_columns_to_exclude() { changes2.setEndPointNow(); assertThat(table1) - .column().hasColumnName("select") - .column().hasColumnName("where") - .column().hasColumnName("order") + .column().hasColumnName("select") + .column().hasColumnName("where") + .column().hasColumnName("order") ; assertThat(changes1).change() - .column().hasColumnName("select") - .column().hasColumnName("where") - .column().hasColumnName("order") + .column().hasColumnName("select") + .column().hasColumnName("where") + .column().hasColumnName("order") ; assertThat(table2) - .column().hasColumnName("primary key") - .column().hasColumnName("test%test") + .column().hasColumnName("primary key") + .column().hasColumnName("test%test") ; assertThat(changes2).change() - .column().hasColumnName("primary key") - .column().hasColumnName("test%test") + .column().hasColumnName("primary key") + .column().hasColumnName("test%test") ; } @@ -183,13 +183,13 @@ public void test_ColumnName_hasColumnName_with_columns_to_exclude() { @NeedReload public void test_ColumnName_hasColumnName_with_order() { Table table1 = new Table(source, "group", '`', '`') - .setColumnsToOrder(new Order[] { - Order.asc("where") - }); + .setColumnsToOrder(new Order[]{ + Order.asc("where") + }); Table table2 = new Table(source, "two words", '`', '`') - .setColumnsToOrder(new Order[] { - Order.asc("primary key") - }); + .setColumnsToOrder(new Order[]{ + Order.asc("primary key") + }); Changes changes1 = new Changes(table1).setStartPointNow(); Changes changes2 = new Changes(table2).setStartPointNow(); update(); @@ -197,33 +197,33 @@ public void test_ColumnName_hasColumnName_with_order() { changes2.setEndPointNow(); assertThat(table1) - .column().hasColumnName("read") - .column().hasColumnName("by") - .column().hasColumnName("select") - .column().hasColumnName("from") - .column().hasColumnName("where") - .column().hasColumnName("order") + .column().hasColumnName("read") + .column().hasColumnName("by") + .column().hasColumnName("select") + .column().hasColumnName("from") + .column().hasColumnName("where") + .column().hasColumnName("order") ; assertThat(changes1).change() - .column().hasColumnName("read") - .column().hasColumnName("by") - .column().hasColumnName("select") - .column().hasColumnName("from") - .column().hasColumnName("where") - .column().hasColumnName("order") + .column().hasColumnName("read") + .column().hasColumnName("by") + .column().hasColumnName("select") + .column().hasColumnName("from") + .column().hasColumnName("where") + .column().hasColumnName("order") ; assertThat(table2) - .column().hasColumnName("primary key") - .column().hasColumnName("column name") - .column().hasColumnName("test%test") + .column().hasColumnName("primary key") + .column().hasColumnName("column name") + .column().hasColumnName("test%test") ; assertThat(changes2).change() - .column().hasColumnName("primary key") - .column().hasColumnName("column name") - .column().hasColumnName("test%test") + .column().hasColumnName("primary key") + .column().hasColumnName("column name") + .column().hasColumnName("test%test") ; } diff --git a/src/test/java/org/assertj/db/database/h2/ReservedH2Database_Source_NSNSNS_Test.java b/src/test/java/org/assertj/db/database/h2/ReservedH2Database_Source_NSNSNS_Test.java index 1d92cc9a..1a204299 100644 --- a/src/test/java/org/assertj/db/database/h2/ReservedH2Database_Source_NSNSNS_Test.java +++ b/src/test/java/org/assertj/db/database/h2/ReservedH2Database_Source_NSNSNS_Test.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.database.h2; @@ -65,33 +65,33 @@ public void test_ColumnName_hasColumnName() { changes2.setEndPointNow(); assertThat(table1) - .column().hasColumnName("READ") - .column().hasColumnName("BY") - .column().hasColumnName("SELECT") - .column().hasColumnName("FROM") - .column().hasColumnName("WHERE") - .column().hasColumnName("ORDER") + .column().hasColumnName("READ") + .column().hasColumnName("BY") + .column().hasColumnName("SELECT") + .column().hasColumnName("FROM") + .column().hasColumnName("WHERE") + .column().hasColumnName("ORDER") ; assertThat(changes1).change() - .column().hasColumnName("READ") - .column().hasColumnName("BY") - .column().hasColumnName("SELECT") - .column().hasColumnName("FROM") - .column().hasColumnName("WHERE") - .column().hasColumnName("ORDER") + .column().hasColumnName("READ") + .column().hasColumnName("BY") + .column().hasColumnName("SELECT") + .column().hasColumnName("FROM") + .column().hasColumnName("WHERE") + .column().hasColumnName("ORDER") ; assertThat(table2) - .column().hasColumnName("PRIMARY KEY") - .column().hasColumnName("COLUMN NAME") - .column().hasColumnName("TEST%TEST") + .column().hasColumnName("PRIMARY KEY") + .column().hasColumnName("COLUMN NAME") + .column().hasColumnName("TEST%TEST") ; assertThat(changes2).change() - .column().hasColumnName("PRIMARY KEY") - .column().hasColumnName("COLUMN NAME") - .column().hasColumnName("TEST%TEST") + .column().hasColumnName("PRIMARY KEY") + .column().hasColumnName("COLUMN NAME") + .column().hasColumnName("TEST%TEST") ; } @@ -99,13 +99,13 @@ public void test_ColumnName_hasColumnName() { @NeedReload public void test_ColumnName_hasColumnName_with_columns_to_check() { Table table1 = new Table(source, "GROUP", '`', '`') - .setColumnsToCheck(new String[] { - "READ", "BY", "SELECT", "FROM" - }); + .setColumnsToCheck(new String[]{ + "READ", "BY", "SELECT", "FROM" + }); Table table2 = new Table(source, "TWO WORDS", '`', '`') - .setColumnsToCheck(new String[] { - "PRIMARY KEY", "COLUMN NAME", "TEST%TEST" - }); + .setColumnsToCheck(new String[]{ + "PRIMARY KEY", "COLUMN NAME", "TEST%TEST" + }); Changes changes1 = new Changes(table1).setStartPointNow(); Changes changes2 = new Changes(table2).setStartPointNow(); update(); @@ -113,29 +113,29 @@ public void test_ColumnName_hasColumnName_with_columns_to_check() { changes2.setEndPointNow(); assertThat(table1) - .column().hasColumnName("READ") - .column().hasColumnName("BY") - .column().hasColumnName("SELECT") - .column().hasColumnName("FROM") + .column().hasColumnName("READ") + .column().hasColumnName("BY") + .column().hasColumnName("SELECT") + .column().hasColumnName("FROM") ; assertThat(changes1).change() - .column().hasColumnName("READ") - .column().hasColumnName("BY") - .column().hasColumnName("SELECT") - .column().hasColumnName("FROM") + .column().hasColumnName("READ") + .column().hasColumnName("BY") + .column().hasColumnName("SELECT") + .column().hasColumnName("FROM") ; assertThat(table2) - .column().hasColumnName("PRIMARY KEY") - .column().hasColumnName("COLUMN NAME") - .column().hasColumnName("TEST%TEST") + .column().hasColumnName("PRIMARY KEY") + .column().hasColumnName("COLUMN NAME") + .column().hasColumnName("TEST%TEST") ; assertThat(changes2).change() - .column().hasColumnName("PRIMARY KEY") - .column().hasColumnName("COLUMN NAME") - .column().hasColumnName("TEST%TEST") + .column().hasColumnName("PRIMARY KEY") + .column().hasColumnName("COLUMN NAME") + .column().hasColumnName("TEST%TEST") ; } @@ -143,13 +143,13 @@ public void test_ColumnName_hasColumnName_with_columns_to_check() { @NeedReload public void test_ColumnName_hasColumnName_with_columns_to_exclude() { Table table1 = new Table(source, "GROUP", '`', '`') - .setColumnsToExclude(new String[] { - "READ", "BY", "FROM" - }); + .setColumnsToExclude(new String[]{ + "READ", "BY", "FROM" + }); Table table2 = new Table(source, "TWO WORDS", '`', '`') - .setColumnsToExclude(new String[] { - "COLUMN NAME" - }); + .setColumnsToExclude(new String[]{ + "COLUMN NAME" + }); Changes changes1 = new Changes(table1).setStartPointNow(); Changes changes2 = new Changes(table2).setStartPointNow(); update(); @@ -157,25 +157,25 @@ public void test_ColumnName_hasColumnName_with_columns_to_exclude() { changes2.setEndPointNow(); assertThat(table1) - .column().hasColumnName("SELECT") - .column().hasColumnName("WHERE") - .column().hasColumnName("ORDER") + .column().hasColumnName("SELECT") + .column().hasColumnName("WHERE") + .column().hasColumnName("ORDER") ; assertThat(changes1).change() - .column().hasColumnName("SELECT") - .column().hasColumnName("WHERE") - .column().hasColumnName("ORDER") + .column().hasColumnName("SELECT") + .column().hasColumnName("WHERE") + .column().hasColumnName("ORDER") ; assertThat(table2) - .column().hasColumnName("PRIMARY KEY") - .column().hasColumnName("TEST%TEST") + .column().hasColumnName("PRIMARY KEY") + .column().hasColumnName("TEST%TEST") ; assertThat(changes2).change() - .column().hasColumnName("PRIMARY KEY") - .column().hasColumnName("TEST%TEST") + .column().hasColumnName("PRIMARY KEY") + .column().hasColumnName("TEST%TEST") ; } @@ -183,13 +183,13 @@ public void test_ColumnName_hasColumnName_with_columns_to_exclude() { @NeedReload public void test_ColumnName_hasColumnName_with_order() { Table table1 = new Table(source, "GROUP", '`', '`') - .setColumnsToOrder(new Order[] { - Order.asc("WHERE") - }); + .setColumnsToOrder(new Order[]{ + Order.asc("WHERE") + }); Table table2 = new Table(source, "TWO WORDS", '`', '`') - .setColumnsToOrder(new Order[] { - Order.asc("PRIMARY KEY") - }); + .setColumnsToOrder(new Order[]{ + Order.asc("PRIMARY KEY") + }); Changes changes1 = new Changes(table1).setStartPointNow(); Changes changes2 = new Changes(table2).setStartPointNow(); update(); @@ -197,33 +197,33 @@ public void test_ColumnName_hasColumnName_with_order() { changes2.setEndPointNow(); assertThat(table1) - .column().hasColumnName("READ") - .column().hasColumnName("BY") - .column().hasColumnName("SELECT") - .column().hasColumnName("FROM") - .column().hasColumnName("WHERE") - .column().hasColumnName("ORDER") + .column().hasColumnName("READ") + .column().hasColumnName("BY") + .column().hasColumnName("SELECT") + .column().hasColumnName("FROM") + .column().hasColumnName("WHERE") + .column().hasColumnName("ORDER") ; assertThat(changes1).change() - .column().hasColumnName("READ") - .column().hasColumnName("BY") - .column().hasColumnName("SELECT") - .column().hasColumnName("FROM") - .column().hasColumnName("WHERE") - .column().hasColumnName("ORDER") + .column().hasColumnName("READ") + .column().hasColumnName("BY") + .column().hasColumnName("SELECT") + .column().hasColumnName("FROM") + .column().hasColumnName("WHERE") + .column().hasColumnName("ORDER") ; assertThat(table2) - .column().hasColumnName("PRIMARY KEY") - .column().hasColumnName("COLUMN NAME") - .column().hasColumnName("TEST%TEST") + .column().hasColumnName("PRIMARY KEY") + .column().hasColumnName("COLUMN NAME") + .column().hasColumnName("TEST%TEST") ; assertThat(changes2).change() - .column().hasColumnName("PRIMARY KEY") - .column().hasColumnName("COLUMN NAME") - .column().hasColumnName("TEST%TEST") + .column().hasColumnName("PRIMARY KEY") + .column().hasColumnName("COLUMN NAME") + .column().hasColumnName("TEST%TEST") ; } diff --git a/src/test/java/org/assertj/db/database/h2/ReservedH2Database_Source_UIUIUI_Test.java b/src/test/java/org/assertj/db/database/h2/ReservedH2Database_Source_UIUIUI_Test.java index 52e0ba9a..fae85ba9 100644 --- a/src/test/java/org/assertj/db/database/h2/ReservedH2Database_Source_UIUIUI_Test.java +++ b/src/test/java/org/assertj/db/database/h2/ReservedH2Database_Source_UIUIUI_Test.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.database.h2; @@ -46,7 +46,7 @@ public void test_PrimaryKey_hasPksNames() { update(); changes1.setEndPointNow(); changes2.setEndPointNow(); - + assertThat(changes1).change().hasPksNames("read") ; @@ -66,33 +66,33 @@ public void test_ColumnName_hasColumnName() { changes2.setEndPointNow(); assertThat(table1) - .column().hasColumnName("read") - .column().hasColumnName("by") - .column().hasColumnName("select") - .column().hasColumnName("from") - .column().hasColumnName("where") - .column().hasColumnName("order") + .column().hasColumnName("read") + .column().hasColumnName("by") + .column().hasColumnName("select") + .column().hasColumnName("from") + .column().hasColumnName("where") + .column().hasColumnName("order") ; assertThat(changes1).change() - .column().hasColumnName("read") - .column().hasColumnName("by") - .column().hasColumnName("select") - .column().hasColumnName("from") - .column().hasColumnName("where") - .column().hasColumnName("order") + .column().hasColumnName("read") + .column().hasColumnName("by") + .column().hasColumnName("select") + .column().hasColumnName("from") + .column().hasColumnName("where") + .column().hasColumnName("order") ; assertThat(table2) - .column().hasColumnName("primary key") - .column().hasColumnName("column name") - .column().hasColumnName("test%test") + .column().hasColumnName("primary key") + .column().hasColumnName("column name") + .column().hasColumnName("test%test") ; assertThat(changes2).change() - .column().hasColumnName("primary key") - .column().hasColumnName("column name") - .column().hasColumnName("test%test") + .column().hasColumnName("primary key") + .column().hasColumnName("column name") + .column().hasColumnName("test%test") ; } @@ -100,13 +100,13 @@ public void test_ColumnName_hasColumnName() { @NeedReload public void test_ColumnName_hasColumnName_with_columns_to_check() { Table table1 = new Table(source, "group", '`', '`') - .setColumnsToCheck(new String[] { - "read", "by", "select", "from" - }); + .setColumnsToCheck(new String[]{ + "read", "by", "select", "from" + }); Table table2 = new Table(source, "two words", '`', '`') - .setColumnsToCheck(new String[] { - "primary key", "column name", "test%test" - }); + .setColumnsToCheck(new String[]{ + "primary key", "column name", "test%test" + }); Changes changes1 = new Changes(table1).setStartPointNow(); Changes changes2 = new Changes(table2).setStartPointNow(); update(); @@ -114,29 +114,29 @@ public void test_ColumnName_hasColumnName_with_columns_to_check() { changes2.setEndPointNow(); assertThat(table1) - .column().hasColumnName("read") - .column().hasColumnName("by") - .column().hasColumnName("select") - .column().hasColumnName("from") + .column().hasColumnName("read") + .column().hasColumnName("by") + .column().hasColumnName("select") + .column().hasColumnName("from") ; assertThat(changes1).change() - .column().hasColumnName("read") - .column().hasColumnName("by") - .column().hasColumnName("select") - .column().hasColumnName("from") + .column().hasColumnName("read") + .column().hasColumnName("by") + .column().hasColumnName("select") + .column().hasColumnName("from") ; assertThat(table2) - .column().hasColumnName("primary key") - .column().hasColumnName("column name") - .column().hasColumnName("test%test") + .column().hasColumnName("primary key") + .column().hasColumnName("column name") + .column().hasColumnName("test%test") ; assertThat(changes2).change() - .column().hasColumnName("primary key") - .column().hasColumnName("column name") - .column().hasColumnName("test%test") + .column().hasColumnName("primary key") + .column().hasColumnName("column name") + .column().hasColumnName("test%test") ; } @@ -144,13 +144,13 @@ public void test_ColumnName_hasColumnName_with_columns_to_check() { @NeedReload public void test_ColumnName_hasColumnName_with_columns_to_exclude() { Table table1 = new Table(source, "group", '`', '`') - .setColumnsToExclude(new String[] { - "read", "by", "from" - }); + .setColumnsToExclude(new String[]{ + "read", "by", "from" + }); Table table2 = new Table(source, "two words", '`', '`') - .setColumnsToExclude(new String[] { - "column name" - }); + .setColumnsToExclude(new String[]{ + "column name" + }); Changes changes1 = new Changes(table1).setStartPointNow(); Changes changes2 = new Changes(table2).setStartPointNow(); update(); @@ -158,25 +158,25 @@ public void test_ColumnName_hasColumnName_with_columns_to_exclude() { changes2.setEndPointNow(); assertThat(table1) - .column().hasColumnName("select") - .column().hasColumnName("where") - .column().hasColumnName("order") + .column().hasColumnName("select") + .column().hasColumnName("where") + .column().hasColumnName("order") ; assertThat(changes1).change() - .column().hasColumnName("select") - .column().hasColumnName("where") - .column().hasColumnName("order") + .column().hasColumnName("select") + .column().hasColumnName("where") + .column().hasColumnName("order") ; assertThat(table2) - .column().hasColumnName("primary key") - .column().hasColumnName("test%test") + .column().hasColumnName("primary key") + .column().hasColumnName("test%test") ; assertThat(changes2).change() - .column().hasColumnName("primary key") - .column().hasColumnName("test%test") + .column().hasColumnName("primary key") + .column().hasColumnName("test%test") ; } @@ -184,13 +184,13 @@ public void test_ColumnName_hasColumnName_with_columns_to_exclude() { @NeedReload public void test_ColumnName_hasColumnName_with_order() { Table table1 = new Table(source, "group", '`', '`') - .setColumnsToOrder(new Order[] { - Order.asc("where") - }); + .setColumnsToOrder(new Order[]{ + Order.asc("where") + }); Table table2 = new Table(source, "two words", '`', '`') - .setColumnsToOrder(new Order[] { - Order.asc("primary key") - }); + .setColumnsToOrder(new Order[]{ + Order.asc("primary key") + }); Changes changes1 = new Changes(table1).setStartPointNow(); Changes changes2 = new Changes(table2).setStartPointNow(); update(); @@ -198,33 +198,33 @@ public void test_ColumnName_hasColumnName_with_order() { changes2.setEndPointNow(); assertThat(table1) - .column().hasColumnName("read") - .column().hasColumnName("by") - .column().hasColumnName("select") - .column().hasColumnName("from") - .column().hasColumnName("where") - .column().hasColumnName("order") + .column().hasColumnName("read") + .column().hasColumnName("by") + .column().hasColumnName("select") + .column().hasColumnName("from") + .column().hasColumnName("where") + .column().hasColumnName("order") ; assertThat(changes1).change() - .column().hasColumnName("read") - .column().hasColumnName("by") - .column().hasColumnName("select") - .column().hasColumnName("from") - .column().hasColumnName("where") - .column().hasColumnName("order") + .column().hasColumnName("read") + .column().hasColumnName("by") + .column().hasColumnName("select") + .column().hasColumnName("from") + .column().hasColumnName("where") + .column().hasColumnName("order") ; assertThat(table2) - .column().hasColumnName("primary key") - .column().hasColumnName("column name") - .column().hasColumnName("test%test") + .column().hasColumnName("primary key") + .column().hasColumnName("column name") + .column().hasColumnName("test%test") ; assertThat(changes2).change() - .column().hasColumnName("primary key") - .column().hasColumnName("column name") - .column().hasColumnName("test%test") + .column().hasColumnName("primary key") + .column().hasColumnName("column name") + .column().hasColumnName("test%test") ; } } diff --git a/src/test/java/org/assertj/db/database/hsqldb/AbstractHsqldbTest.java b/src/test/java/org/assertj/db/database/hsqldb/AbstractHsqldbTest.java index a2c0af99..6d5594e5 100644 --- a/src/test/java/org/assertj/db/database/hsqldb/AbstractHsqldbTest.java +++ b/src/test/java/org/assertj/db/database/hsqldb/AbstractHsqldbTest.java @@ -8,21 +8,14 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.database.hsqldb; -import com.ninja_squad.dbsetup.DbSetup; -import com.ninja_squad.dbsetup.DbSetupTracker; -import com.ninja_squad.dbsetup.destination.DriverManagerDestination; -import com.ninja_squad.dbsetup.operation.Operation; -import org.assertj.db.database.AbstractDatabaseTest; -import org.assertj.db.type.DataSourceWithLetterCase; -import org.assertj.db.type.SourceWithLetterCase; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.test.context.ContextConfiguration; +import static com.ninja_squad.dbsetup.Operations.deleteAllFrom; +import static com.ninja_squad.dbsetup.Operations.insertInto; +import static com.ninja_squad.dbsetup.Operations.sequenceOf; -import javax.sql.DataSource; import java.io.ByteArrayOutputStream; import java.io.InputStream; import java.sql.Date; @@ -30,17 +23,29 @@ import java.sql.Timestamp; import java.util.Locale; import java.util.logging.Level; +import javax.sql.DataSource; -import static com.ninja_squad.dbsetup.Operations.*; +import org.assertj.db.database.AbstractDatabaseTest; +import org.assertj.db.type.DataSourceWithLetterCase; +import org.assertj.db.type.SourceWithLetterCase; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.test.context.ContextConfiguration; + +import com.ninja_squad.dbsetup.DbSetup; +import com.ninja_squad.dbsetup.DbSetupTracker; +import com.ninja_squad.dbsetup.destination.DriverManagerDestination; +import com.ninja_squad.dbsetup.operation.Operation; /** * Parent for all the tests which are specific for HSQLDB database. * * @author Régis Pouiller */ -@ContextConfiguration(classes = { HsqldbConfiguration.class }) +@ContextConfiguration(classes = {HsqldbConfiguration.class}) public abstract class AbstractHsqldbTest extends AbstractDatabaseTest { + private static final Operation DELETE_ALL = deleteAllFrom("teSt"); + private static final DbSetupTracker DB_SETUP_TRACKER = new DbSetupTracker(); private static byte[] BYTES; static { @@ -59,31 +64,25 @@ public abstract class AbstractHsqldbTest extends AbstractDatabaseTest { } } - protected DataSourceWithLetterCase dataSourceUIUIUI; - protected DataSourceWithLetterCase dataSourceNSNSNS; - - protected final SourceWithLetterCase sourceUIUIUI = new SourceWithLetterCase("jdbc:hsqldb:mem:testHsqldb", "SA", "", - letterCaseUI, - letterCaseUI, - letterCaseUI); - - private static final Operation DELETE_ALL = deleteAllFrom("teSt"); - private static final Operation INSERT_TEST = insertInto("teSt") - .columns("Var1", "vAr2", "vaR3", "var4", "var5", "var6", "var7", "var8", "var9", "var10", - "var11", "var12", "var13", "var14", "var15", "var16", "var17", "var18", "var19", "var20", - "var21", "var22", "var23", "var24", "var25", "var26") - .values(1, 2, 3.3, 4.4, "5", "6", "7", "8", "9", Date.valueOf("2007-12-23"), - Time.valueOf("09:01:00"), Timestamp.valueOf("2007-12-23 09:01:00"), - Timestamp.valueOf("2007-12-23 09:01:00"), 10, 11, true, false, 12, 13, 14, - 15, BYTES, BYTES, BYTES, Locale.FRENCH, Locale.FRENCH) - .build(); - + .columns("Var1", "vAr2", "vaR3", "var4", "var5", "var6", "var7", "var8", "var9", "var10", + "var11", "var12", "var13", "var14", "var15", "var16", "var17", "var18", "var19", "var20", + "var21", "var22", "var23", "var24", "var25", "var26") + .values(1, 2, 3.3, 4.4, "5", "6", "7", "8", "9", Date.valueOf("2007-12-23"), + Time.valueOf("09:01:00"), Timestamp.valueOf("2007-12-23 09:01:00"), + Timestamp.valueOf("2007-12-23 09:01:00"), 10, 11, true, false, 12, 13, 14, + 15, BYTES, BYTES, BYTES, Locale.FRENCH, Locale.FRENCH) + .build(); private static final Operation OPERATIONS = sequenceOf(DELETE_ALL, INSERT_TEST); - private static final DbSetup DB_SETUP = new DbSetup(new DriverManagerDestination("jdbc:hsqldb:mem:testHsqldb", "SA", ""), - OPERATIONS); - private static final DbSetupTracker DB_SETUP_TRACKER = new DbSetupTracker(); + OPERATIONS); + + protected final SourceWithLetterCase sourceUIUIUI = new SourceWithLetterCase("jdbc:hsqldb:mem:testHsqldb", "SA", "", + letterCaseUI, + letterCaseUI, + letterCaseUI); + protected DataSourceWithLetterCase dataSourceUIUIUI; + protected DataSourceWithLetterCase dataSourceNSNSNS; protected DbSetup getDbSetup() { return DB_SETUP; diff --git a/src/test/java/org/assertj/db/database/hsqldb/HsqldbConfiguration.java b/src/test/java/org/assertj/db/database/hsqldb/HsqldbConfiguration.java index 38f9091c..7ff760b3 100644 --- a/src/test/java/org/assertj/db/database/hsqldb/HsqldbConfiguration.java +++ b/src/test/java/org/assertj/db/database/hsqldb/HsqldbConfiguration.java @@ -8,10 +8,12 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.database.hsqldb; +import javax.sql.DataSource; + import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.jdbc.datasource.DataSourceTransactionManager; @@ -19,13 +21,10 @@ import org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseType; import org.springframework.transaction.PlatformTransactionManager; -import javax.sql.DataSource; - /** * Provides the configuration for the HSQLDB tests. * * @author Régis Pouiller - * */ @Configuration public class HsqldbConfiguration { @@ -33,7 +32,7 @@ public class HsqldbConfiguration { @Bean public DataSource dataSource() { return new EmbeddedDatabaseBuilder().setName("testHsqldb").setType(EmbeddedDatabaseType.HSQL).addScript("schemaHsqldb.sql") - .build(); + .build(); } @Bean diff --git a/src/test/java/org/assertj/db/database/hsqldb/HsqldbDataBase_Test.java b/src/test/java/org/assertj/db/database/hsqldb/HsqldbDataBase_Test.java index 234ff17d..62bb0e02 100644 --- a/src/test/java/org/assertj/db/database/hsqldb/HsqldbDataBase_Test.java +++ b/src/test/java/org/assertj/db/database/hsqldb/HsqldbDataBase_Test.java @@ -8,15 +8,21 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.database.hsqldb; -import org.junit.Test; +import static org.assertj.core.api.Assertions.assertThat; -import java.sql.*; +import java.sql.Connection; +import java.sql.DatabaseMetaData; +import java.sql.DriverManager; +import java.sql.ResultSet; +import java.sql.ResultSetMetaData; +import java.sql.SQLException; +import java.sql.Statement; -import static org.assertj.core.api.Assertions.assertThat; +import org.junit.Test; /** * Test on the HSQLDB database. @@ -65,7 +71,7 @@ public void test_schema_for_source() throws SQLException { public void test_tables_for_data_source() throws SQLException { try (Connection connection = dataSource.getConnection()) { DatabaseMetaData databaseMetaData = connection.getMetaData(); - ResultSet resultSet = databaseMetaData.getTables("PUBLIC", "PUBLIC", null, new String[] { "TABLE" }); + ResultSet resultSet = databaseMetaData.getTables("PUBLIC", "PUBLIC", null, new String[]{"TABLE"}); assertThat(resultSet.next()).isTrue(); assertThat(resultSet.getString("TABLE_NAME")).isEqualTo("TEST"); assertThat(resultSet.next()).isFalse(); @@ -76,7 +82,7 @@ public void test_tables_for_data_source() throws SQLException { public void test_tables_for_source() throws SQLException { try (Connection connection = DriverManager.getConnection(URL, USER, PASSWORD)) { DatabaseMetaData databaseMetaData = connection.getMetaData(); - ResultSet resultSet = databaseMetaData.getTables("PUBLIC", "PUBLIC", null, new String[] { "TABLE" }); + ResultSet resultSet = databaseMetaData.getTables("PUBLIC", "PUBLIC", null, new String[]{"TABLE"}); assertThat(resultSet.next()).isTrue(); assertThat(resultSet.getString("TABLE_NAME")).isEqualTo("TEST"); assertThat(resultSet.next()).isFalse(); diff --git a/src/test/java/org/assertj/db/database/hsqldb/HsqldbDatabase_Source_UIUIUI_Test.java b/src/test/java/org/assertj/db/database/hsqldb/HsqldbDatabase_Source_UIUIUI_Test.java index b29ccaa0..d41772f1 100644 --- a/src/test/java/org/assertj/db/database/hsqldb/HsqldbDatabase_Source_UIUIUI_Test.java +++ b/src/test/java/org/assertj/db/database/hsqldb/HsqldbDatabase_Source_UIUIUI_Test.java @@ -8,14 +8,12 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.database.hsqldb; -import org.assertj.db.common.NeedReload; -import org.assertj.db.type.*; -import org.junit.Before; -import org.junit.Test; +import static org.assertj.db.api.Assertions.assertThat; +import static org.assertj.db.api.Assertions.bytesContentFromClassPathOf; import java.math.BigDecimal; import java.sql.Date; @@ -23,8 +21,16 @@ import java.sql.Timestamp; import java.util.Locale; -import static org.assertj.db.api.Assertions.assertThat; -import static org.assertj.db.api.Assertions.bytesContentFromClassPathOf; +import org.assertj.db.common.NeedReload; +import org.assertj.db.type.Changes; +import org.assertj.db.type.DateTimeValue; +import org.assertj.db.type.DateValue; +import org.assertj.db.type.Source; +import org.assertj.db.type.Table; +import org.assertj.db.type.TimeValue; +import org.assertj.db.type.ValueType; +import org.junit.Before; +import org.junit.Test; /** * Test on the HSQLDB database. @@ -61,61 +67,61 @@ public void test_ColumnName_hasColumnName() { changes.setEndPointNow(); assertThat(table) - .column().hasColumnName("var1") - .column().hasColumnName("var2") - .column().hasColumnName("var3") - .column().hasColumnName("var4") - .column().hasColumnName("var5") - .column().hasColumnName("var6") - .column().hasColumnName("var7") - .column().hasColumnName("var8") - .column().hasColumnName("var9") - .column().hasColumnName("var10") - .column().hasColumnName("var11") - .column().hasColumnName("var12") - .column().hasColumnName("var13") - .column().hasColumnName("var14") - .column().hasColumnName("var15") - .column().hasColumnName("var16") - .column().hasColumnName("var17") - .column().hasColumnName("var18") - .column().hasColumnName("var19") - .column().hasColumnName("var20") - .column().hasColumnName("var21") - .column().hasColumnName("var22") - .column().hasColumnName("var23") - .column().hasColumnName("var24") - .column().hasColumnName("var25") - .column().hasColumnName("var26") + .column().hasColumnName("var1") + .column().hasColumnName("var2") + .column().hasColumnName("var3") + .column().hasColumnName("var4") + .column().hasColumnName("var5") + .column().hasColumnName("var6") + .column().hasColumnName("var7") + .column().hasColumnName("var8") + .column().hasColumnName("var9") + .column().hasColumnName("var10") + .column().hasColumnName("var11") + .column().hasColumnName("var12") + .column().hasColumnName("var13") + .column().hasColumnName("var14") + .column().hasColumnName("var15") + .column().hasColumnName("var16") + .column().hasColumnName("var17") + .column().hasColumnName("var18") + .column().hasColumnName("var19") + .column().hasColumnName("var20") + .column().hasColumnName("var21") + .column().hasColumnName("var22") + .column().hasColumnName("var23") + .column().hasColumnName("var24") + .column().hasColumnName("var25") + .column().hasColumnName("var26") ; assertThat(changes).change() - .column().hasColumnName("var1") - .column().hasColumnName("var2") - .column().hasColumnName("var3") - .column().hasColumnName("var4") - .column().hasColumnName("var5") - .column().hasColumnName("var6") - .column().hasColumnName("var7") - .column().hasColumnName("var8") - .column().hasColumnName("var9") - .column().hasColumnName("var10") - .column().hasColumnName("var11") - .column().hasColumnName("var12") - .column().hasColumnName("var13") - .column().hasColumnName("var14") - .column().hasColumnName("var15") - .column().hasColumnName("var16") - .column().hasColumnName("var17") - .column().hasColumnName("var18") - .column().hasColumnName("var19") - .column().hasColumnName("var20") - .column().hasColumnName("var21") - .column().hasColumnName("var22") - .column().hasColumnName("var23") - .column().hasColumnName("var24") - .column().hasColumnName("var25") - .column().hasColumnName("var26") + .column().hasColumnName("var1") + .column().hasColumnName("var2") + .column().hasColumnName("var3") + .column().hasColumnName("var4") + .column().hasColumnName("var5") + .column().hasColumnName("var6") + .column().hasColumnName("var7") + .column().hasColumnName("var8") + .column().hasColumnName("var9") + .column().hasColumnName("var10") + .column().hasColumnName("var11") + .column().hasColumnName("var12") + .column().hasColumnName("var13") + .column().hasColumnName("var14") + .column().hasColumnName("var15") + .column().hasColumnName("var16") + .column().hasColumnName("var17") + .column().hasColumnName("var18") + .column().hasColumnName("var19") + .column().hasColumnName("var20") + .column().hasColumnName("var21") + .column().hasColumnName("var22") + .column().hasColumnName("var23") + .column().hasColumnName("var24") + .column().hasColumnName("var25") + .column().hasColumnName("var26") ; } @@ -128,61 +134,61 @@ public void test_ColumnClass_isOfClass() { changes.setEndPointNow(); assertThat(table) - .column("var1").isOfClass(Integer.class, false) - .column("var2").isOfClass(Integer.class, false) - .column("var3").isOfClass(Double.class, false) - .column("var4").isOfClass(Double.class, false) - .column("var5").isOfClass(String.class, false) - .column("var6").isOfClass(String.class, false) - .column("var7").isOfClass(String.class, false) - .column("var8").isOfClass(String.class, false) - .column("var9").isOfClass(String.class, false) - .column("var10").isOfClass(Date.class, false) - .column("var11").isOfClass(Time.class, false) - .column("var12").isOfClass(Timestamp.class, false) - .column("var13").isOfClass(Timestamp.class, false) - .column("var14").isOfClass(BigDecimal.class, false) - .column("var15").isOfClass(BigDecimal.class, false) - .column("var16").isOfClass(Boolean.class, false) - .column("var17").isOfClass(Boolean.class, false) - .column("var18").isOfClass(Integer.class, false) - .column("var19").isOfClass(Integer.class, false) - .column("var20").isOfClass(Long.class, false) - .column("var21").isOfClass(Double.class, false) - .column("var22").isOfClass(byte[].class, false) - .column("var23").isOfClass(byte[].class, false) - .column("var24").isOfClass(byte[].class, false) - .column("var25").isOfClass(Locale.class, false) - .column("var26").isOfClass(Locale.class, false) + .column("var1").isOfClass(Integer.class, false) + .column("var2").isOfClass(Integer.class, false) + .column("var3").isOfClass(Double.class, false) + .column("var4").isOfClass(Double.class, false) + .column("var5").isOfClass(String.class, false) + .column("var6").isOfClass(String.class, false) + .column("var7").isOfClass(String.class, false) + .column("var8").isOfClass(String.class, false) + .column("var9").isOfClass(String.class, false) + .column("var10").isOfClass(Date.class, false) + .column("var11").isOfClass(Time.class, false) + .column("var12").isOfClass(Timestamp.class, false) + .column("var13").isOfClass(Timestamp.class, false) + .column("var14").isOfClass(BigDecimal.class, false) + .column("var15").isOfClass(BigDecimal.class, false) + .column("var16").isOfClass(Boolean.class, false) + .column("var17").isOfClass(Boolean.class, false) + .column("var18").isOfClass(Integer.class, false) + .column("var19").isOfClass(Integer.class, false) + .column("var20").isOfClass(Long.class, false) + .column("var21").isOfClass(Double.class, false) + .column("var22").isOfClass(byte[].class, false) + .column("var23").isOfClass(byte[].class, false) + .column("var24").isOfClass(byte[].class, false) + .column("var25").isOfClass(Locale.class, false) + .column("var26").isOfClass(Locale.class, false) ; assertThat(changes).change() - .column("var1").isOfClass(Integer.class, false) - .column("var2").isOfClass(Integer.class, false) - .column("var3").isOfClass(Double.class, false) - .column("var4").isOfClass(Double.class, false) - .column("var5").isOfClass(String.class, false) - .column("var6").isOfClass(String.class, false) - .column("var7").isOfClass(String.class, false) - .column("var8").isOfClass(String.class, false) - .column("var9").isOfClass(String.class, false) - .column("var10").isOfClass(Date.class, false) - .column("var11").isOfClass(Time.class, false) - .column("var12").isOfClass(Timestamp.class, false) - .column("var13").isOfClass(Timestamp.class, false) - .column("var14").isOfClass(BigDecimal.class, false) - .column("var15").isOfClass(BigDecimal.class, false) - .column("var16").isOfClass(Boolean.class, false) - .column("var17").isOfClass(Boolean.class, false) - .column("var18").isOfClass(Integer.class, false) - .column("var19").isOfClass(Integer.class, false) - .column("var20").isOfClass(Long.class, false) - .column("var21").isOfClass(Double.class, false) - .column("var22").isOfClass(byte[].class, false) - .column("var23").isOfClass(byte[].class, false) - .column("var24").isOfClass(byte[].class, false) - .column("var25").isOfClass(Locale.class, false) - .column("var26").isOfClass(Locale.class, false) + .column("var1").isOfClass(Integer.class, false) + .column("var2").isOfClass(Integer.class, false) + .column("var3").isOfClass(Double.class, false) + .column("var4").isOfClass(Double.class, false) + .column("var5").isOfClass(String.class, false) + .column("var6").isOfClass(String.class, false) + .column("var7").isOfClass(String.class, false) + .column("var8").isOfClass(String.class, false) + .column("var9").isOfClass(String.class, false) + .column("var10").isOfClass(Date.class, false) + .column("var11").isOfClass(Time.class, false) + .column("var12").isOfClass(Timestamp.class, false) + .column("var13").isOfClass(Timestamp.class, false) + .column("var14").isOfClass(BigDecimal.class, false) + .column("var15").isOfClass(BigDecimal.class, false) + .column("var16").isOfClass(Boolean.class, false) + .column("var17").isOfClass(Boolean.class, false) + .column("var18").isOfClass(Integer.class, false) + .column("var19").isOfClass(Integer.class, false) + .column("var20").isOfClass(Long.class, false) + .column("var21").isOfClass(Double.class, false) + .column("var22").isOfClass(byte[].class, false) + .column("var23").isOfClass(byte[].class, false) + .column("var24").isOfClass(byte[].class, false) + .column("var25").isOfClass(Locale.class, false) + .column("var26").isOfClass(Locale.class, false) ; } @@ -195,61 +201,61 @@ public void test_ColumnEquality_hasValues() { changes.setEndPointNow(); assertThat(table) - .column("var1").hasValues(1) - .column("var2").hasValues(20) - .column("var3").hasValues(3.3) - .column("var4").hasValues(4.4) - .column("var5").hasValues("5") - .column("var6").hasValues("6") - .column("var7").hasValues("7") - .column("var8").hasValues("8") - .column("var9").hasValues("9") - .column("var10").hasValues(DateValue.of(2007, 12, 23)) - .column("var11").hasValues(TimeValue.of(9, 1)) - .column("var12").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .column("var13").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .column("var14").hasValues(10) - .column("var15").hasValues(11) - .column("var16").hasValues(true) - .column("var17").hasValues(false) - .column("var18").hasValues(12) - .column("var19").hasValues(13) - .column("var20").hasValues(14) - .column("var21").hasValues(15) - .column("var22").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var23").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var24").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var25").hasValues(Locale.FRENCH) - .column("var26").hasValues(Locale.FRENCH) + .column("var1").hasValues(1) + .column("var2").hasValues(20) + .column("var3").hasValues(3.3) + .column("var4").hasValues(4.4) + .column("var5").hasValues("5") + .column("var6").hasValues("6") + .column("var7").hasValues("7") + .column("var8").hasValues("8") + .column("var9").hasValues("9") + .column("var10").hasValues(DateValue.of(2007, 12, 23)) + .column("var11").hasValues(TimeValue.of(9, 1)) + .column("var12").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .column("var13").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .column("var14").hasValues(10) + .column("var15").hasValues(11) + .column("var16").hasValues(true) + .column("var17").hasValues(false) + .column("var18").hasValues(12) + .column("var19").hasValues(13) + .column("var20").hasValues(14) + .column("var21").hasValues(15) + .column("var22").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var23").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var24").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var25").hasValues(Locale.FRENCH) + .column("var26").hasValues(Locale.FRENCH) ; assertThat(changes).change() - .column("var1").hasValues(1) - .column("var2").hasValues(2, 20) - .column("var3").hasValues(3.3) - .column("var4").hasValues(4.4) - .column("var5").hasValues("5") - .column("var6").hasValues("6") - .column("var7").hasValues("7") - .column("var8").hasValues("8") - .column("var9").hasValues("9") - .column("var10").hasValues(DateValue.of(2007, 12, 23)) - .column("var11").hasValues(TimeValue.of(9, 1)) - .column("var12").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .column("var13").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .column("var14").hasValues(10) - .column("var15").hasValues(11) - .column("var16").hasValues(true) - .column("var17").hasValues(false) - .column("var18").hasValues(12) - .column("var19").hasValues(13) - .column("var20").hasValues(14) - .column("var21").hasValues(15) - .column("var22").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var23").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var24").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var25").hasValues(Locale.FRENCH) - .column("var26").hasValues(Locale.FRENCH) + .column("var1").hasValues(1) + .column("var2").hasValues(2, 20) + .column("var3").hasValues(3.3) + .column("var4").hasValues(4.4) + .column("var5").hasValues("5") + .column("var6").hasValues("6") + .column("var7").hasValues("7") + .column("var8").hasValues("8") + .column("var9").hasValues("9") + .column("var10").hasValues(DateValue.of(2007, 12, 23)) + .column("var11").hasValues(TimeValue.of(9, 1)) + .column("var12").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .column("var13").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .column("var14").hasValues(10) + .column("var15").hasValues(11) + .column("var16").hasValues(true) + .column("var17").hasValues(false) + .column("var18").hasValues(12) + .column("var19").hasValues(13) + .column("var20").hasValues(14) + .column("var21").hasValues(15) + .column("var22").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var23").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var24").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var25").hasValues(Locale.FRENCH) + .column("var26").hasValues(Locale.FRENCH) ; } @@ -262,32 +268,32 @@ public void test_ColumnEquality_containsValues() { changes.setEndPointNow(); assertThat(table) - .column("var1").containsValues(1) - .column("var2").containsValues(20) - .column("var3").containsValues(3.3) - .column("var4").containsValues(4.4) - .column("var5").containsValues("5") - .column("var6").containsValues("6") - .column("var7").containsValues("7") - .column("var8").containsValues("8") - .column("var9").containsValues("9") - .column("var10").containsValues(DateValue.of(2007, 12, 23)) - .column("var11").containsValues(TimeValue.of(9, 1)) - .column("var12").containsValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .column("var13").containsValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .column("var14").containsValues(10) - .column("var15").containsValues(11) - .column("var16").containsValues(true) - .column("var17").containsValues(false) - .column("var18").containsValues(12) - .column("var19").containsValues(13) - .column("var20").containsValues(14) - .column("var21").containsValues(15) - .column("var22").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var23").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var24").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var25").containsValues(Locale.FRENCH) - .column("var26").containsValues(Locale.FRENCH) + .column("var1").containsValues(1) + .column("var2").containsValues(20) + .column("var3").containsValues(3.3) + .column("var4").containsValues(4.4) + .column("var5").containsValues("5") + .column("var6").containsValues("6") + .column("var7").containsValues("7") + .column("var8").containsValues("8") + .column("var9").containsValues("9") + .column("var10").containsValues(DateValue.of(2007, 12, 23)) + .column("var11").containsValues(TimeValue.of(9, 1)) + .column("var12").containsValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .column("var13").containsValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .column("var14").containsValues(10) + .column("var15").containsValues(11) + .column("var16").containsValues(true) + .column("var17").containsValues(false) + .column("var18").containsValues(12) + .column("var19").containsValues(13) + .column("var20").containsValues(14) + .column("var21").containsValues(15) + .column("var22").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var23").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var24").containsValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var25").containsValues(Locale.FRENCH) + .column("var26").containsValues(Locale.FRENCH) ; } @@ -300,61 +306,61 @@ public void test_ColumnType_isOfType() { changes.setEndPointNow(); assertThat(table) - .column("var1").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var2").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var3").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var4").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var5").isText(false).isOfType(ValueType.TEXT, false) - .column("var6").isText(false).isOfType(ValueType.TEXT, false) - .column("var7").isText(false).isOfType(ValueType.TEXT, false) - .column("var8").isText(false).isOfType(ValueType.TEXT, false) - .column("var9").isText(false).isOfType(ValueType.TEXT, false) - .column("var10").isDate(false).isOfType(ValueType.DATE, false) - .column("var11").isTime(false).isOfType(ValueType.TIME, false) - .column("var12").isDateTime(false).isOfType(ValueType.DATE_TIME, false) - .column("var13").isDateTime(false).isOfType(ValueType.DATE_TIME, false) - .column("var14").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var15").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var16").isBoolean(false).isOfType(ValueType.BOOLEAN, false) - .column("var17").isBoolean(false).isOfType(ValueType.BOOLEAN, false) - .column("var18").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var19").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var20").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var21").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var22").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var23").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var24").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var25") - .column("var26") + .column("var1").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var2").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var3").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var4").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var5").isText(false).isOfType(ValueType.TEXT, false) + .column("var6").isText(false).isOfType(ValueType.TEXT, false) + .column("var7").isText(false).isOfType(ValueType.TEXT, false) + .column("var8").isText(false).isOfType(ValueType.TEXT, false) + .column("var9").isText(false).isOfType(ValueType.TEXT, false) + .column("var10").isDate(false).isOfType(ValueType.DATE, false) + .column("var11").isTime(false).isOfType(ValueType.TIME, false) + .column("var12").isDateTime(false).isOfType(ValueType.DATE_TIME, false) + .column("var13").isDateTime(false).isOfType(ValueType.DATE_TIME, false) + .column("var14").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var15").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var16").isBoolean(false).isOfType(ValueType.BOOLEAN, false) + .column("var17").isBoolean(false).isOfType(ValueType.BOOLEAN, false) + .column("var18").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var19").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var20").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var21").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var22").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var23").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var24").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var25") + .column("var26") ; assertThat(changes).change() - .column("var1").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var2").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var3").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var4").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var5").isText(false).isOfType(ValueType.TEXT, false) - .column("var6").isText(false).isOfType(ValueType.TEXT, false) - .column("var7").isText(false).isOfType(ValueType.TEXT, false) - .column("var8").isText(false).isOfType(ValueType.TEXT, false) - .column("var9").isText(false).isOfType(ValueType.TEXT, false) - .column("var10").isDate(false).isOfType(ValueType.DATE, false) - .column("var11").isTime(false).isOfType(ValueType.TIME, false) - .column("var12").isDateTime(false).isOfType(ValueType.DATE_TIME, false) - .column("var13").isDateTime(false).isOfType(ValueType.DATE_TIME, false) - .column("var14").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var15").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var16").isBoolean(false).isOfType(ValueType.BOOLEAN, false) - .column("var17").isBoolean(false).isOfType(ValueType.BOOLEAN, false) - .column("var18").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var19").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var20").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var21").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var22").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var23").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var24").isBytes(false).isOfType(ValueType.BYTES, false) - .column("var25") - .column("var26") + .column("var1").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var2").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var3").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var4").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var5").isText(false).isOfType(ValueType.TEXT, false) + .column("var6").isText(false).isOfType(ValueType.TEXT, false) + .column("var7").isText(false).isOfType(ValueType.TEXT, false) + .column("var8").isText(false).isOfType(ValueType.TEXT, false) + .column("var9").isText(false).isOfType(ValueType.TEXT, false) + .column("var10").isDate(false).isOfType(ValueType.DATE, false) + .column("var11").isTime(false).isOfType(ValueType.TIME, false) + .column("var12").isDateTime(false).isOfType(ValueType.DATE_TIME, false) + .column("var13").isDateTime(false).isOfType(ValueType.DATE_TIME, false) + .column("var14").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var15").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var16").isBoolean(false).isOfType(ValueType.BOOLEAN, false) + .column("var17").isBoolean(false).isOfType(ValueType.BOOLEAN, false) + .column("var18").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var19").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var20").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var21").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var22").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var23").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var24").isBytes(false).isOfType(ValueType.BYTES, false) + .column("var25") + .column("var26") ; } @@ -367,68 +373,68 @@ public void test_ColumnOfChangeEquality_hasValues() { changes.setEndPointNow(); assertThat(changes).change() - .column("var1").hasValues(1) - .column("var2").hasValues(2, 20) - .column("var3").hasValues(3.3) - .column("var4").hasValues(4.4) - .column("var5").hasValues("5") - .column("var6").hasValues("6") - .column("var7").hasValues("7") - .column("var8").hasValues("8") - .column("var9").hasValues("9") - .column("var10").hasValues(DateValue.of(2007, 12, 23)) - .column("var11").hasValues(TimeValue.of(9, 1)) - .column("var12").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .column("var13").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .column("var14").hasValues(10) - .column("var15").hasValues(11) - .column("var16").hasValues(true) - .column("var17").hasValues(false) - .column("var18").hasValues(12) - .column("var19").hasValues(13) - .column("var20").hasValues(14) - .column("var21").hasValues(15) - .column("var22").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var23").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var24").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var25").hasValues(Locale.FRENCH) - .column("var26").hasValues(Locale.FRENCH) + .column("var1").hasValues(1) + .column("var2").hasValues(2, 20) + .column("var3").hasValues(3.3) + .column("var4").hasValues(4.4) + .column("var5").hasValues("5") + .column("var6").hasValues("6") + .column("var7").hasValues("7") + .column("var8").hasValues("8") + .column("var9").hasValues("9") + .column("var10").hasValues(DateValue.of(2007, 12, 23)) + .column("var11").hasValues(TimeValue.of(9, 1)) + .column("var12").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .column("var13").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .column("var14").hasValues(10) + .column("var15").hasValues(11) + .column("var16").hasValues(true) + .column("var17").hasValues(false) + .column("var18").hasValues(12) + .column("var19").hasValues(13) + .column("var20").hasValues(14) + .column("var21").hasValues(15) + .column("var22").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var23").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var24").hasValues(bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var25").hasValues(Locale.FRENCH) + .column("var26").hasValues(Locale.FRENCH) ; assertThat(changes).change() - .column("var1").hasValues(1, 1) - .column("var2").hasValues(2, 20) - .column("var3").hasValues(3.3, 3.3) - .column("var4").hasValues(4.4, 4.4) - .column("var5").hasValues("5", "5") - .column("var6").hasValues("6", "6") - .column("var7").hasValues("7", "7") - .column("var8").hasValues("8", "8") - .column("var9").hasValues("9", "9") - .column("var10").hasValues(DateValue.of(2007, 12, 23), DateValue.of(2007, 12, 23)) - .column("var11").hasValues(TimeValue.of(9, 1), TimeValue.of(9, 1)) - .column("var12").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .column("var13").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .column("var14").hasValues(10, 10) - .column("var15").hasValues(11, 11) - .column("var16").hasValues(true, true) - .column("var17").hasValues(false, false) - .column("var18").hasValues(12, 12) - .column("var19").hasValues(13, 13) - .column("var20").hasValues(14, 14) - .column("var21").hasValues(15, 15) - .column("var22").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var23").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var24").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png")) - .column("var25").hasValues(Locale.FRENCH, - Locale.FRENCH) - .column("var26").hasValues(Locale.FRENCH, - Locale.FRENCH) + .column("var1").hasValues(1, 1) + .column("var2").hasValues(2, 20) + .column("var3").hasValues(3.3, 3.3) + .column("var4").hasValues(4.4, 4.4) + .column("var5").hasValues("5", "5") + .column("var6").hasValues("6", "6") + .column("var7").hasValues("7", "7") + .column("var8").hasValues("8", "8") + .column("var9").hasValues("9", "9") + .column("var10").hasValues(DateValue.of(2007, 12, 23), DateValue.of(2007, 12, 23)) + .column("var11").hasValues(TimeValue.of(9, 1), TimeValue.of(9, 1)) + .column("var12").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .column("var13").hasValues(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .column("var14").hasValues(10, 10) + .column("var15").hasValues(11, 11) + .column("var16").hasValues(true, true) + .column("var17").hasValues(false, false) + .column("var18").hasValues(12, 12) + .column("var19").hasValues(13, 13) + .column("var20").hasValues(14, 14) + .column("var21").hasValues(15, 15) + .column("var22").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var23").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var24").hasValues(bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png")) + .column("var25").hasValues(Locale.FRENCH, + Locale.FRENCH) + .column("var26").hasValues(Locale.FRENCH, + Locale.FRENCH) ; } @@ -441,61 +447,61 @@ public void test_RowEquality_hasValues() { changes.setEndPointNow(); assertThat(table).row() - .hasValues(1, - 20, - 3.3, - 4.4, - "5", - "6", - "7", - "8", - "9", - DateValue.of(2007, 12, 23), - TimeValue.of(9, 1), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)), - 10, - 11, - true, - false, - 12, - 13, - 14, - 15, - bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png"), - Locale.FRENCH, - Locale.FRENCH) + .hasValues(1, + 20, + 3.3, + 4.4, + "5", + "6", + "7", + "8", + "9", + DateValue.of(2007, 12, 23), + TimeValue.of(9, 1), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)), + 10, + 11, + true, + false, + 12, + 13, + 14, + 15, + bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png"), + Locale.FRENCH, + Locale.FRENCH) ; assertThat(changes).change().rowAtStartPoint() - .hasValues(1, - 2, - 3.3, - 4.4, - "5", - "6", - "7", - "8", - "9", - DateValue.of(2007, 12, 23), - TimeValue.of(9, 1), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)), - 10, - 11, - true, - false, - 12, - 13, - 14, - 15, - bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png"), - bytesContentFromClassPathOf("h2-logo-2.png"), - Locale.FRENCH, - Locale.FRENCH) + .hasValues(1, + 2, + 3.3, + 4.4, + "5", + "6", + "7", + "8", + "9", + DateValue.of(2007, 12, 23), + TimeValue.of(9, 1), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)), + 10, + 11, + true, + false, + 12, + 13, + 14, + 15, + bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png"), + bytesContentFromClassPathOf("h2-logo-2.png"), + Locale.FRENCH, + Locale.FRENCH) ; } @@ -508,61 +514,61 @@ public void test_ValueClass_isOfClass() { changes.setEndPointNow(); assertThat(table).row() - .value("var1").isOfClass(Integer.class) - .value("var2").isOfClass(Integer.class) - .value("var3").isOfClass(Double.class) - .value("var4").isOfClass(Double.class) - .value("var5").isOfClass(String.class) - .value("var6").isOfClass(String.class) - .value("var7").isOfClass(String.class) - .value("var8").isOfClass(String.class) - .value("var9").isOfClass(String.class) - .value("var10").isOfClass(Date.class) - .value("var11").isOfClass(Time.class) - .value("var12").isOfClass(Timestamp.class) - .value("var13").isOfClass(Timestamp.class) - .value("var14").isOfClass(BigDecimal.class) - .value("var15").isOfClass(BigDecimal.class) - .value("var16").isOfClass(Boolean.class) - .value("var17").isOfClass(Boolean.class) - .value("var18").isOfClass(Integer.class) - .value("var19").isOfClass(Integer.class) - .value("var20").isOfClass(Long.class) - .value("var21").isOfClass(Double.class) - .value("var22").isOfClass(byte[].class) - .value("var23").isOfClass(byte[].class) - .value("var24").isOfClass(byte[].class) - .value("var25").isOfClass(Locale.class) - .value("var26").isOfClass(Locale.class) + .value("var1").isOfClass(Integer.class) + .value("var2").isOfClass(Integer.class) + .value("var3").isOfClass(Double.class) + .value("var4").isOfClass(Double.class) + .value("var5").isOfClass(String.class) + .value("var6").isOfClass(String.class) + .value("var7").isOfClass(String.class) + .value("var8").isOfClass(String.class) + .value("var9").isOfClass(String.class) + .value("var10").isOfClass(Date.class) + .value("var11").isOfClass(Time.class) + .value("var12").isOfClass(Timestamp.class) + .value("var13").isOfClass(Timestamp.class) + .value("var14").isOfClass(BigDecimal.class) + .value("var15").isOfClass(BigDecimal.class) + .value("var16").isOfClass(Boolean.class) + .value("var17").isOfClass(Boolean.class) + .value("var18").isOfClass(Integer.class) + .value("var19").isOfClass(Integer.class) + .value("var20").isOfClass(Long.class) + .value("var21").isOfClass(Double.class) + .value("var22").isOfClass(byte[].class) + .value("var23").isOfClass(byte[].class) + .value("var24").isOfClass(byte[].class) + .value("var25").isOfClass(Locale.class) + .value("var26").isOfClass(Locale.class) ; assertThat(changes).change().rowAtStartPoint() - .value("var1").isOfClass(Integer.class) - .value("var2").isOfClass(Integer.class) - .value("var3").isOfClass(Double.class) - .value("var4").isOfClass(Double.class) - .value("var5").isOfClass(String.class) - .value("var6").isOfClass(String.class) - .value("var7").isOfClass(String.class) - .value("var8").isOfClass(String.class) - .value("var9").isOfClass(String.class) - .value("var10").isOfClass(Date.class) - .value("var11").isOfClass(Time.class) - .value("var12").isOfClass(Timestamp.class) - .value("var13").isOfClass(Timestamp.class) - .value("var14").isOfClass(BigDecimal.class) - .value("var15").isOfClass(BigDecimal.class) - .value("var16").isOfClass(Boolean.class) - .value("var17").isOfClass(Boolean.class) - .value("var18").isOfClass(Integer.class) - .value("var19").isOfClass(Integer.class) - .value("var20").isOfClass(Long.class) - .value("var21").isOfClass(Double.class) - .value("var22").isOfClass(byte[].class) - .value("var23").isOfClass(byte[].class) - .value("var24").isOfClass(byte[].class) - .value("var25").isOfClass(Locale.class) - .value("var26").isOfClass(Locale.class) + .value("var1").isOfClass(Integer.class) + .value("var2").isOfClass(Integer.class) + .value("var3").isOfClass(Double.class) + .value("var4").isOfClass(Double.class) + .value("var5").isOfClass(String.class) + .value("var6").isOfClass(String.class) + .value("var7").isOfClass(String.class) + .value("var8").isOfClass(String.class) + .value("var9").isOfClass(String.class) + .value("var10").isOfClass(Date.class) + .value("var11").isOfClass(Time.class) + .value("var12").isOfClass(Timestamp.class) + .value("var13").isOfClass(Timestamp.class) + .value("var14").isOfClass(BigDecimal.class) + .value("var15").isOfClass(BigDecimal.class) + .value("var16").isOfClass(Boolean.class) + .value("var17").isOfClass(Boolean.class) + .value("var18").isOfClass(Integer.class) + .value("var19").isOfClass(Integer.class) + .value("var20").isOfClass(Long.class) + .value("var21").isOfClass(Double.class) + .value("var22").isOfClass(byte[].class) + .value("var23").isOfClass(byte[].class) + .value("var24").isOfClass(byte[].class) + .value("var25").isOfClass(Locale.class) + .value("var26").isOfClass(Locale.class) ; } @@ -575,61 +581,61 @@ public void test_ValueEquality_isEqualTo() { changes.setEndPointNow(); assertThat(table).row() - .value("var1").isEqualTo(1) - .value("var2").isEqualTo(20) - .value("var3").isEqualTo(3.3) - .value("var4").isEqualTo(4.4) - .value("var5").isEqualTo("5") - .value("var6").isEqualTo("6") - .value("var7").isEqualTo("7") - .value("var8").isEqualTo("8") - .value("var9").isEqualTo("9") - .value("var10").isEqualTo(DateValue.of(2007, 12, 23)) - .value("var11").isEqualTo(TimeValue.of(9, 1)) - .value("var12").isEqualTo(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .value("var13").isEqualTo(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .value("var14").isEqualTo(10) - .value("var15").isEqualTo(11) - .value("var16").isEqualTo(true) - .value("var17").isEqualTo(false) - .value("var18").isEqualTo(12) - .value("var19").isEqualTo(13) - .value("var20").isEqualTo(14) - .value("var21").isEqualTo(15) - .value("var22").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var23").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var24").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var25").isEqualTo(Locale.FRENCH) - .value("var26").isEqualTo(Locale.FRENCH) + .value("var1").isEqualTo(1) + .value("var2").isEqualTo(20) + .value("var3").isEqualTo(3.3) + .value("var4").isEqualTo(4.4) + .value("var5").isEqualTo("5") + .value("var6").isEqualTo("6") + .value("var7").isEqualTo("7") + .value("var8").isEqualTo("8") + .value("var9").isEqualTo("9") + .value("var10").isEqualTo(DateValue.of(2007, 12, 23)) + .value("var11").isEqualTo(TimeValue.of(9, 1)) + .value("var12").isEqualTo(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .value("var13").isEqualTo(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .value("var14").isEqualTo(10) + .value("var15").isEqualTo(11) + .value("var16").isEqualTo(true) + .value("var17").isEqualTo(false) + .value("var18").isEqualTo(12) + .value("var19").isEqualTo(13) + .value("var20").isEqualTo(14) + .value("var21").isEqualTo(15) + .value("var22").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var23").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var24").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var25").isEqualTo(Locale.FRENCH) + .value("var26").isEqualTo(Locale.FRENCH) ; assertThat(changes).change().rowAtStartPoint() - .value("var1").isEqualTo(1) - .value("var2").isEqualTo(2) - .value("var3").isEqualTo(3.3) - .value("var4").isEqualTo(4.4) - .value("var5").isEqualTo("5") - .value("var6").isEqualTo("6") - .value("var7").isEqualTo("7") - .value("var8").isEqualTo("8") - .value("var9").isEqualTo("9") - .value("var10").isEqualTo(DateValue.of(2007, 12, 23)) - .value("var11").isEqualTo(TimeValue.of(9, 1)) - .value("var12").isEqualTo(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .value("var13").isEqualTo(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) - .value("var14").isEqualTo(10) - .value("var15").isEqualTo(11) - .value("var16").isEqualTo(true) - .value("var17").isEqualTo(false) - .value("var18").isEqualTo(12) - .value("var19").isEqualTo(13) - .value("var20").isEqualTo(14) - .value("var21").isEqualTo(15) - .value("var22").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var23").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var24").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) - .value("var25").isEqualTo(Locale.FRENCH) - .value("var26").isEqualTo(Locale.FRENCH) + .value("var1").isEqualTo(1) + .value("var2").isEqualTo(2) + .value("var3").isEqualTo(3.3) + .value("var4").isEqualTo(4.4) + .value("var5").isEqualTo("5") + .value("var6").isEqualTo("6") + .value("var7").isEqualTo("7") + .value("var8").isEqualTo("8") + .value("var9").isEqualTo("9") + .value("var10").isEqualTo(DateValue.of(2007, 12, 23)) + .value("var11").isEqualTo(TimeValue.of(9, 1)) + .value("var12").isEqualTo(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .value("var13").isEqualTo(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))) + .value("var14").isEqualTo(10) + .value("var15").isEqualTo(11) + .value("var16").isEqualTo(true) + .value("var17").isEqualTo(false) + .value("var18").isEqualTo(12) + .value("var19").isEqualTo(13) + .value("var20").isEqualTo(14) + .value("var21").isEqualTo(15) + .value("var22").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var23").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var24").isEqualTo(bytesContentFromClassPathOf("h2-logo-2.png")) + .value("var25").isEqualTo(Locale.FRENCH) + .value("var26").isEqualTo(Locale.FRENCH) ; } @@ -642,61 +648,61 @@ public void test_ValueNonEquality_isNotEqualTo() { changes.setEndPointNow(); assertThat(table).row() - .value("var1").isNotEqualTo(10) - .value("var2").isNotEqualTo(200) - .value("var3").isNotEqualTo(30.3) - .value("var4").isNotEqualTo(40.4) - .value("var5").isNotEqualTo("50") - .value("var6").isNotEqualTo("60") - .value("var7").isNotEqualTo("70") - .value("var8").isNotEqualTo("80") - .value("var9").isNotEqualTo("90") - .value("var10").isNotEqualTo(DateValue.of(2006, 12, 23)) - .value("var11").isNotEqualTo(TimeValue.of(9, 10)) - .value("var12").isNotEqualTo(DateTimeValue.of(DateValue.of(2006, 12, 23), TimeValue.of(9, 1))) - .value("var13").isNotEqualTo(DateTimeValue.of(DateValue.of(2006, 12, 23), TimeValue.of(9, 1))) - .value("var14").isNotEqualTo(100) - .value("var15").isNotEqualTo(110) - .value("var16").isNotEqualTo(false) - .value("var17").isNotEqualTo(true) - .value("var18").isNotEqualTo(120) - .value("var19").isNotEqualTo(130) - .value("var20").isNotEqualTo(140) - .value("var21").isNotEqualTo(150) - .value("var22").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var23").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var24").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var25").isNotEqualTo(Locale.ENGLISH) - .value("var26").isNotEqualTo(Locale.ENGLISH) + .value("var1").isNotEqualTo(10) + .value("var2").isNotEqualTo(200) + .value("var3").isNotEqualTo(30.3) + .value("var4").isNotEqualTo(40.4) + .value("var5").isNotEqualTo("50") + .value("var6").isNotEqualTo("60") + .value("var7").isNotEqualTo("70") + .value("var8").isNotEqualTo("80") + .value("var9").isNotEqualTo("90") + .value("var10").isNotEqualTo(DateValue.of(2006, 12, 23)) + .value("var11").isNotEqualTo(TimeValue.of(9, 10)) + .value("var12").isNotEqualTo(DateTimeValue.of(DateValue.of(2006, 12, 23), TimeValue.of(9, 1))) + .value("var13").isNotEqualTo(DateTimeValue.of(DateValue.of(2006, 12, 23), TimeValue.of(9, 1))) + .value("var14").isNotEqualTo(100) + .value("var15").isNotEqualTo(110) + .value("var16").isNotEqualTo(false) + .value("var17").isNotEqualTo(true) + .value("var18").isNotEqualTo(120) + .value("var19").isNotEqualTo(130) + .value("var20").isNotEqualTo(140) + .value("var21").isNotEqualTo(150) + .value("var22").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var23").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var24").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var25").isNotEqualTo(Locale.ENGLISH) + .value("var26").isNotEqualTo(Locale.ENGLISH) ; assertThat(changes).change().rowAtStartPoint() - .value("var1").isNotEqualTo(10) - .value("var2").isNotEqualTo(200) - .value("var3").isNotEqualTo(30.3) - .value("var4").isNotEqualTo(40.4) - .value("var5").isNotEqualTo("50") - .value("var6").isNotEqualTo("60") - .value("var7").isNotEqualTo("70") - .value("var8").isNotEqualTo("80") - .value("var9").isNotEqualTo("90") - .value("var10").isNotEqualTo(DateValue.of(2006, 12, 23)) - .value("var11").isNotEqualTo(TimeValue.of(9, 10)) - .value("var12").isNotEqualTo(DateTimeValue.of(DateValue.of(2006, 12, 23), TimeValue.of(9, 1))) - .value("var13").isNotEqualTo(DateTimeValue.of(DateValue.of(2006, 12, 23), TimeValue.of(9, 1))) - .value("var14").isNotEqualTo(100) - .value("var15").isNotEqualTo(110) - .value("var16").isNotEqualTo(false) - .value("var17").isNotEqualTo(true) - .value("var18").isNotEqualTo(120) - .value("var19").isNotEqualTo(130) - .value("var20").isNotEqualTo(140) - .value("var21").isNotEqualTo(150) - .value("var22").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var23").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var24").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) - .value("var25").isNotEqualTo(Locale.ENGLISH) - .value("var26").isNotEqualTo(Locale.ENGLISH) + .value("var1").isNotEqualTo(10) + .value("var2").isNotEqualTo(200) + .value("var3").isNotEqualTo(30.3) + .value("var4").isNotEqualTo(40.4) + .value("var5").isNotEqualTo("50") + .value("var6").isNotEqualTo("60") + .value("var7").isNotEqualTo("70") + .value("var8").isNotEqualTo("80") + .value("var9").isNotEqualTo("90") + .value("var10").isNotEqualTo(DateValue.of(2006, 12, 23)) + .value("var11").isNotEqualTo(TimeValue.of(9, 10)) + .value("var12").isNotEqualTo(DateTimeValue.of(DateValue.of(2006, 12, 23), TimeValue.of(9, 1))) + .value("var13").isNotEqualTo(DateTimeValue.of(DateValue.of(2006, 12, 23), TimeValue.of(9, 1))) + .value("var14").isNotEqualTo(100) + .value("var15").isNotEqualTo(110) + .value("var16").isNotEqualTo(false) + .value("var17").isNotEqualTo(true) + .value("var18").isNotEqualTo(120) + .value("var19").isNotEqualTo(130) + .value("var20").isNotEqualTo(140) + .value("var21").isNotEqualTo(150) + .value("var22").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var23").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var24").isNotEqualTo(bytesContentFromClassPathOf("logo-dev.jpg")) + .value("var25").isNotEqualTo(Locale.ENGLISH) + .value("var26").isNotEqualTo(Locale.ENGLISH) ; } @@ -709,61 +715,61 @@ public void test_ValueType_isOfType() { changes.setEndPointNow(); assertThat(table).row() - .value("var1").isNumber().isOfType(ValueType.NUMBER) - .value("var2").isNumber().isOfType(ValueType.NUMBER) - .value("var3").isNumber().isOfType(ValueType.NUMBER) - .value("var4").isNumber().isOfType(ValueType.NUMBER) - .value("var5").isText().isOfType(ValueType.TEXT) - .value("var6").isText().isOfType(ValueType.TEXT) - .value("var7").isText().isOfType(ValueType.TEXT) - .value("var8").isText().isOfType(ValueType.TEXT) - .value("var9").isText().isOfType(ValueType.TEXT) - .value("var10").isDate().isOfType(ValueType.DATE) - .value("var11").isTime().isOfType(ValueType.TIME) - .value("var12").isDateTime().isOfType(ValueType.DATE_TIME) - .value("var13").isDateTime().isOfType(ValueType.DATE_TIME) - .value("var14").isNumber().isOfType(ValueType.NUMBER) - .value("var15").isNumber().isOfType(ValueType.NUMBER) - .value("var16").isBoolean().isOfType(ValueType.BOOLEAN) - .value("var17").isBoolean().isOfType(ValueType.BOOLEAN) - .value("var18").isNumber().isOfType(ValueType.NUMBER) - .value("var19").isNumber().isOfType(ValueType.NUMBER) - .value("var20").isNumber().isOfType(ValueType.NUMBER) - .value("var21").isNumber().isOfType(ValueType.NUMBER) - .value("var22").isBytes().isOfType(ValueType.BYTES) - .value("var23").isBytes().isOfType(ValueType.BYTES) - .value("var24").isBytes().isOfType(ValueType.BYTES) - .value("var25") - .value("var26") + .value("var1").isNumber().isOfType(ValueType.NUMBER) + .value("var2").isNumber().isOfType(ValueType.NUMBER) + .value("var3").isNumber().isOfType(ValueType.NUMBER) + .value("var4").isNumber().isOfType(ValueType.NUMBER) + .value("var5").isText().isOfType(ValueType.TEXT) + .value("var6").isText().isOfType(ValueType.TEXT) + .value("var7").isText().isOfType(ValueType.TEXT) + .value("var8").isText().isOfType(ValueType.TEXT) + .value("var9").isText().isOfType(ValueType.TEXT) + .value("var10").isDate().isOfType(ValueType.DATE) + .value("var11").isTime().isOfType(ValueType.TIME) + .value("var12").isDateTime().isOfType(ValueType.DATE_TIME) + .value("var13").isDateTime().isOfType(ValueType.DATE_TIME) + .value("var14").isNumber().isOfType(ValueType.NUMBER) + .value("var15").isNumber().isOfType(ValueType.NUMBER) + .value("var16").isBoolean().isOfType(ValueType.BOOLEAN) + .value("var17").isBoolean().isOfType(ValueType.BOOLEAN) + .value("var18").isNumber().isOfType(ValueType.NUMBER) + .value("var19").isNumber().isOfType(ValueType.NUMBER) + .value("var20").isNumber().isOfType(ValueType.NUMBER) + .value("var21").isNumber().isOfType(ValueType.NUMBER) + .value("var22").isBytes().isOfType(ValueType.BYTES) + .value("var23").isBytes().isOfType(ValueType.BYTES) + .value("var24").isBytes().isOfType(ValueType.BYTES) + .value("var25") + .value("var26") ; assertThat(changes).change().rowAtStartPoint() - .value("var1").isNumber().isOfType(ValueType.NUMBER) - .value("var2").isNumber().isOfType(ValueType.NUMBER) - .value("var3").isNumber().isOfType(ValueType.NUMBER) - .value("var4").isNumber().isOfType(ValueType.NUMBER) - .value("var5").isText().isOfType(ValueType.TEXT) - .value("var6").isText().isOfType(ValueType.TEXT) - .value("var7").isText().isOfType(ValueType.TEXT) - .value("var8").isText().isOfType(ValueType.TEXT) - .value("var9").isText().isOfType(ValueType.TEXT) - .value("var10").isDate().isOfType(ValueType.DATE) - .value("var11").isTime().isOfType(ValueType.TIME) - .value("var12").isDateTime().isOfType(ValueType.DATE_TIME) - .value("var13").isDateTime().isOfType(ValueType.DATE_TIME) - .value("var14").isNumber().isOfType(ValueType.NUMBER) - .value("var15").isNumber().isOfType(ValueType.NUMBER) - .value("var16").isBoolean().isOfType(ValueType.BOOLEAN) - .value("var17").isBoolean().isOfType(ValueType.BOOLEAN) - .value("var18").isNumber().isOfType(ValueType.NUMBER) - .value("var19").isNumber().isOfType(ValueType.NUMBER) - .value("var20").isNumber().isOfType(ValueType.NUMBER) - .value("var21").isNumber().isOfType(ValueType.NUMBER) - .value("var22").isBytes().isOfType(ValueType.BYTES) - .value("var23").isBytes().isOfType(ValueType.BYTES) - .value("var24").isBytes().isOfType(ValueType.BYTES) - .value("var25") - .value("var26") + .value("var1").isNumber().isOfType(ValueType.NUMBER) + .value("var2").isNumber().isOfType(ValueType.NUMBER) + .value("var3").isNumber().isOfType(ValueType.NUMBER) + .value("var4").isNumber().isOfType(ValueType.NUMBER) + .value("var5").isText().isOfType(ValueType.TEXT) + .value("var6").isText().isOfType(ValueType.TEXT) + .value("var7").isText().isOfType(ValueType.TEXT) + .value("var8").isText().isOfType(ValueType.TEXT) + .value("var9").isText().isOfType(ValueType.TEXT) + .value("var10").isDate().isOfType(ValueType.DATE) + .value("var11").isTime().isOfType(ValueType.TIME) + .value("var12").isDateTime().isOfType(ValueType.DATE_TIME) + .value("var13").isDateTime().isOfType(ValueType.DATE_TIME) + .value("var14").isNumber().isOfType(ValueType.NUMBER) + .value("var15").isNumber().isOfType(ValueType.NUMBER) + .value("var16").isBoolean().isOfType(ValueType.BOOLEAN) + .value("var17").isBoolean().isOfType(ValueType.BOOLEAN) + .value("var18").isNumber().isOfType(ValueType.NUMBER) + .value("var19").isNumber().isOfType(ValueType.NUMBER) + .value("var20").isNumber().isOfType(ValueType.NUMBER) + .value("var21").isNumber().isOfType(ValueType.NUMBER) + .value("var22").isBytes().isOfType(ValueType.BYTES) + .value("var23").isBytes().isOfType(ValueType.BYTES) + .value("var24").isBytes().isOfType(ValueType.BYTES) + .value("var25") + .value("var26") ; } } diff --git a/src/test/java/org/assertj/db/database/sqlite/AbstractSqliteTest.java b/src/test/java/org/assertj/db/database/sqlite/AbstractSqliteTest.java index 9507ab69..d46c3484 100644 --- a/src/test/java/org/assertj/db/database/sqlite/AbstractSqliteTest.java +++ b/src/test/java/org/assertj/db/database/sqlite/AbstractSqliteTest.java @@ -8,38 +8,43 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.database.sqlite; -import com.ninja_squad.dbsetup.DbSetup; -import com.ninja_squad.dbsetup.DbSetupTracker; -import com.ninja_squad.dbsetup.destination.DriverManagerDestination; -import com.ninja_squad.dbsetup.operation.Operation; -import org.assertj.db.database.AbstractDatabaseTest; -import org.assertj.db.type.DataSourceWithLetterCase; -import org.assertj.db.type.SourceWithLetterCase; -import org.assertj.db.type.lettercase.LetterCase; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.test.context.ContextConfiguration; +import static com.ninja_squad.dbsetup.Operations.deleteAllFrom; +import static com.ninja_squad.dbsetup.Operations.insertInto; +import static com.ninja_squad.dbsetup.Operations.sequenceOf; -import javax.sql.DataSource; import java.io.ByteArrayOutputStream; import java.io.InputStream; import java.sql.Time; import java.sql.Timestamp; import java.util.logging.Level; +import javax.sql.DataSource; -import static com.ninja_squad.dbsetup.Operations.*; +import org.assertj.db.database.AbstractDatabaseTest; +import org.assertj.db.type.DataSourceWithLetterCase; +import org.assertj.db.type.SourceWithLetterCase; +import org.assertj.db.type.lettercase.LetterCase; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.test.context.ContextConfiguration; + +import com.ninja_squad.dbsetup.DbSetup; +import com.ninja_squad.dbsetup.DbSetupTracker; +import com.ninja_squad.dbsetup.destination.DriverManagerDestination; +import com.ninja_squad.dbsetup.operation.Operation; /** * Parent for all the tests which are specific for Derby database. * * @author Régis Pouiller */ -@ContextConfiguration(classes = { SqliteConfiguration.class }) +@ContextConfiguration(classes = {SqliteConfiguration.class}) public abstract class AbstractSqliteTest extends AbstractDatabaseTest { + private static final Operation DELETE_ALL = deleteAllFrom("teSt"); + private static final DbSetupTracker DB_SETUP_TRACKER = new DbSetupTracker(); private static byte[] BYTES; static { @@ -58,40 +63,34 @@ public abstract class AbstractSqliteTest extends AbstractDatabaseTest { } } - protected DataSource dataSource; - protected DataSourceWithLetterCase dataSourceDDD; - protected DataSourceWithLetterCase dataSourceUIUIUI; - protected DataSourceWithLetterCase dataSourceNSNSNS; + private static final Operation INSERT_TEST = insertInto("teSt") + .columns("Var1", "vAr2", "vaR3", "var4", "var5", "var6", "var7", "var8", "var9", "var10", + "var11", "var12", "var13", "var14", "var15", "var16", "var17", "var18", "var19", "var20") + .values(1, "13", "2", "14", "15", + Timestamp.valueOf("2007-12-23 09:01:00"), 3.3, 4.4, 5.5, 6.6, + 7, "8", "16", 9, 10.1, + 11, Time.valueOf("09:01:00"), Timestamp.valueOf("2007-12-23 09:01:00"), "12", BYTES) + .build(); + private static final Operation OPERATIONS = sequenceOf(DELETE_ALL, INSERT_TEST); + private static final DbSetup DB_SETUP = new DbSetup(new DriverManagerDestination("jdbc:sqlite:target/testDerby.db", "", ""), + OPERATIONS); protected final SourceWithLetterCase sourceDDD = new SourceWithLetterCase("jdbc:sqlite:target/testDerby.db", "", "", - LetterCase.TABLE_DEFAULT, - LetterCase.COLUMN_DEFAULT, - LetterCase.PRIMARY_KEY_DEFAULT); + LetterCase.TABLE_DEFAULT, + LetterCase.COLUMN_DEFAULT, + LetterCase.PRIMARY_KEY_DEFAULT); protected final SourceWithLetterCase sourceUIUIUI = new SourceWithLetterCase("jdbc:sqlite:target/testDerby.db", "", "", - letterCaseUI, - letterCaseUI, - letterCaseUI); + letterCaseUI, + letterCaseUI, + letterCaseUI); protected final SourceWithLetterCase sourceNSNSNS = new SourceWithLetterCase("jdbc:sqlite:target/testDerby.db", "", "", - letterCaseNS, - letterCaseNS, - letterCaseNS); - - private static final Operation DELETE_ALL = deleteAllFrom("teSt"); - - private static final Operation INSERT_TEST = insertInto("teSt") - .columns("Var1", "vAr2", "vaR3", "var4", "var5", "var6", "var7", "var8", "var9", "var10", - "var11", "var12", "var13", "var14", "var15", "var16", "var17", "var18", "var19", "var20") - .values(1, "13", "2", "14", "15", - Timestamp.valueOf("2007-12-23 09:01:00"), 3.3, 4.4, 5.5, 6.6, - 7, "8", "16", 9, 10.1, - 11, Time.valueOf("09:01:00"), Timestamp.valueOf("2007-12-23 09:01:00"), "12", BYTES) - .build(); - - private static final Operation OPERATIONS = sequenceOf(DELETE_ALL, INSERT_TEST); - - private static final DbSetup DB_SETUP = new DbSetup(new DriverManagerDestination("jdbc:sqlite:target/testDerby.db", "", ""), - OPERATIONS); - private static final DbSetupTracker DB_SETUP_TRACKER = new DbSetupTracker(); + letterCaseNS, + letterCaseNS, + letterCaseNS); + protected DataSource dataSource; + protected DataSourceWithLetterCase dataSourceDDD; + protected DataSourceWithLetterCase dataSourceUIUIUI; + protected DataSourceWithLetterCase dataSourceNSNSNS; protected DbSetup getDbSetup() { return DB_SETUP; @@ -105,8 +104,8 @@ protected DbSetupTracker getDbSetupTracker() { protected void setDataSource(DataSource dataSource) { this.dataSource = dataSource; this.dataSourceDDD = new DataSourceWithLetterCase(dataSource, LetterCase.TABLE_DEFAULT, - LetterCase.COLUMN_DEFAULT, - LetterCase.PRIMARY_KEY_DEFAULT); + LetterCase.COLUMN_DEFAULT, + LetterCase.PRIMARY_KEY_DEFAULT); this.dataSourceUIUIUI = new DataSourceWithLetterCase(dataSource, letterCaseUI, letterCaseUI, letterCaseUI); this.dataSourceNSNSNS = new DataSourceWithLetterCase(dataSource, letterCaseNS, letterCaseNS, letterCaseNS); } diff --git a/src/test/java/org/assertj/db/database/sqlite/SqliteConfiguration.java b/src/test/java/org/assertj/db/database/sqlite/SqliteConfiguration.java index 0f23ace0..c2b6b9de 100644 --- a/src/test/java/org/assertj/db/database/sqlite/SqliteConfiguration.java +++ b/src/test/java/org/assertj/db/database/sqlite/SqliteConfiguration.java @@ -8,25 +8,24 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.database.sqlite; +import java.sql.Connection; +import java.sql.Statement; +import javax.sql.DataSource; + import org.apache.commons.dbcp2.BasicDataSource; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.jdbc.datasource.DataSourceTransactionManager; import org.springframework.transaction.PlatformTransactionManager; -import javax.sql.DataSource; -import java.sql.Connection; -import java.sql.Statement; - /** * Provides the configuration for the tests. * * @author Régis Pouiller - * */ @Configuration public class SqliteConfiguration { @@ -45,27 +44,27 @@ public DataSource dataSource() { try (Statement statement = connection.createStatement()) { statement.executeUpdate("drop table if exists teSt;"); statement.executeUpdate("create table teSt (" - + " Var1 BIGINT PRIMARY KEY,\n" - + " vAr2 BLOB,\n" - + " vaR3 CHAR,\n" - + " var4 CHAR FOR BIT DATA,\n" - + " var5 CLOB,\n" - + " var6 DATE,\n" - + " var7 DECIMAL,\n" - + " var8 DOUBLE,\n" - + " var9 DOUBLE PRECISION,\n" - + " var10 FLOAT,\n" - + " var11 INTEGER,\n" - + " var12 LONG VARCHAR,\n" - + " var13 LONG VARCHAR FOR BIT DATA,\n" - + " var14 NUMERIC,\n" - + " var15 REAL,\n" - + " var16 SMALLINT,\n" - + " var17 TIME,\n" - + " var18 TIMESTAMP,\n" - + " var19 VARCHAR,\n" - + " var20 VARCHAR FOR BIT DATA" - + " )"); + + " Var1 BIGINT PRIMARY KEY,\n" + + " vAr2 BLOB,\n" + + " vaR3 CHAR,\n" + + " var4 CHAR FOR BIT DATA,\n" + + " var5 CLOB,\n" + + " var6 DATE,\n" + + " var7 DECIMAL,\n" + + " var8 DOUBLE,\n" + + " var9 DOUBLE PRECISION,\n" + + " var10 FLOAT,\n" + + " var11 INTEGER,\n" + + " var12 LONG VARCHAR,\n" + + " var13 LONG VARCHAR FOR BIT DATA,\n" + + " var14 NUMERIC,\n" + + " var15 REAL,\n" + + " var16 SMALLINT,\n" + + " var17 TIME,\n" + + " var18 TIMESTAMP,\n" + + " var19 VARCHAR,\n" + + " var20 VARCHAR FOR BIT DATA" + + " )"); } } } catch (Exception e) { diff --git a/src/test/java/org/assertj/db/database/sqlite/SqliteDataBase_Test.java b/src/test/java/org/assertj/db/database/sqlite/SqliteDataBase_Test.java index ac60c2af..2d568606 100644 --- a/src/test/java/org/assertj/db/database/sqlite/SqliteDataBase_Test.java +++ b/src/test/java/org/assertj/db/database/sqlite/SqliteDataBase_Test.java @@ -8,15 +8,21 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.database.sqlite; -import org.junit.Test; +import static org.assertj.core.api.Assertions.assertThat; -import java.sql.*; +import java.sql.Connection; +import java.sql.DatabaseMetaData; +import java.sql.DriverManager; +import java.sql.ResultSet; +import java.sql.ResultSetMetaData; +import java.sql.SQLException; +import java.sql.Statement; -import static org.assertj.core.api.Assertions.assertThat; +import org.junit.Test; /** * Test on the Sqlite database. @@ -65,7 +71,7 @@ public void test_schema_for_source() throws SQLException { public void test_tables_for_data_source() throws SQLException { try (Connection connection = dataSource.getConnection()) { DatabaseMetaData databaseMetaData = connection.getMetaData(); - ResultSet resultSet = databaseMetaData.getTables(null, null, null, new String[] { "TABLE" }); + ResultSet resultSet = databaseMetaData.getTables(null, null, null, new String[]{"TABLE"}); assertThat(resultSet.next()).isTrue(); assertThat(resultSet.getString("TABLE_NAME")).isEqualTo("teSt"); assertThat(resultSet.next()).isFalse(); @@ -76,7 +82,7 @@ public void test_tables_for_data_source() throws SQLException { public void test_tables_for_source() throws SQLException { try (Connection connection = DriverManager.getConnection(URL, USER, PASSWORD)) { DatabaseMetaData databaseMetaData = connection.getMetaData(); - ResultSet resultSet = databaseMetaData.getTables(null, null, null, new String[] { "TABLE" }); + ResultSet resultSet = databaseMetaData.getTables(null, null, null, new String[]{"TABLE"}); assertThat(resultSet.next()).isTrue(); assertThat(resultSet.getString("TABLE_NAME")).isEqualTo("teSt"); assertThat(resultSet.next()).isFalse(); diff --git a/src/test/java/org/assertj/db/database/sqlite/SqliteDatabase_DataSource_DDD_Test.java b/src/test/java/org/assertj/db/database/sqlite/SqliteDatabase_DataSource_DDD_Test.java index 84ba7c91..fdca12f4 100644 --- a/src/test/java/org/assertj/db/database/sqlite/SqliteDatabase_DataSource_DDD_Test.java +++ b/src/test/java/org/assertj/db/database/sqlite/SqliteDatabase_DataSource_DDD_Test.java @@ -8,10 +8,17 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.database.sqlite; +import static org.assertj.db.api.Assertions.assertThat; +import static org.assertj.db.output.Outputs.output; + +import java.io.ByteArrayOutputStream; +import java.sql.Date; +import javax.sql.DataSource; + import org.assertj.core.api.Assertions; import org.assertj.db.common.NeedReload; import org.assertj.db.output.Outputs; @@ -22,13 +29,6 @@ import org.junit.Before; import org.junit.Test; -import javax.sql.DataSource; -import java.io.ByteArrayOutputStream; -import java.sql.Date; - -import static org.assertj.db.api.Assertions.assertThat; -import static org.assertj.db.output.Outputs.output; - /** * Test on the Sqlite database. * @@ -46,7 +46,7 @@ public void init() { @Test @NeedReload public void test_Outputs_output() { - Table table = new Table(dataSource, "test", null, new String[] {"var20"}); + Table table = new Table(dataSource, "test", null, new String[]{"var20"}); Changes changes = new Changes(table).setStartPointNow(); update(); changes.setEndPointNow(); @@ -63,111 +63,111 @@ public void test_Outputs_output() { ByteArrayOutputStream byteArrayOutputStream9 = new ByteArrayOutputStream(); ByteArrayOutputStream byteArrayOutputStream10 = new ByteArrayOutputStream(); Outputs.output(table).toStream(byteArrayOutputStream0) - .column().toStream(byteArrayOutputStream1) - .value().toStream(byteArrayOutputStream2) - .row().toStream(byteArrayOutputStream3) - .value().toStream(byteArrayOutputStream4) + .column().toStream(byteArrayOutputStream1) + .value().toStream(byteArrayOutputStream2) + .row().toStream(byteArrayOutputStream3) + .value().toStream(byteArrayOutputStream4) ; output(changes).toStream(byteArrayOutputStream5) - .change().toStream(byteArrayOutputStream6) - .rowAtEndPoint().toStream(byteArrayOutputStream7) - .value().toStream(byteArrayOutputStream8) - .column().toStream(byteArrayOutputStream9) - .valueAtEndPoint().toStream(byteArrayOutputStream10); + .change().toStream(byteArrayOutputStream6) + .rowAtEndPoint().toStream(byteArrayOutputStream7) + .value().toStream(byteArrayOutputStream8) + .column().toStream(byteArrayOutputStream9) + .valueAtEndPoint().toStream(byteArrayOutputStream10); Assertions.assertThat(byteArrayOutputStream0.toString()).isEqualTo(String.format("[teSt table]%n" - + "|-----------|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" - + "| | | * | | | | | | | | | | | | | | | | | | |%n" - + "| | PRIMARY | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 |%n" - + "| | KEY | (NUMBER) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (DATE) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (TEXT) |%n" - + "| | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 |%n" - + "|-----------|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" - + "| Index : 0 | 1 | 1 | 13 | 2 | 14 | 15 | 2007-12-23 | 3.3 | 4.4 | 5.5 | 6.6 | 20 | 8 | 16 | 9 | 10.1 | 11 | 09:01:00 | 2007-12-23 09:01:00.0 | 12 |%n" - + "|-----------|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n")); + + "|-----------|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" + + "| | | * | | | | | | | | | | | | | | | | | | |%n" + + "| | PRIMARY | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 |%n" + + "| | KEY | (NUMBER) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (DATE) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (TEXT) |%n" + + "| | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 |%n" + + "|-----------|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" + + "| Index : 0 | 1 | 1 | 13 | 2 | 14 | 15 | 2007-12-23 | 3.3 | 4.4 | 5.5 | 6.6 | 20 | 8 | 16 | 9 | 10.1 | 11 | 09:01:00 | 2007-12-23 09:01:00.0 | 12 |%n" + + "|-----------|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n")); Assertions.assertThat(byteArrayOutputStream1.toString()).isEqualTo(String.format("[Column at index 0 (column name : VAR1) of teSt table]%n" - + "|-----------|----------|%n" - + "| | VAR1 |%n" - + "| | (NUMBER) |%n" - + "|-----------|----------|%n" - + "| Index : 0 | 1 |%n" - + "|-----------|----------|%n")); + + "|-----------|----------|%n" + + "| | VAR1 |%n" + + "| | (NUMBER) |%n" + + "|-----------|----------|%n" + + "| Index : 0 | 1 |%n" + + "|-----------|----------|%n")); Assertions.assertThat(byteArrayOutputStream2.toString()).isEqualTo(String.format("[Value at index 0 of Column at index 0 (column name : VAR1) of teSt table]%n" - + "|----------|%n" - + "| VAR1 |%n" - + "| (NUMBER) |%n" - + "|----------|%n" - + "| 1 |%n" - + "|----------|%n")); + + "|----------|%n" + + "| VAR1 |%n" + + "| (NUMBER) |%n" + + "|----------|%n" + + "| 1 |%n" + + "|----------|%n")); Assertions.assertThat(byteArrayOutputStream3.toString()).isEqualTo(String.format("[Row at index 0 of teSt table]%n" - + "|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" - + "| | * | | | | | | | | | | | | | | | | | | |%n" - + "| PRIMARY | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 |%n" - + "| KEY | (NUMBER) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (DATE) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (TEXT) |%n" - + "| | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 |%n" - + "|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" - + "| 1 | 1 | 13 | 2 | 14 | 15 | 2007-12-23 | 3.3 | 4.4 | 5.5 | 6.6 | 20 | 8 | 16 | 9 | 10.1 | 11 | 09:01:00 | 2007-12-23 09:01:00.0 | 12 |%n" - + "|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n")); + + "|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" + + "| | * | | | | | | | | | | | | | | | | | | |%n" + + "| PRIMARY | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 |%n" + + "| KEY | (NUMBER) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (DATE) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (TEXT) |%n" + + "| | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 |%n" + + "|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" + + "| 1 | 1 | 13 | 2 | 14 | 15 | 2007-12-23 | 3.3 | 4.4 | 5.5 | 6.6 | 20 | 8 | 16 | 9 | 10.1 | 11 | 09:01:00 | 2007-12-23 09:01:00.0 | 12 |%n" + + "|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n")); Assertions.assertThat(byteArrayOutputStream4.toString()).isEqualTo(String.format("[Value at index 0 (column name : VAR1) of Row at index 0 of teSt table]%n" - + "|----------|%n" - + "| VAR1 |%n" - + "| (NUMBER) |%n" - + "|----------|%n" - + "| 1 |%n" - + "|----------|%n")); + + "|----------|%n" + + "| VAR1 |%n" + + "| (NUMBER) |%n" + + "|----------|%n" + + "| 1 |%n" + + "|----------|%n")); Assertions.assertThat(byteArrayOutputStream5.toString()).isEqualTo(String.format("[Changes on teSt table of a data source]%n" - + "|-----------|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" - + "| | | | | | * | | | | | | | | | | | | | | | | | | |%n" - + "| | TYPE | TABLE | PRIMARY | | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 |%n" - + "| | | | KEY | | (NUMBER) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (DATE) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (TEXT) |%n" - + "| | | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 |%n" - + "|-----------|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" - + "| | | | | At start point | 1 | 13 | 2 | 14 | 15 | 2007-12-23 | 3.3 | 4.4 | 5.5 | 6.6 | 7 | 8 | 16 | 9 | 10.1 | 11 | 09:01:00 | 2007-12-23 09:01:00.0 | 12 |%n" - + "| Index : 0 | MODIFICATION | teSt | 1 |----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" - + "| | | | | At end point | 1 | 13 | 2 | 14 | 15 | 2007-12-23 | 3.3 | 4.4 | 5.5 | 6.6 | 20 | 8 | 16 | 9 | 10.1 | 11 | 09:01:00 | 2007-12-23 09:01:00.0 | 12 |%n" - + "|-----------|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n")); + + "|-----------|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" + + "| | | | | | * | | | | | | | | | | | | | | | | | | |%n" + + "| | TYPE | TABLE | PRIMARY | | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 |%n" + + "| | | | KEY | | (NUMBER) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (DATE) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (TEXT) |%n" + + "| | | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 |%n" + + "|-----------|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" + + "| | | | | At start point | 1 | 13 | 2 | 14 | 15 | 2007-12-23 | 3.3 | 4.4 | 5.5 | 6.6 | 7 | 8 | 16 | 9 | 10.1 | 11 | 09:01:00 | 2007-12-23 09:01:00.0 | 12 |%n" + + "| Index : 0 | MODIFICATION | teSt | 1 |----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" + + "| | | | | At end point | 1 | 13 | 2 | 14 | 15 | 2007-12-23 | 3.3 | 4.4 | 5.5 | 6.6 | 20 | 8 | 16 | 9 | 10.1 | 11 | 09:01:00 | 2007-12-23 09:01:00.0 | 12 |%n" + + "|-----------|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n")); Assertions.assertThat(byteArrayOutputStream6.toString()).isEqualTo(String.format("[Change at index 0 (with primary key : [1]) of Changes on teSt table of a data source]%n" - + "|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" - + "| | | | | * | | | | | | | | | | | | | | | | | | |%n" - + "| TYPE | TABLE | PRIMARY | | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 |%n" - + "| | | KEY | | (NUMBER) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (DATE) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (TEXT) |%n" - + "| | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 |%n" - + "|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" - + "| | | | At start point | 1 | 13 | 2 | 14 | 15 | 2007-12-23 | 3.3 | 4.4 | 5.5 | 6.6 | 7 | 8 | 16 | 9 | 10.1 | 11 | 09:01:00 | 2007-12-23 09:01:00.0 | 12 |%n" - + "| MODIFICATION | teSt | 1 |----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" - + "| | | | At end point | 1 | 13 | 2 | 14 | 15 | 2007-12-23 | 3.3 | 4.4 | 5.5 | 6.6 | 20 | 8 | 16 | 9 | 10.1 | 11 | 09:01:00 | 2007-12-23 09:01:00.0 | 12 |%n" - + "|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n")); + + "|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" + + "| | | | | * | | | | | | | | | | | | | | | | | | |%n" + + "| TYPE | TABLE | PRIMARY | | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 |%n" + + "| | | KEY | | (NUMBER) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (DATE) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (TEXT) |%n" + + "| | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 |%n" + + "|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" + + "| | | | At start point | 1 | 13 | 2 | 14 | 15 | 2007-12-23 | 3.3 | 4.4 | 5.5 | 6.6 | 7 | 8 | 16 | 9 | 10.1 | 11 | 09:01:00 | 2007-12-23 09:01:00.0 | 12 |%n" + + "| MODIFICATION | teSt | 1 |----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" + + "| | | | At end point | 1 | 13 | 2 | 14 | 15 | 2007-12-23 | 3.3 | 4.4 | 5.5 | 6.6 | 20 | 8 | 16 | 9 | 10.1 | 11 | 09:01:00 | 2007-12-23 09:01:00.0 | 12 |%n" + + "|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n")); Assertions.assertThat(byteArrayOutputStream7.toString()).isEqualTo(String.format("[Row at end point of Change at index 0 (with primary key : [1]) of Changes on teSt table of a data source]%n" - + "|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" - + "| | * | | | | | | | | | | | | | | | | | | |%n" - + "| PRIMARY | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 |%n" - + "| KEY | (NUMBER) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (DATE) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (TEXT) |%n" - + "| | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 |%n" - + "|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" - + "| 1 | 1 | 13 | 2 | 14 | 15 | 2007-12-23 | 3.3 | 4.4 | 5.5 | 6.6 | 20 | 8 | 16 | 9 | 10.1 | 11 | 09:01:00 | 2007-12-23 09:01:00.0 | 12 |%n" - + "|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n")); + + "|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" + + "| | * | | | | | | | | | | | | | | | | | | |%n" + + "| PRIMARY | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 |%n" + + "| KEY | (NUMBER) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (DATE) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (TEXT) |%n" + + "| | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 |%n" + + "|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" + + "| 1 | 1 | 13 | 2 | 14 | 15 | 2007-12-23 | 3.3 | 4.4 | 5.5 | 6.6 | 20 | 8 | 16 | 9 | 10.1 | 11 | 09:01:00 | 2007-12-23 09:01:00.0 | 12 |%n" + + "|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n")); Assertions.assertThat(byteArrayOutputStream8.toString()).isEqualTo(String.format("[Value at index 0 (column name : VAR1) of Row at end point of Change at index 0 (with primary key : [1]) of Changes on teSt table of a data source]%n" - + "|----------|%n" - + "| VAR1 |%n" - + "| (NUMBER) |%n" - + "|----------|%n" - + "| 1 |%n" - + "|----------|%n")); + + "|----------|%n" + + "| VAR1 |%n" + + "| (NUMBER) |%n" + + "|----------|%n" + + "| 1 |%n" + + "|----------|%n")); Assertions.assertThat(byteArrayOutputStream9.toString()).isEqualTo(String.format("[Column at index 0 (column name : VAR1) of Change at index 0 (with primary key : [1]) of Changes on teSt table of a data source]%n" - + "|----------------|----------|%n" - + "| | VAR1 |%n" - + "| | (NUMBER) |%n" - + "|----------------|----------|%n" - + "| At start point | 1 |%n" - + "|----------------|----------|%n" - + "| At end point | 1 |%n" - + "|----------------|----------|%n")); + + "|----------------|----------|%n" + + "| | VAR1 |%n" + + "| | (NUMBER) |%n" + + "|----------------|----------|%n" + + "| At start point | 1 |%n" + + "|----------------|----------|%n" + + "| At end point | 1 |%n" + + "|----------------|----------|%n")); Assertions.assertThat(byteArrayOutputStream10.toString()).isEqualTo(String.format("[Value at end point of Column at index 0 (column name : VAR1) of Change at index 0 (with primary key : [1]) of Changes on teSt table of a data source]%n" - + "|----------|%n" - + "| VAR1 |%n" - + "| (NUMBER) |%n" - + "|----------|%n" - + "| 1 |%n" - + "|----------|%n")); + + "|----------|%n" + + "| VAR1 |%n" + + "| (NUMBER) |%n" + + "|----------|%n" + + "| 1 |%n" + + "|----------|%n")); } @Test @@ -191,49 +191,49 @@ public void test_ColumnName_hasColumnName() { changes.setEndPointNow(); assertThat(table) - .column().hasColumnName("var1") - .column().hasColumnName("var2") - .column().hasColumnName("var3") - .column().hasColumnName("var4") - .column().hasColumnName("var5") - .column().hasColumnName("var6") - .column().hasColumnName("var7") - .column().hasColumnName("var8") - .column().hasColumnName("var9") - .column().hasColumnName("var10") - .column().hasColumnName("var11") - .column().hasColumnName("var12") - .column().hasColumnName("var13") - .column().hasColumnName("var14") - .column().hasColumnName("var15") - .column().hasColumnName("var16") - .column().hasColumnName("var17") - .column().hasColumnName("var18") - .column().hasColumnName("var19") - .column().hasColumnName("var20") + .column().hasColumnName("var1") + .column().hasColumnName("var2") + .column().hasColumnName("var3") + .column().hasColumnName("var4") + .column().hasColumnName("var5") + .column().hasColumnName("var6") + .column().hasColumnName("var7") + .column().hasColumnName("var8") + .column().hasColumnName("var9") + .column().hasColumnName("var10") + .column().hasColumnName("var11") + .column().hasColumnName("var12") + .column().hasColumnName("var13") + .column().hasColumnName("var14") + .column().hasColumnName("var15") + .column().hasColumnName("var16") + .column().hasColumnName("var17") + .column().hasColumnName("var18") + .column().hasColumnName("var19") + .column().hasColumnName("var20") ; assertThat(changes).change() - .column().hasColumnName("var1") - .column().hasColumnName("var2") - .column().hasColumnName("var3") - .column().hasColumnName("var4") - .column().hasColumnName("var5") - .column().hasColumnName("var6") - .column().hasColumnName("var7") - .column().hasColumnName("var8") - .column().hasColumnName("var9") - .column().hasColumnName("var10") - .column().hasColumnName("var11") - .column().hasColumnName("var12") - .column().hasColumnName("var13") - .column().hasColumnName("var14") - .column().hasColumnName("var15") - .column().hasColumnName("var16") - .column().hasColumnName("var17") - .column().hasColumnName("var18") - .column().hasColumnName("var19") - .column().hasColumnName("var20") + .column().hasColumnName("var1") + .column().hasColumnName("var2") + .column().hasColumnName("var3") + .column().hasColumnName("var4") + .column().hasColumnName("var5") + .column().hasColumnName("var6") + .column().hasColumnName("var7") + .column().hasColumnName("var8") + .column().hasColumnName("var9") + .column().hasColumnName("var10") + .column().hasColumnName("var11") + .column().hasColumnName("var12") + .column().hasColumnName("var13") + .column().hasColumnName("var14") + .column().hasColumnName("var15") + .column().hasColumnName("var16") + .column().hasColumnName("var17") + .column().hasColumnName("var18") + .column().hasColumnName("var19") + .column().hasColumnName("var20") ; } @@ -246,131 +246,131 @@ public void test_ColumnClass_isOfClass() { changes.setEndPointNow(); assertThat(table) - .column("var1").isOfClass(Integer.class, false) - .column("var2").isOfClass(String.class, false) - .column("var3").isOfClass(String.class, false) - .column("var4").isOfClass(String.class, false) - .column("var5").isOfClass(String.class, false) - .column("var6").isOfClass(Date.class, false) - .column("var7").isOfClass(Double.class, false) - .column("var8").isOfClass(Double.class, false) - .column("var9").isOfClass(Double.class, false) - .column("var10").isOfClass(Double.class, false) - .column("var11").isOfClass(Integer.class, false) - .column("var12").isOfClass(String.class, false) - .column("var13").isOfClass(String.class, false) - .column("var14").isOfClass(Integer.class, false) - .column("var15").isOfClass(Double.class, false) - .column("var16").isOfClass(Integer.class, false) - .column("var17").isOfClass(String.class, false) - .column("var18").isOfClass(String.class, false) - .column("var19").isOfClass(String.class, false) - .column("var20").isOfClass(String.class, false) + .column("var1").isOfClass(Integer.class, false) + .column("var2").isOfClass(String.class, false) + .column("var3").isOfClass(String.class, false) + .column("var4").isOfClass(String.class, false) + .column("var5").isOfClass(String.class, false) + .column("var6").isOfClass(Date.class, false) + .column("var7").isOfClass(Double.class, false) + .column("var8").isOfClass(Double.class, false) + .column("var9").isOfClass(Double.class, false) + .column("var10").isOfClass(Double.class, false) + .column("var11").isOfClass(Integer.class, false) + .column("var12").isOfClass(String.class, false) + .column("var13").isOfClass(String.class, false) + .column("var14").isOfClass(Integer.class, false) + .column("var15").isOfClass(Double.class, false) + .column("var16").isOfClass(Integer.class, false) + .column("var17").isOfClass(String.class, false) + .column("var18").isOfClass(String.class, false) + .column("var19").isOfClass(String.class, false) + .column("var20").isOfClass(String.class, false) ; assertThat(changes).change() - .column("var1").isOfClass(Integer.class, false) - .column("var2").isOfClass(String.class, false) - .column("var3").isOfClass(String.class, false) - .column("var4").isOfClass(String.class, false) - .column("var5").isOfClass(String.class, false) - .column("var6").isOfClass(Date.class, false) - .column("var7").isOfClass(Double.class, false) - .column("var8").isOfClass(Double.class, false) - .column("var9").isOfClass(Double.class, false) - .column("var10").isOfClass(Double.class, false) - .column("var11").isOfClass(Integer.class, false) - .column("var12").isOfClass(String.class, false) - .column("var13").isOfClass(String.class, false) - .column("var14").isOfClass(Integer.class, false) - .column("var15").isOfClass(Double.class, false) - .column("var16").isOfClass(Integer.class, false) - .column("var17").isOfClass(String.class, false) - .column("var18").isOfClass(String.class, false) - .column("var19").isOfClass(String.class, false) - .column("var20").isOfClass(String.class, false) + .column("var1").isOfClass(Integer.class, false) + .column("var2").isOfClass(String.class, false) + .column("var3").isOfClass(String.class, false) + .column("var4").isOfClass(String.class, false) + .column("var5").isOfClass(String.class, false) + .column("var6").isOfClass(Date.class, false) + .column("var7").isOfClass(Double.class, false) + .column("var8").isOfClass(Double.class, false) + .column("var9").isOfClass(Double.class, false) + .column("var10").isOfClass(Double.class, false) + .column("var11").isOfClass(Integer.class, false) + .column("var12").isOfClass(String.class, false) + .column("var13").isOfClass(String.class, false) + .column("var14").isOfClass(Integer.class, false) + .column("var15").isOfClass(Double.class, false) + .column("var16").isOfClass(Integer.class, false) + .column("var17").isOfClass(String.class, false) + .column("var18").isOfClass(String.class, false) + .column("var19").isOfClass(String.class, false) + .column("var20").isOfClass(String.class, false) ; } @Test @NeedReload public void test_ColumnEquality_hasValues() { - Table table = new Table(dataSource, "test", null, new String[] {"var20"}); + Table table = new Table(dataSource, "test", null, new String[]{"var20"}); Changes changes = new Changes(table).setStartPointNow(); update(); changes.setEndPointNow(); assertThat(table).column("var1").hasValues(1) - .column("var2").hasValues("13") - .column("var3").hasValues("2") - .column("var4").hasValues("14") - .column("var5").hasValues("15") - .column("var6").hasValues(Date.valueOf("2007-12-23")) - .column("var7").hasValues(3.3) - .column("var8").hasValues(4.4) - .column("var9").hasValues(5.5) - .column("var10").hasValues(6.6) - .column("var11").hasValues(20) - .column("var12").hasValues("8") - .column("var13").hasValues("16") - .column("var14").hasValues(9) - .column("var15").hasValues(10.1) - .column("var16").hasValues(11) - .column("var17").hasValues("09:01:00") - .column("var18").hasValues("2007-12-23 09:01:00.0") - .column("var19").hasValues("12") + .column("var2").hasValues("13") + .column("var3").hasValues("2") + .column("var4").hasValues("14") + .column("var5").hasValues("15") + .column("var6").hasValues(Date.valueOf("2007-12-23")) + .column("var7").hasValues(3.3) + .column("var8").hasValues(4.4) + .column("var9").hasValues(5.5) + .column("var10").hasValues(6.6) + .column("var11").hasValues(20) + .column("var12").hasValues("8") + .column("var13").hasValues("16") + .column("var14").hasValues(9) + .column("var15").hasValues(10.1) + .column("var16").hasValues(11) + .column("var17").hasValues("09:01:00") + .column("var18").hasValues("2007-12-23 09:01:00.0") + .column("var19").hasValues("12") ; assertThat(changes).change() - .column("var1").hasValues(1) - .column("var2").hasValues("13") - .column("var3").hasValues("2") - .column("var4").hasValues("14") - .column("var5").hasValues("15") - .column("var6").hasValues(Date.valueOf("2007-12-23")) - .column("var7").hasValues(3.3) - .column("var8").hasValues(4.4) - .column("var9").hasValues(5.5) - .column("var10").hasValues(6.6) - .column("var11").hasValues(7, 20) - .column("var12").hasValues("8") - .column("var13").hasValues("16") - .column("var14").hasValues(9) - .column("var15").hasValues(10.1) - .column("var16").hasValues(11) - .column("var17").hasValues("09:01:00") - .column("var18").hasValues("2007-12-23 09:01:00.0") - .column("var19").hasValues("12") + .column("var1").hasValues(1) + .column("var2").hasValues("13") + .column("var3").hasValues("2") + .column("var4").hasValues("14") + .column("var5").hasValues("15") + .column("var6").hasValues(Date.valueOf("2007-12-23")) + .column("var7").hasValues(3.3) + .column("var8").hasValues(4.4) + .column("var9").hasValues(5.5) + .column("var10").hasValues(6.6) + .column("var11").hasValues(7, 20) + .column("var12").hasValues("8") + .column("var13").hasValues("16") + .column("var14").hasValues(9) + .column("var15").hasValues(10.1) + .column("var16").hasValues(11) + .column("var17").hasValues("09:01:00") + .column("var18").hasValues("2007-12-23 09:01:00.0") + .column("var19").hasValues("12") ; } @Test @NeedReload public void test_ColumnEquality_containsValues() { - Table table = new Table(dataSource, "test", null, new String[] {"var20"}); + Table table = new Table(dataSource, "test", null, new String[]{"var20"}); Changes changes = new Changes(table).setStartPointNow(); update(); changes.setEndPointNow(); assertThat(table).column("var1").containsValues(1) - .column("var2").containsValues("13") - .column("var3").containsValues("2") - .column("var4").containsValues("14") - .column("var5").containsValues("15") - .column("var6").containsValues(Date.valueOf("2007-12-23")) - .column("var7").containsValues(3.3) - .column("var8").containsValues(4.4) - .column("var9").containsValues(5.5) - .column("var10").containsValues(6.6) - .column("var11").containsValues(20) - .column("var12").containsValues("8") - .column("var13").containsValues("16") - .column("var14").containsValues(9) - .column("var15").containsValues(10.1) - .column("var16").containsValues(11) - .column("var17").containsValues("09:01:00") - .column("var18").containsValues("2007-12-23 09:01:00.0") - .column("var19").containsValues("12") + .column("var2").containsValues("13") + .column("var3").containsValues("2") + .column("var4").containsValues("14") + .column("var5").containsValues("15") + .column("var6").containsValues(Date.valueOf("2007-12-23")) + .column("var7").containsValues(3.3) + .column("var8").containsValues(4.4) + .column("var9").containsValues(5.5) + .column("var10").containsValues(6.6) + .column("var11").containsValues(20) + .column("var12").containsValues("8") + .column("var13").containsValues("16") + .column("var14").containsValues(9) + .column("var15").containsValues(10.1) + .column("var16").containsValues(11) + .column("var17").containsValues("09:01:00") + .column("var18").containsValues("2007-12-23 09:01:00.0") + .column("var19").containsValues("12") ; } @@ -383,124 +383,124 @@ public void test_ColumnType_isOfType() { changes.setEndPointNow(); assertThat(table).column("var1").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var2").isText(false).isOfType(ValueType.TEXT, false) - .column("var3").isText(false).isOfType(ValueType.TEXT, false) - .column("var4").isText(false).isOfType(ValueType.TEXT, false) - .column("var5").isText(false).isOfType(ValueType.TEXT, false) - .column("var6").isDate(false).isOfType(ValueType.DATE, false) - .column("var7").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var8").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var9").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var10").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var11").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var12").isText(false).isOfType(ValueType.TEXT, false) - .column("var13").isText(false).isOfType(ValueType.TEXT, false) - .column("var14").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var15").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var16").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var17").isText(false).isOfType(ValueType.TEXT, false) - .column("var18").isText(false).isOfType(ValueType.TEXT, false) - .column("var19").isText(false).isOfType(ValueType.TEXT, false) - .column("var20").isText(false).isOfType(ValueType.TEXT, false) + .column("var2").isText(false).isOfType(ValueType.TEXT, false) + .column("var3").isText(false).isOfType(ValueType.TEXT, false) + .column("var4").isText(false).isOfType(ValueType.TEXT, false) + .column("var5").isText(false).isOfType(ValueType.TEXT, false) + .column("var6").isDate(false).isOfType(ValueType.DATE, false) + .column("var7").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var8").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var9").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var10").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var11").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var12").isText(false).isOfType(ValueType.TEXT, false) + .column("var13").isText(false).isOfType(ValueType.TEXT, false) + .column("var14").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var15").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var16").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var17").isText(false).isOfType(ValueType.TEXT, false) + .column("var18").isText(false).isOfType(ValueType.TEXT, false) + .column("var19").isText(false).isOfType(ValueType.TEXT, false) + .column("var20").isText(false).isOfType(ValueType.TEXT, false) ; assertThat(changes).change() - .column("var1").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var2").isText(false).isOfType(ValueType.TEXT, false) - .column("var3").isText(false).isOfType(ValueType.TEXT, false) - .column("var4").isText(false).isOfType(ValueType.TEXT, false) - .column("var5").isText(false).isOfType(ValueType.TEXT, false) - .column("var6").isDate(false).isOfType(ValueType.DATE, false) - .column("var7").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var8").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var9").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var10").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var11").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var12").isText(false).isOfType(ValueType.TEXT, false) - .column("var13").isText(false).isOfType(ValueType.TEXT, false) - .column("var14").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var15").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var16").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var17").isText(false).isOfType(ValueType.TEXT, false) - .column("var18").isText(false).isOfType(ValueType.TEXT, false) - .column("var19").isText(false).isOfType(ValueType.TEXT, false) - .column("var20").isText(false).isOfType(ValueType.TEXT, false) + .column("var1").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var2").isText(false).isOfType(ValueType.TEXT, false) + .column("var3").isText(false).isOfType(ValueType.TEXT, false) + .column("var4").isText(false).isOfType(ValueType.TEXT, false) + .column("var5").isText(false).isOfType(ValueType.TEXT, false) + .column("var6").isDate(false).isOfType(ValueType.DATE, false) + .column("var7").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var8").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var9").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var10").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var11").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var12").isText(false).isOfType(ValueType.TEXT, false) + .column("var13").isText(false).isOfType(ValueType.TEXT, false) + .column("var14").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var15").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var16").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var17").isText(false).isOfType(ValueType.TEXT, false) + .column("var18").isText(false).isOfType(ValueType.TEXT, false) + .column("var19").isText(false).isOfType(ValueType.TEXT, false) + .column("var20").isText(false).isOfType(ValueType.TEXT, false) ; } @Test @NeedReload public void test_ColumnOfChangeEquality_hasValues() { - Table table = new Table(dataSource, "test", null, new String[] {"var20"}); + Table table = new Table(dataSource, "test", null, new String[]{"var20"}); Changes changes = new Changes(table).setStartPointNow(); update(); changes.setEndPointNow(); assertThat(changes).change() - .column("var1").hasValues(1) - .column("var2").hasValues("13") - .column("var3").hasValues("2") - .column("var4").hasValues("14") - .column("var5").hasValues("15") - .column("var6").hasValues(Date.valueOf("2007-12-23")) - .column("var7").hasValues(3.3) - .column("var8").hasValues(4.4) - .column("var9").hasValues(5.5) - .column("var10").hasValues(6.6) - .column("var11").hasValues(7, 20) - .column("var12").hasValues("8") - .column("var13").hasValues("16") - .column("var14").hasValues(9) - .column("var15").hasValues(10.1) - .column("var16").hasValues(11) - .column("var17").hasValues("09:01:00") - .column("var18").hasValues("2007-12-23 09:01:00.0") - .column("var19").hasValues("12") + .column("var1").hasValues(1) + .column("var2").hasValues("13") + .column("var3").hasValues("2") + .column("var4").hasValues("14") + .column("var5").hasValues("15") + .column("var6").hasValues(Date.valueOf("2007-12-23")) + .column("var7").hasValues(3.3) + .column("var8").hasValues(4.4) + .column("var9").hasValues(5.5) + .column("var10").hasValues(6.6) + .column("var11").hasValues(7, 20) + .column("var12").hasValues("8") + .column("var13").hasValues("16") + .column("var14").hasValues(9) + .column("var15").hasValues(10.1) + .column("var16").hasValues(11) + .column("var17").hasValues("09:01:00") + .column("var18").hasValues("2007-12-23 09:01:00.0") + .column("var19").hasValues("12") ; assertThat(changes).change() - .column("var1").hasValues(1, 1) - .column("var2").hasValues("13", "13") - .column("var3").hasValues("2", "2") - .column("var4").hasValues("14", "14") - .column("var5").hasValues("15", "15") - .column("var6").hasValues(Date.valueOf("2007-12-23"), Date.valueOf("2007-12-23")) - .column("var7").hasValues(3.3, 3.3) - .column("var8").hasValues(4.4, 4.4) - .column("var9").hasValues(5.5, 5.5) - .column("var10").hasValues(6.6, 6.6) - .column("var11").hasValues(7, 20) - .column("var12").hasValues("8", "8") - .column("var13").hasValues("16", "16") - .column("var14").hasValues(9, 9) - .column("var15").hasValues(10.1, 10.1) - .column("var16").hasValues(11, 11) - .column("var17").hasValues("09:01:00", "09:01:00") - .column("var18").hasValues("2007-12-23 09:01:00.0", "2007-12-23 09:01:00.0") - .column("var19").hasValues("12", "12") + .column("var1").hasValues(1, 1) + .column("var2").hasValues("13", "13") + .column("var3").hasValues("2", "2") + .column("var4").hasValues("14", "14") + .column("var5").hasValues("15", "15") + .column("var6").hasValues(Date.valueOf("2007-12-23"), Date.valueOf("2007-12-23")) + .column("var7").hasValues(3.3, 3.3) + .column("var8").hasValues(4.4, 4.4) + .column("var9").hasValues(5.5, 5.5) + .column("var10").hasValues(6.6, 6.6) + .column("var11").hasValues(7, 20) + .column("var12").hasValues("8", "8") + .column("var13").hasValues("16", "16") + .column("var14").hasValues(9, 9) + .column("var15").hasValues(10.1, 10.1) + .column("var16").hasValues(11, 11) + .column("var17").hasValues("09:01:00", "09:01:00") + .column("var18").hasValues("2007-12-23 09:01:00.0", "2007-12-23 09:01:00.0") + .column("var19").hasValues("12", "12") ; } @Test @NeedReload public void test_RowEquality_hasValues() { - Table table = new Table(dataSource, "test", null, new String[] { "var20" }); + Table table = new Table(dataSource, "test", null, new String[]{"var20"}); Changes changes = new Changes(table).setStartPointNow(); update(); changes.setEndPointNow(); assertThat(table).row() - .hasValues(1, "13", "2", "14", "15", - DateValue.of(2007, 12, 23), 3.3, 4.4, 5.5, 6.6, - 20, "8", "16", 9, 10.1, - 11, "09:01:00", "2007-12-23 09:01:00.0", "12") + .hasValues(1, "13", "2", "14", "15", + DateValue.of(2007, 12, 23), 3.3, 4.4, 5.5, 6.6, + 20, "8", "16", 9, 10.1, + 11, "09:01:00", "2007-12-23 09:01:00.0", "12") ; assertThat(changes).change().rowAtStartPoint() - .hasValues(1, "13", "2", "14", "15", - DateValue.of(2007, 12, 23), 3.3, 4.4, 5.5, 6.6, - 7, "8", "16", 9, 10.1, - 11, "09:01:00", "2007-12-23 09:01:00.0", "12") + .hasValues(1, "13", "2", "14", "15", + DateValue.of(2007, 12, 23), 3.3, 4.4, 5.5, 6.6, + 7, "8", "16", 9, 10.1, + 11, "09:01:00", "2007-12-23 09:01:00.0", "12") ; } @@ -513,49 +513,49 @@ public void test_ValueClass_isOfClass() { changes.setEndPointNow(); assertThat(table).row() - .value("var1").isOfClass(Integer.class) - .value("var2").isOfClass(String.class) - .value("var3").isOfClass(String.class) - .value("var4").isOfClass(String.class) - .value("var5").isOfClass(String.class) - .value("var6").isOfClass(Date.class) - .value("var7").isOfClass(Double.class) - .value("var8").isOfClass(Double.class) - .value("var9").isOfClass(Double.class) - .value("var10").isOfClass(Double.class) - .value("var11").isOfClass(Integer.class) - .value("var12").isOfClass(String.class) - .value("var13").isOfClass(String.class) - .value("var14").isOfClass(Integer.class) - .value("var15").isOfClass(Double.class) - .value("var16").isOfClass(Integer.class) - .value("var17").isOfClass(String.class) - .value("var18").isOfClass(String.class) - .value("var19").isOfClass(String.class) - .value("var20").isOfClass(String.class) + .value("var1").isOfClass(Integer.class) + .value("var2").isOfClass(String.class) + .value("var3").isOfClass(String.class) + .value("var4").isOfClass(String.class) + .value("var5").isOfClass(String.class) + .value("var6").isOfClass(Date.class) + .value("var7").isOfClass(Double.class) + .value("var8").isOfClass(Double.class) + .value("var9").isOfClass(Double.class) + .value("var10").isOfClass(Double.class) + .value("var11").isOfClass(Integer.class) + .value("var12").isOfClass(String.class) + .value("var13").isOfClass(String.class) + .value("var14").isOfClass(Integer.class) + .value("var15").isOfClass(Double.class) + .value("var16").isOfClass(Integer.class) + .value("var17").isOfClass(String.class) + .value("var18").isOfClass(String.class) + .value("var19").isOfClass(String.class) + .value("var20").isOfClass(String.class) ; assertThat(changes).change().rowAtStartPoint() - .value("var1").isOfClass(Integer.class) - .value("var2").isOfClass(String.class) - .value("var3").isOfClass(String.class) - .value("var4").isOfClass(String.class) - .value("var5").isOfClass(String.class) - .value("var6").isOfClass(Date.class) - .value("var7").isOfClass(Double.class) - .value("var8").isOfClass(Double.class) - .value("var9").isOfClass(Double.class) - .value("var10").isOfClass(Double.class) - .value("var11").isOfClass(Integer.class) - .value("var12").isOfClass(String.class) - .value("var13").isOfClass(String.class) - .value("var14").isOfClass(Integer.class) - .value("var15").isOfClass(Double.class) - .value("var16").isOfClass(Integer.class) - .value("var17").isOfClass(String.class) - .value("var18").isOfClass(String.class) - .value("var19").isOfClass(String.class) - .value("var20").isOfClass(String.class) + .value("var1").isOfClass(Integer.class) + .value("var2").isOfClass(String.class) + .value("var3").isOfClass(String.class) + .value("var4").isOfClass(String.class) + .value("var5").isOfClass(String.class) + .value("var6").isOfClass(Date.class) + .value("var7").isOfClass(Double.class) + .value("var8").isOfClass(Double.class) + .value("var9").isOfClass(Double.class) + .value("var10").isOfClass(Double.class) + .value("var11").isOfClass(Integer.class) + .value("var12").isOfClass(String.class) + .value("var13").isOfClass(String.class) + .value("var14").isOfClass(Integer.class) + .value("var15").isOfClass(Double.class) + .value("var16").isOfClass(Integer.class) + .value("var17").isOfClass(String.class) + .value("var18").isOfClass(String.class) + .value("var19").isOfClass(String.class) + .value("var20").isOfClass(String.class) ; } @@ -568,47 +568,47 @@ public void test_ValueEquality_isEqualTo() { changes.setEndPointNow(); assertThat(table).row() - .value("var1").isEqualTo(1) - .value("var2").isEqualTo("13") - .value("var3").isEqualTo("2") - .value("var4").isEqualTo("14") - .value("var5").isEqualTo("15") - .value("var6").isEqualTo(Date.valueOf("2007-12-23")) - .value("var7").isEqualTo(3.3) - .value("var8").isEqualTo(4.4) - .value("var9").isEqualTo(5.5) - .value("var10").isEqualTo(6.6) - .value("var11").isEqualTo(20) - .value("var12").isEqualTo("8") - .value("var13").isEqualTo("16") - .value("var14").isEqualTo(9) - .value("var15").isEqualTo(10.1) - .value("var16").isEqualTo(11) - .value("var17").isEqualTo("09:01:00") - .value("var18").isEqualTo("2007-12-23 09:01:00.0") - .value("var19").isEqualTo("12") + .value("var1").isEqualTo(1) + .value("var2").isEqualTo("13") + .value("var3").isEqualTo("2") + .value("var4").isEqualTo("14") + .value("var5").isEqualTo("15") + .value("var6").isEqualTo(Date.valueOf("2007-12-23")) + .value("var7").isEqualTo(3.3) + .value("var8").isEqualTo(4.4) + .value("var9").isEqualTo(5.5) + .value("var10").isEqualTo(6.6) + .value("var11").isEqualTo(20) + .value("var12").isEqualTo("8") + .value("var13").isEqualTo("16") + .value("var14").isEqualTo(9) + .value("var15").isEqualTo(10.1) + .value("var16").isEqualTo(11) + .value("var17").isEqualTo("09:01:00") + .value("var18").isEqualTo("2007-12-23 09:01:00.0") + .value("var19").isEqualTo("12") ; assertThat(changes).change().rowAtStartPoint() - .value("var1").isEqualTo(1) - .value("var2").isEqualTo("13") - .value("var3").isEqualTo("2") - .value("var4").isEqualTo("14") - .value("var5").isEqualTo("15") - .value("var6").isEqualTo(Date.valueOf("2007-12-23")) - .value("var7").isEqualTo(3.3) - .value("var8").isEqualTo(4.4) - .value("var9").isEqualTo(5.5) - .value("var10").isEqualTo(6.6) - .value("var11").isEqualTo(7) - .value("var12").isEqualTo("8") - .value("var13").isEqualTo("16") - .value("var14").isEqualTo(9) - .value("var15").isEqualTo(10.1) - .value("var16").isEqualTo(11) - .value("var17").isEqualTo("09:01:00") - .value("var18").isEqualTo("2007-12-23 09:01:00.0") - .value("var19").isEqualTo("12") + .value("var1").isEqualTo(1) + .value("var2").isEqualTo("13") + .value("var3").isEqualTo("2") + .value("var4").isEqualTo("14") + .value("var5").isEqualTo("15") + .value("var6").isEqualTo(Date.valueOf("2007-12-23")) + .value("var7").isEqualTo(3.3) + .value("var8").isEqualTo(4.4) + .value("var9").isEqualTo(5.5) + .value("var10").isEqualTo(6.6) + .value("var11").isEqualTo(7) + .value("var12").isEqualTo("8") + .value("var13").isEqualTo("16") + .value("var14").isEqualTo(9) + .value("var15").isEqualTo(10.1) + .value("var16").isEqualTo(11) + .value("var17").isEqualTo("09:01:00") + .value("var18").isEqualTo("2007-12-23 09:01:00.0") + .value("var19").isEqualTo("12") ; } @@ -621,47 +621,47 @@ public void test_ValueNonEquality_isNotEqualTo() { changes.setEndPointNow(); assertThat(table).row() - .value("var1").isNotEqualTo(2) - .value("var2").isNotEqualTo("14") - .value("var3").isNotEqualTo("3") - .value("var4").isNotEqualTo("15") - .value("var5").isNotEqualTo("16") - .value("var6").isNotEqualTo(Date.valueOf("2008-12-23")) - .value("var7").isNotEqualTo(4.3) - .value("var8").isNotEqualTo(5.4) - .value("var9").isNotEqualTo(6.5) - .value("var10").isNotEqualTo(7.6) - .value("var11").isNotEqualTo(21) - .value("var12").isNotEqualTo("9") - .value("var13").isNotEqualTo("17") - .value("var14").isNotEqualTo(8) - .value("var15").isNotEqualTo(11.1) - .value("var16").isNotEqualTo(12) - .value("var17").isNotEqualTo("09:02:00") - .value("var18").isNotEqualTo("2007-12-24 09:01:00.0") - .value("var19").isNotEqualTo("121") + .value("var1").isNotEqualTo(2) + .value("var2").isNotEqualTo("14") + .value("var3").isNotEqualTo("3") + .value("var4").isNotEqualTo("15") + .value("var5").isNotEqualTo("16") + .value("var6").isNotEqualTo(Date.valueOf("2008-12-23")) + .value("var7").isNotEqualTo(4.3) + .value("var8").isNotEqualTo(5.4) + .value("var9").isNotEqualTo(6.5) + .value("var10").isNotEqualTo(7.6) + .value("var11").isNotEqualTo(21) + .value("var12").isNotEqualTo("9") + .value("var13").isNotEqualTo("17") + .value("var14").isNotEqualTo(8) + .value("var15").isNotEqualTo(11.1) + .value("var16").isNotEqualTo(12) + .value("var17").isNotEqualTo("09:02:00") + .value("var18").isNotEqualTo("2007-12-24 09:01:00.0") + .value("var19").isNotEqualTo("121") ; assertThat(changes).change().rowAtStartPoint() - .value("var1").isNotEqualTo(2) - .value("var2").isNotEqualTo("14") - .value("var3").isNotEqualTo("3") - .value("var4").isNotEqualTo("15") - .value("var5").isNotEqualTo("16") - .value("var6").isNotEqualTo(Date.valueOf("2008-12-23")) - .value("var7").isNotEqualTo(4.3) - .value("var8").isNotEqualTo(5.4) - .value("var9").isNotEqualTo(6.5) - .value("var10").isNotEqualTo(7.6) - .value("var11").isNotEqualTo(21) - .value("var12").isNotEqualTo("9") - .value("var13").isNotEqualTo("17") - .value("var14").isNotEqualTo(8) - .value("var15").isNotEqualTo(11.1) - .value("var16").isNotEqualTo(12) - .value("var17").isNotEqualTo("09:02:00") - .value("var18").isNotEqualTo("2007-12-24 09:01:00.0") - .value("var19").isNotEqualTo("121") + .value("var1").isNotEqualTo(2) + .value("var2").isNotEqualTo("14") + .value("var3").isNotEqualTo("3") + .value("var4").isNotEqualTo("15") + .value("var5").isNotEqualTo("16") + .value("var6").isNotEqualTo(Date.valueOf("2008-12-23")) + .value("var7").isNotEqualTo(4.3) + .value("var8").isNotEqualTo(5.4) + .value("var9").isNotEqualTo(6.5) + .value("var10").isNotEqualTo(7.6) + .value("var11").isNotEqualTo(21) + .value("var12").isNotEqualTo("9") + .value("var13").isNotEqualTo("17") + .value("var14").isNotEqualTo(8) + .value("var15").isNotEqualTo(11.1) + .value("var16").isNotEqualTo(12) + .value("var17").isNotEqualTo("09:02:00") + .value("var18").isNotEqualTo("2007-12-24 09:01:00.0") + .value("var19").isNotEqualTo("121") ; } @@ -674,49 +674,49 @@ public void test_ValueType_isOfType() { changes.setEndPointNow(); assertThat(table).row() - .value("var1").isNumber().isOfType(ValueType.NUMBER) - .value("var2").isText().isOfType(ValueType.TEXT) - .value("var3").isText().isOfType(ValueType.TEXT) - .value("var4").isText().isOfType(ValueType.TEXT) - .value("var5").isText().isOfType(ValueType.TEXT) - .value("var6").isDate().isOfType(ValueType.DATE) - .value("var7").isNumber().isOfType(ValueType.NUMBER) - .value("var8").isNumber().isOfType(ValueType.NUMBER) - .value("var9").isNumber().isOfType(ValueType.NUMBER) - .value("var10").isNumber().isOfType(ValueType.NUMBER) - .value("var11").isNumber().isOfType(ValueType.NUMBER) - .value("var12").isText().isOfType(ValueType.TEXT) - .value("var13").isText().isOfType(ValueType.TEXT) - .value("var14").isNumber().isOfType(ValueType.NUMBER) - .value("var15").isNumber().isOfType(ValueType.NUMBER) - .value("var16").isNumber().isOfType(ValueType.NUMBER) - .value("var17").isText().isOfType(ValueType.TEXT) - .value("var18").isText().isOfType(ValueType.TEXT) - .value("var19").isText().isOfType(ValueType.TEXT) - .value("var20").isText().isOfType(ValueType.TEXT) + .value("var1").isNumber().isOfType(ValueType.NUMBER) + .value("var2").isText().isOfType(ValueType.TEXT) + .value("var3").isText().isOfType(ValueType.TEXT) + .value("var4").isText().isOfType(ValueType.TEXT) + .value("var5").isText().isOfType(ValueType.TEXT) + .value("var6").isDate().isOfType(ValueType.DATE) + .value("var7").isNumber().isOfType(ValueType.NUMBER) + .value("var8").isNumber().isOfType(ValueType.NUMBER) + .value("var9").isNumber().isOfType(ValueType.NUMBER) + .value("var10").isNumber().isOfType(ValueType.NUMBER) + .value("var11").isNumber().isOfType(ValueType.NUMBER) + .value("var12").isText().isOfType(ValueType.TEXT) + .value("var13").isText().isOfType(ValueType.TEXT) + .value("var14").isNumber().isOfType(ValueType.NUMBER) + .value("var15").isNumber().isOfType(ValueType.NUMBER) + .value("var16").isNumber().isOfType(ValueType.NUMBER) + .value("var17").isText().isOfType(ValueType.TEXT) + .value("var18").isText().isOfType(ValueType.TEXT) + .value("var19").isText().isOfType(ValueType.TEXT) + .value("var20").isText().isOfType(ValueType.TEXT) ; assertThat(changes).change().rowAtStartPoint() - .value("var1").isNumber().isOfType(ValueType.NUMBER) - .value("var2").isText().isOfType(ValueType.TEXT) - .value("var3").isText().isOfType(ValueType.TEXT) - .value("var4").isText().isOfType(ValueType.TEXT) - .value("var5").isText().isOfType(ValueType.TEXT) - .value("var6").isDate().isOfType(ValueType.DATE) - .value("var7").isNumber().isOfType(ValueType.NUMBER) - .value("var8").isNumber().isOfType(ValueType.NUMBER) - .value("var9").isNumber().isOfType(ValueType.NUMBER) - .value("var10").isNumber().isOfType(ValueType.NUMBER) - .value("var11").isNumber().isOfType(ValueType.NUMBER) - .value("var12").isText().isOfType(ValueType.TEXT) - .value("var13").isText().isOfType(ValueType.TEXT) - .value("var14").isNumber().isOfType(ValueType.NUMBER) - .value("var15").isNumber().isOfType(ValueType.NUMBER) - .value("var16").isNumber().isOfType(ValueType.NUMBER) - .value("var17").isText().isOfType(ValueType.TEXT) - .value("var18").isText().isOfType(ValueType.TEXT) - .value("var19").isText().isOfType(ValueType.TEXT) - .value("var20").isText().isOfType(ValueType.TEXT) + .value("var1").isNumber().isOfType(ValueType.NUMBER) + .value("var2").isText().isOfType(ValueType.TEXT) + .value("var3").isText().isOfType(ValueType.TEXT) + .value("var4").isText().isOfType(ValueType.TEXT) + .value("var5").isText().isOfType(ValueType.TEXT) + .value("var6").isDate().isOfType(ValueType.DATE) + .value("var7").isNumber().isOfType(ValueType.NUMBER) + .value("var8").isNumber().isOfType(ValueType.NUMBER) + .value("var9").isNumber().isOfType(ValueType.NUMBER) + .value("var10").isNumber().isOfType(ValueType.NUMBER) + .value("var11").isNumber().isOfType(ValueType.NUMBER) + .value("var12").isText().isOfType(ValueType.TEXT) + .value("var13").isText().isOfType(ValueType.TEXT) + .value("var14").isNumber().isOfType(ValueType.NUMBER) + .value("var15").isNumber().isOfType(ValueType.NUMBER) + .value("var16").isNumber().isOfType(ValueType.NUMBER) + .value("var17").isText().isOfType(ValueType.TEXT) + .value("var18").isText().isOfType(ValueType.TEXT) + .value("var19").isText().isOfType(ValueType.TEXT) + .value("var20").isText().isOfType(ValueType.TEXT) ; } } diff --git a/src/test/java/org/assertj/db/database/sqlite/SqliteDatabase_DataSource_NSNSNS_Test.java b/src/test/java/org/assertj/db/database/sqlite/SqliteDatabase_DataSource_NSNSNS_Test.java index 5ea8c00f..94c606dd 100644 --- a/src/test/java/org/assertj/db/database/sqlite/SqliteDatabase_DataSource_NSNSNS_Test.java +++ b/src/test/java/org/assertj/db/database/sqlite/SqliteDatabase_DataSource_NSNSNS_Test.java @@ -8,10 +8,17 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.database.sqlite; +import static org.assertj.db.api.Assertions.assertThat; +import static org.assertj.db.output.Outputs.output; +import static org.junit.Assert.fail; + +import java.io.ByteArrayOutputStream; +import javax.sql.DataSource; + import org.assertj.core.api.Assertions; import org.assertj.db.common.NeedReload; import org.assertj.db.exception.AssertJDBException; @@ -21,13 +28,6 @@ import org.junit.Before; import org.junit.Test; -import javax.sql.DataSource; -import java.io.ByteArrayOutputStream; - -import static org.assertj.db.api.Assertions.assertThat; -import static org.assertj.db.output.Outputs.output; -import static org.junit.Assert.fail; - /** * Test on the Sqlite database. * @@ -45,7 +45,7 @@ public void init() { @Test @NeedReload public void test_Outputs_output() { - Table table = new Table(dataSource, "test", null, new String[] {"var20"}); + Table table = new Table(dataSource, "test", null, new String[]{"var20"}); Changes changes = new Changes(table).setStartPointNow(); update(); changes.setEndPointNow(); @@ -62,110 +62,110 @@ public void test_Outputs_output() { ByteArrayOutputStream byteArrayOutputStream9 = new ByteArrayOutputStream(); ByteArrayOutputStream byteArrayOutputStream10 = new ByteArrayOutputStream(); Outputs.output(table).toStream(byteArrayOutputStream0) - .column().toStream(byteArrayOutputStream1) - .value().toStream(byteArrayOutputStream2) - .row().toStream(byteArrayOutputStream3) - .value().toStream(byteArrayOutputStream4); + .column().toStream(byteArrayOutputStream1) + .value().toStream(byteArrayOutputStream2) + .row().toStream(byteArrayOutputStream3) + .value().toStream(byteArrayOutputStream4); output(changes).toStream(byteArrayOutputStream5) - .change().toStream(byteArrayOutputStream6) - .rowAtEndPoint().toStream(byteArrayOutputStream7) - .value().toStream(byteArrayOutputStream8) - .column().toStream(byteArrayOutputStream9) - .valueAtEndPoint().toStream(byteArrayOutputStream10); + .change().toStream(byteArrayOutputStream6) + .rowAtEndPoint().toStream(byteArrayOutputStream7) + .value().toStream(byteArrayOutputStream8) + .column().toStream(byteArrayOutputStream9) + .valueAtEndPoint().toStream(byteArrayOutputStream10); Assertions.assertThat(byteArrayOutputStream0.toString()).isEqualTo(String.format("[test table]%n" - + "|-----------|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" - + "| | | * | | | | | | | | | | | | | | | | | | |%n" - + "| | PRIMARY | Var1 | vAr2 | vaR3 | var4 | var5 | var6 | var7 | var8 | var9 | var10 | var11 | var12 | var13 | var14 | var15 | var16 | var17 | var18 | var19 |%n" - + "| | KEY | (NUMBER) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (DATE) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (TEXT) |%n" - + "| | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 |%n" - + "|-----------|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" - + "| Index : 0 | 1 | 1 | 13 | 2 | 14 | 15 | 2007-12-23 | 3.3 | 4.4 | 5.5 | 6.6 | 20 | 8 | 16 | 9 | 10.1 | 11 | 09:01:00 | 2007-12-23 09:01:00.0 | 12 |%n" - + "|-----------|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n")); + + "|-----------|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" + + "| | | * | | | | | | | | | | | | | | | | | | |%n" + + "| | PRIMARY | Var1 | vAr2 | vaR3 | var4 | var5 | var6 | var7 | var8 | var9 | var10 | var11 | var12 | var13 | var14 | var15 | var16 | var17 | var18 | var19 |%n" + + "| | KEY | (NUMBER) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (DATE) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (TEXT) |%n" + + "| | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 |%n" + + "|-----------|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" + + "| Index : 0 | 1 | 1 | 13 | 2 | 14 | 15 | 2007-12-23 | 3.3 | 4.4 | 5.5 | 6.6 | 20 | 8 | 16 | 9 | 10.1 | 11 | 09:01:00 | 2007-12-23 09:01:00.0 | 12 |%n" + + "|-----------|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n")); Assertions.assertThat(byteArrayOutputStream1.toString()).isEqualTo(String.format("[Column at index 0 (column name : Var1) of test table]%n" - + "|-----------|----------|%n" - + "| | Var1 |%n" - + "| | (NUMBER) |%n" - + "|-----------|----------|%n" - + "| Index : 0 | 1 |%n" - + "|-----------|----------|%n")); + + "|-----------|----------|%n" + + "| | Var1 |%n" + + "| | (NUMBER) |%n" + + "|-----------|----------|%n" + + "| Index : 0 | 1 |%n" + + "|-----------|----------|%n")); Assertions.assertThat(byteArrayOutputStream2.toString()).isEqualTo(String.format("[Value at index 0 of Column at index 0 (column name : Var1) of test table]%n" - + "|----------|%n" - + "| Var1 |%n" - + "| (NUMBER) |%n" - + "|----------|%n" - + "| 1 |%n" - + "|----------|%n")); + + "|----------|%n" + + "| Var1 |%n" + + "| (NUMBER) |%n" + + "|----------|%n" + + "| 1 |%n" + + "|----------|%n")); Assertions.assertThat(byteArrayOutputStream3.toString()).isEqualTo(String.format("[Row at index 0 of test table]%n" - + "|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" - + "| | * | | | | | | | | | | | | | | | | | | |%n" - + "| PRIMARY | Var1 | vAr2 | vaR3 | var4 | var5 | var6 | var7 | var8 | var9 | var10 | var11 | var12 | var13 | var14 | var15 | var16 | var17 | var18 | var19 |%n" - + "| KEY | (NUMBER) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (DATE) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (TEXT) |%n" - + "| | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 |%n" - + "|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" - + "| 1 | 1 | 13 | 2 | 14 | 15 | 2007-12-23 | 3.3 | 4.4 | 5.5 | 6.6 | 20 | 8 | 16 | 9 | 10.1 | 11 | 09:01:00 | 2007-12-23 09:01:00.0 | 12 |%n" - + "|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n")); + + "|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" + + "| | * | | | | | | | | | | | | | | | | | | |%n" + + "| PRIMARY | Var1 | vAr2 | vaR3 | var4 | var5 | var6 | var7 | var8 | var9 | var10 | var11 | var12 | var13 | var14 | var15 | var16 | var17 | var18 | var19 |%n" + + "| KEY | (NUMBER) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (DATE) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (TEXT) |%n" + + "| | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 |%n" + + "|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" + + "| 1 | 1 | 13 | 2 | 14 | 15 | 2007-12-23 | 3.3 | 4.4 | 5.5 | 6.6 | 20 | 8 | 16 | 9 | 10.1 | 11 | 09:01:00 | 2007-12-23 09:01:00.0 | 12 |%n" + + "|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n")); Assertions.assertThat(byteArrayOutputStream4.toString()).isEqualTo(String.format("[Value at index 0 (column name : Var1) of Row at index 0 of test table]%n" - + "|----------|%n" - + "| Var1 |%n" - + "| (NUMBER) |%n" - + "|----------|%n" - + "| 1 |%n" - + "|----------|%n")); + + "|----------|%n" + + "| Var1 |%n" + + "| (NUMBER) |%n" + + "|----------|%n" + + "| 1 |%n" + + "|----------|%n")); Assertions.assertThat(byteArrayOutputStream5.toString()).isEqualTo(String.format("[Changes on test table of a data source]%n" - + "|-----------|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" - + "| | | | | | * | | | | | | | | | | | | | | | | | | |%n" - + "| | TYPE | TABLE | PRIMARY | | Var1 | vAr2 | vaR3 | var4 | var5 | var6 | var7 | var8 | var9 | var10 | var11 | var12 | var13 | var14 | var15 | var16 | var17 | var18 | var19 |%n" - + "| | | | KEY | | (NUMBER) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (DATE) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (TEXT) |%n" - + "| | | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 |%n" - + "|-----------|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" - + "| | | | | At start point | 1 | 13 | 2 | 14 | 15 | 2007-12-23 | 3.3 | 4.4 | 5.5 | 6.6 | 7 | 8 | 16 | 9 | 10.1 | 11 | 09:01:00 | 2007-12-23 09:01:00.0 | 12 |%n" - + "| Index : 0 | MODIFICATION | test | 1 |----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" - + "| | | | | At end point | 1 | 13 | 2 | 14 | 15 | 2007-12-23 | 3.3 | 4.4 | 5.5 | 6.6 | 20 | 8 | 16 | 9 | 10.1 | 11 | 09:01:00 | 2007-12-23 09:01:00.0 | 12 |%n" - + "|-----------|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n")); + + "|-----------|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" + + "| | | | | | * | | | | | | | | | | | | | | | | | | |%n" + + "| | TYPE | TABLE | PRIMARY | | Var1 | vAr2 | vaR3 | var4 | var5 | var6 | var7 | var8 | var9 | var10 | var11 | var12 | var13 | var14 | var15 | var16 | var17 | var18 | var19 |%n" + + "| | | | KEY | | (NUMBER) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (DATE) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (TEXT) |%n" + + "| | | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 |%n" + + "|-----------|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" + + "| | | | | At start point | 1 | 13 | 2 | 14 | 15 | 2007-12-23 | 3.3 | 4.4 | 5.5 | 6.6 | 7 | 8 | 16 | 9 | 10.1 | 11 | 09:01:00 | 2007-12-23 09:01:00.0 | 12 |%n" + + "| Index : 0 | MODIFICATION | test | 1 |----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" + + "| | | | | At end point | 1 | 13 | 2 | 14 | 15 | 2007-12-23 | 3.3 | 4.4 | 5.5 | 6.6 | 20 | 8 | 16 | 9 | 10.1 | 11 | 09:01:00 | 2007-12-23 09:01:00.0 | 12 |%n" + + "|-----------|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n")); Assertions.assertThat(byteArrayOutputStream6.toString()).isEqualTo(String.format("[Change at index 0 (with primary key : [1]) of Changes on test table of a data source]%n" - + "|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" - + "| | | | | * | | | | | | | | | | | | | | | | | | |%n" - + "| TYPE | TABLE | PRIMARY | | Var1 | vAr2 | vaR3 | var4 | var5 | var6 | var7 | var8 | var9 | var10 | var11 | var12 | var13 | var14 | var15 | var16 | var17 | var18 | var19 |%n" - + "| | | KEY | | (NUMBER) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (DATE) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (TEXT) |%n" - + "| | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 |%n" - + "|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" - + "| | | | At start point | 1 | 13 | 2 | 14 | 15 | 2007-12-23 | 3.3 | 4.4 | 5.5 | 6.6 | 7 | 8 | 16 | 9 | 10.1 | 11 | 09:01:00 | 2007-12-23 09:01:00.0 | 12 |%n" - + "| MODIFICATION | test | 1 |----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" - + "| | | | At end point | 1 | 13 | 2 | 14 | 15 | 2007-12-23 | 3.3 | 4.4 | 5.5 | 6.6 | 20 | 8 | 16 | 9 | 10.1 | 11 | 09:01:00 | 2007-12-23 09:01:00.0 | 12 |%n" - + "|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n")); + + "|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" + + "| | | | | * | | | | | | | | | | | | | | | | | | |%n" + + "| TYPE | TABLE | PRIMARY | | Var1 | vAr2 | vaR3 | var4 | var5 | var6 | var7 | var8 | var9 | var10 | var11 | var12 | var13 | var14 | var15 | var16 | var17 | var18 | var19 |%n" + + "| | | KEY | | (NUMBER) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (DATE) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (TEXT) |%n" + + "| | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 |%n" + + "|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" + + "| | | | At start point | 1 | 13 | 2 | 14 | 15 | 2007-12-23 | 3.3 | 4.4 | 5.5 | 6.6 | 7 | 8 | 16 | 9 | 10.1 | 11 | 09:01:00 | 2007-12-23 09:01:00.0 | 12 |%n" + + "| MODIFICATION | test | 1 |----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" + + "| | | | At end point | 1 | 13 | 2 | 14 | 15 | 2007-12-23 | 3.3 | 4.4 | 5.5 | 6.6 | 20 | 8 | 16 | 9 | 10.1 | 11 | 09:01:00 | 2007-12-23 09:01:00.0 | 12 |%n" + + "|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n")); Assertions.assertThat(byteArrayOutputStream7.toString()).isEqualTo(String.format("[Row at end point of Change at index 0 (with primary key : [1]) of Changes on test table of a data source]%n" - + "|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" - + "| | * | | | | | | | | | | | | | | | | | | |%n" - + "| PRIMARY | Var1 | vAr2 | vaR3 | var4 | var5 | var6 | var7 | var8 | var9 | var10 | var11 | var12 | var13 | var14 | var15 | var16 | var17 | var18 | var19 |%n" - + "| KEY | (NUMBER) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (DATE) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (TEXT) |%n" - + "| | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 |%n" - + "|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" - + "| 1 | 1 | 13 | 2 | 14 | 15 | 2007-12-23 | 3.3 | 4.4 | 5.5 | 6.6 | 20 | 8 | 16 | 9 | 10.1 | 11 | 09:01:00 | 2007-12-23 09:01:00.0 | 12 |%n" - + "|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n")); + + "|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" + + "| | * | | | | | | | | | | | | | | | | | | |%n" + + "| PRIMARY | Var1 | vAr2 | vaR3 | var4 | var5 | var6 | var7 | var8 | var9 | var10 | var11 | var12 | var13 | var14 | var15 | var16 | var17 | var18 | var19 |%n" + + "| KEY | (NUMBER) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (DATE) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (TEXT) |%n" + + "| | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 |%n" + + "|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" + + "| 1 | 1 | 13 | 2 | 14 | 15 | 2007-12-23 | 3.3 | 4.4 | 5.5 | 6.6 | 20 | 8 | 16 | 9 | 10.1 | 11 | 09:01:00 | 2007-12-23 09:01:00.0 | 12 |%n" + + "|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n")); Assertions.assertThat(byteArrayOutputStream8.toString()).isEqualTo(String.format("[Value at index 0 (column name : Var1) of Row at end point of Change at index 0 (with primary key : [1]) of Changes on test table of a data source]%n" - + "|----------|%n" - + "| Var1 |%n" - + "| (NUMBER) |%n" - + "|----------|%n" - + "| 1 |%n" - + "|----------|%n")); + + "|----------|%n" + + "| Var1 |%n" + + "| (NUMBER) |%n" + + "|----------|%n" + + "| 1 |%n" + + "|----------|%n")); Assertions.assertThat(byteArrayOutputStream9.toString()).isEqualTo(String.format("[Column at index 0 (column name : Var1) of Change at index 0 (with primary key : [1]) of Changes on test table of a data source]%n" - + "|----------------|----------|%n" - + "| | Var1 |%n" - + "| | (NUMBER) |%n" - + "|----------------|----------|%n" - + "| At start point | 1 |%n" - + "|----------------|----------|%n" - + "| At end point | 1 |%n" - + "|----------------|----------|%n")); + + "|----------------|----------|%n" + + "| | Var1 |%n" + + "| | (NUMBER) |%n" + + "|----------------|----------|%n" + + "| At start point | 1 |%n" + + "|----------------|----------|%n" + + "| At end point | 1 |%n" + + "|----------------|----------|%n")); Assertions.assertThat(byteArrayOutputStream10.toString()).isEqualTo(String.format("[Value at end point of Column at index 0 (column name : Var1) of Change at index 0 (with primary key : [1]) of Changes on test table of a data source]%n" - + "|----------|%n" - + "| Var1 |%n" - + "| (NUMBER) |%n" - + "|----------|%n" - + "| 1 |%n" - + "|----------|%n")); + + "|----------|%n" + + "| Var1 |%n" + + "| (NUMBER) |%n" + + "|----------|%n" + + "| 1 |%n" + + "|----------|%n")); } @Test @@ -181,25 +181,23 @@ public void should_fail_because_primary_key_is_different() { try { assertThat(changes).change().hasPksNames("var1"); fail("An exception must be raised"); - } - catch (AssertionError e) { + } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Change at index 0 (with primary key : [1]) of Changes on test table of a data source] %n" - + "Expecting :%n" - + " [\"var1\"]%n" - + "to be the name of the columns of the primary keys but was:%n" - + " [\"Var1\"]")); + + "Expecting :%n" + + " [\"var1\"]%n" + + "to be the name of the columns of the primary keys but was:%n" + + " [\"Var1\"]")); } try { assertThat(changes2).change().hasPksNames("var1"); fail("An exception must be raised"); - } - catch (AssertionError e) { + } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Change at index 0 (with primary key : [1]) of Changes on teSt table of a data source] %n" - + "Expecting :%n" - + " [\"var1\"]%n" - + "to be the name of the columns of the primary keys but was:%n" - + " [\"Var1\"]")); + + "Expecting :%n" + + " [\"var1\"]%n" + + "to be the name of the columns of the primary keys but was:%n" + + " [\"Var1\"]")); } } @@ -216,70 +214,64 @@ public void should_fail_because_column_name_is_different() { try { assertThat(table).column().hasColumnName("var1"); fail("An exception must be raised"); - } - catch (AssertionError e) { + } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 0 (column name : Var1) of test table] %n" - + "Expecting :%n" - + " \"var1\"%n" - + "to be the name of the column but was:%n" - + " \"Var1\"")); + + "Expecting :%n" + + " \"var1\"%n" + + "to be the name of the column but was:%n" + + " \"Var1\"")); } try { assertThat(table).row().value().hasColumnName("var1"); fail("An exception must be raised"); - } - catch (AssertionError e) { + } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at index 0 (column name : Var1) of Row at index 0 of test table] %n" - + "Expecting :%n" - + " \"var1\"%n" - + "to be the name of the column but was:%n" - + " \"Var1\"")); + + "Expecting :%n" + + " \"var1\"%n" + + "to be the name of the column but was:%n" + + " \"Var1\"")); } try { assertThat(changes).change().column().hasColumnName("var1"); fail("An exception must be raised"); - } - catch (AssertionError e) { + } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 0 (column name : Var1) of Change at index 0 (with primary key : [1]) of Changes on test table of a data source] %n" - + "Expecting :%n" - + " \"var1\"%n" - + "to be the name of the column but was:%n" - + " \"Var1\"")); + + "Expecting :%n" + + " \"var1\"%n" + + "to be the name of the column but was:%n" + + " \"Var1\"")); } try { assertThat(changes).change().rowAtEndPoint().value().hasColumnName("var1"); fail("An exception must be raised"); - } - catch (AssertionError e) { + } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at index 0 (column name : Var1) of Row at end point of Change at index 0 (with primary key : [1]) of Changes on test table of a data source] %n" - + "Expecting :%n" - + " \"var1\"%n" - + "to be the name of the column but was:%n" - + " \"Var1\"")); + + "Expecting :%n" + + " \"var1\"%n" + + "to be the name of the column but was:%n" + + " \"Var1\"")); } try { assertThat(changes2).change().column().hasColumnName("var1"); fail("An exception must be raised"); - } - catch (AssertionError e) { + } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 0 (column name : Var1) of Change at index 0 (with primary key : [1]) of Changes on teSt table of a data source] %n" - + "Expecting :%n" - + " \"var1\"%n" - + "to be the name of the column but was:%n" - + " \"Var1\"")); + + "Expecting :%n" + + " \"var1\"%n" + + "to be the name of the column but was:%n" + + " \"Var1\"")); } try { assertThat(changes2).change().rowAtEndPoint().value().hasColumnName("var1"); fail("An exception must be raised"); - } - catch (AssertionError e) { + } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at index 0 (column name : Var1) of Row at end point of Change at index 0 (with primary key : [1]) of Changes on teSt table of a data source] %n" - + "Expecting :%n" - + " \"var1\"%n" - + "to be the name of the column but was:%n" - + " \"Var1\"")); + + "Expecting :%n" + + " \"var1\"%n" + + "to be the name of the column but was:%n" + + " \"Var1\"")); } } @@ -296,58 +288,52 @@ public void should_fail_because_column_name_is_wrong_to_navigate() { try { assertThat(table).column("var1"); fail("An exception must be raised"); - } - catch (AssertJDBException e) { + } catch (AssertJDBException e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("Column does not exist%n" - + "in <[Var1, vAr2, vaR3, var4, var5, var6, var7, var8, var9, var10, var11, var12, var13, var14, var15, var16, var17, var18, var19, var20]>%n" - + "with comparison STRICT - Strictly compare the case")); + + "in <[Var1, vAr2, vaR3, var4, var5, var6, var7, var8, var9, var10, var11, var12, var13, var14, var15, var16, var17, var18, var19, var20]>%n" + + "with comparison STRICT - Strictly compare the case")); } try { assertThat(table).row().value("var1"); fail("An exception must be raised"); - } - catch (AssertJDBException e) { + } catch (AssertJDBException e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("Column does not exist%n" - + "in <[Var1, vAr2, vaR3, var4, var5, var6, var7, var8, var9, var10, var11, var12, var13, var14, var15, var16, var17, var18, var19, var20]>%n" - + "with comparison STRICT - Strictly compare the case")); + + "in <[Var1, vAr2, vaR3, var4, var5, var6, var7, var8, var9, var10, var11, var12, var13, var14, var15, var16, var17, var18, var19, var20]>%n" + + "with comparison STRICT - Strictly compare the case")); } try { assertThat(changes).change().column("var1"); fail("An exception must be raised"); - } - catch (AssertJDBException e) { + } catch (AssertJDBException e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("Column does not exist%n" - + "in <[Var1, vAr2, vaR3, var4, var5, var6, var7, var8, var9, var10, var11, var12, var13, var14, var15, var16, var17, var18, var19, var20]>%n" - + "with comparison STRICT - Strictly compare the case")); + + "in <[Var1, vAr2, vaR3, var4, var5, var6, var7, var8, var9, var10, var11, var12, var13, var14, var15, var16, var17, var18, var19, var20]>%n" + + "with comparison STRICT - Strictly compare the case")); } try { assertThat(changes).change().rowAtEndPoint().value("var1"); fail("An exception must be raised"); - } - catch (AssertJDBException e) { + } catch (AssertJDBException e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("Column does not exist%n" - + "in <[Var1, vAr2, vaR3, var4, var5, var6, var7, var8, var9, var10, var11, var12, var13, var14, var15, var16, var17, var18, var19, var20]>%n" - + "with comparison STRICT - Strictly compare the case")); + + "in <[Var1, vAr2, vaR3, var4, var5, var6, var7, var8, var9, var10, var11, var12, var13, var14, var15, var16, var17, var18, var19, var20]>%n" + + "with comparison STRICT - Strictly compare the case")); } try { assertThat(changes2).change().column("var1"); fail("An exception must be raised"); - } - catch (AssertJDBException e) { + } catch (AssertJDBException e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("Column does not exist%n" - + "in <[Var1, vAr2, vaR3, var4, var5, var6, var7, var8, var9, var10, var11, var12, var13, var14, var15, var16, var17, var18, var19, var20]>%n" - + "with comparison STRICT - Strictly compare the case")); + + "in <[Var1, vAr2, vaR3, var4, var5, var6, var7, var8, var9, var10, var11, var12, var13, var14, var15, var16, var17, var18, var19, var20]>%n" + + "with comparison STRICT - Strictly compare the case")); } try { assertThat(changes2).change().rowAtEndPoint().value("var1"); fail("An exception must be raised"); - } - catch (AssertJDBException e) { + } catch (AssertJDBException e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("Column does not exist%n" - + "in <[Var1, vAr2, vaR3, var4, var5, var6, var7, var8, var9, var10, var11, var12, var13, var14, var15, var16, var17, var18, var19, var20]>%n" - + "with comparison STRICT - Strictly compare the case")); + + "in <[Var1, vAr2, vaR3, var4, var5, var6, var7, var8, var9, var10, var11, var12, var13, var14, var15, var16, var17, var18, var19, var20]>%n" + + "with comparison STRICT - Strictly compare the case")); } } @@ -364,24 +350,22 @@ public void should_fail_because_table_name_is_different() { try { assertThat(changes).change().isOnTable("teSt"); fail("An exception must be raised"); - } - catch (AssertionError e) { + } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Change at index 0 (with primary key : [1]) of Changes on test table of a data source] %n" - + "Expecting to be on the table:%n" - + " <\"teSt\">%n" - + "but was on the table:%n" - + " <\"test\">")); + + "Expecting to be on the table:%n" + + " <\"teSt\">%n" + + "but was on the table:%n" + + " <\"test\">")); } try { assertThat(changes2).change().isOnTable("test"); fail("An exception must be raised"); - } - catch (AssertionError e) { + } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Change at index 0 (with primary key : [1]) of Changes on teSt table of a data source] %n" - + "Expecting to be on the table:%n" - + " <\"test\">%n" - + "but was on the table:%n" - + " <\"teSt\">")); + + "Expecting to be on the table:%n" + + " <\"test\">%n" + + "but was on the table:%n" + + " <\"teSt\">")); } } @@ -398,44 +382,38 @@ public void should_fail_because_table_name_is_wrong_to_navigate() { try { assertThat(changes).changeOnTable("teSt"); fail("An exception must be raised"); - } - catch (AssertJDBException e) { + } catch (AssertJDBException e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("Index 0 out of the limits [0, 0[")); } try { assertThat(changes).changeOnTable("teSt", 0); fail("An exception must be raised"); - } - catch (AssertJDBException e) { + } catch (AssertJDBException e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("Index 0 out of the limits [0, 0[")); } try { assertThat(changes).changeOnTableWithPks("teSt", 1); fail("An exception must be raised"); - } - catch (AssertJDBException e) { + } catch (AssertJDBException e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("No change found for table teSt and primary keys [1]")); } try { assertThat(changes2).changeOnTable("test"); fail("An exception must be raised"); - } - catch (AssertJDBException e) { + } catch (AssertJDBException e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("Index 0 out of the limits [0, 0[")); } try { assertThat(changes2).changeOnTable("test", 0); fail("An exception must be raised"); - } - catch (AssertJDBException e) { + } catch (AssertJDBException e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("Index 0 out of the limits [0, 0[")); } try { assertThat(changes2).changeOnTableWithPks("test", 1); fail("An exception must be raised"); - } - catch (AssertJDBException e) { + } catch (AssertJDBException e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("No change found for table test and primary keys [1]")); } } diff --git a/src/test/java/org/assertj/db/database/sqlite/SqliteDatabase_DataSource_UIUIUI_Test.java b/src/test/java/org/assertj/db/database/sqlite/SqliteDatabase_DataSource_UIUIUI_Test.java index 159ae254..19c58d63 100644 --- a/src/test/java/org/assertj/db/database/sqlite/SqliteDatabase_DataSource_UIUIUI_Test.java +++ b/src/test/java/org/assertj/db/database/sqlite/SqliteDatabase_DataSource_UIUIUI_Test.java @@ -8,10 +8,17 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.database.sqlite; +import static org.assertj.db.api.Assertions.assertThat; +import static org.assertj.db.output.Outputs.output; + +import java.io.ByteArrayOutputStream; +import java.sql.Date; +import javax.sql.DataSource; + import org.assertj.core.api.Assertions; import org.assertj.db.common.NeedReload; import org.assertj.db.output.Outputs; @@ -22,13 +29,6 @@ import org.junit.Before; import org.junit.Test; -import javax.sql.DataSource; -import java.io.ByteArrayOutputStream; -import java.sql.Date; - -import static org.assertj.db.api.Assertions.assertThat; -import static org.assertj.db.output.Outputs.output; - /** * Test on the Sqlite database. * @@ -46,7 +46,7 @@ public void init() { @Test @NeedReload public void test_Outputs_output() { - Table table = new Table(dataSource, "test", null, new String[] {"var20"}); + Table table = new Table(dataSource, "test", null, new String[]{"var20"}); Changes changes = new Changes(table).setStartPointNow(); update(); changes.setEndPointNow(); @@ -63,111 +63,111 @@ public void test_Outputs_output() { ByteArrayOutputStream byteArrayOutputStream9 = new ByteArrayOutputStream(); ByteArrayOutputStream byteArrayOutputStream10 = new ByteArrayOutputStream(); Outputs.output(table).toStream(byteArrayOutputStream0) - .column().toStream(byteArrayOutputStream1) - .value().toStream(byteArrayOutputStream2) - .row().toStream(byteArrayOutputStream3) - .value().toStream(byteArrayOutputStream4) + .column().toStream(byteArrayOutputStream1) + .value().toStream(byteArrayOutputStream2) + .row().toStream(byteArrayOutputStream3) + .value().toStream(byteArrayOutputStream4) ; output(changes).toStream(byteArrayOutputStream5) - .change().toStream(byteArrayOutputStream6) - .rowAtEndPoint().toStream(byteArrayOutputStream7) - .value().toStream(byteArrayOutputStream8) - .column().toStream(byteArrayOutputStream9) - .valueAtEndPoint().toStream(byteArrayOutputStream10); + .change().toStream(byteArrayOutputStream6) + .rowAtEndPoint().toStream(byteArrayOutputStream7) + .value().toStream(byteArrayOutputStream8) + .column().toStream(byteArrayOutputStream9) + .valueAtEndPoint().toStream(byteArrayOutputStream10); Assertions.assertThat(byteArrayOutputStream0.toString()).isEqualTo(String.format("[TEST table]%n" - + "|-----------|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" - + "| | | * | | | | | | | | | | | | | | | | | | |%n" - + "| | PRIMARY | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 |%n" - + "| | KEY | (NUMBER) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (DATE) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (TEXT) |%n" - + "| | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 |%n" - + "|-----------|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" - + "| Index : 0 | 1 | 1 | 13 | 2 | 14 | 15 | 2007-12-23 | 3.3 | 4.4 | 5.5 | 6.6 | 20 | 8 | 16 | 9 | 10.1 | 11 | 09:01:00 | 2007-12-23 09:01:00.0 | 12 |%n" - + "|-----------|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n")); + + "|-----------|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" + + "| | | * | | | | | | | | | | | | | | | | | | |%n" + + "| | PRIMARY | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 |%n" + + "| | KEY | (NUMBER) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (DATE) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (TEXT) |%n" + + "| | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 |%n" + + "|-----------|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" + + "| Index : 0 | 1 | 1 | 13 | 2 | 14 | 15 | 2007-12-23 | 3.3 | 4.4 | 5.5 | 6.6 | 20 | 8 | 16 | 9 | 10.1 | 11 | 09:01:00 | 2007-12-23 09:01:00.0 | 12 |%n" + + "|-----------|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n")); Assertions.assertThat(byteArrayOutputStream1.toString()).isEqualTo(String.format("[Column at index 0 (column name : VAR1) of TEST table]%n" - + "|-----------|----------|%n" - + "| | VAR1 |%n" - + "| | (NUMBER) |%n" - + "|-----------|----------|%n" - + "| Index : 0 | 1 |%n" - + "|-----------|----------|%n")); + + "|-----------|----------|%n" + + "| | VAR1 |%n" + + "| | (NUMBER) |%n" + + "|-----------|----------|%n" + + "| Index : 0 | 1 |%n" + + "|-----------|----------|%n")); Assertions.assertThat(byteArrayOutputStream2.toString()).isEqualTo(String.format("[Value at index 0 of Column at index 0 (column name : VAR1) of TEST table]%n" - + "|----------|%n" - + "| VAR1 |%n" - + "| (NUMBER) |%n" - + "|----------|%n" - + "| 1 |%n" - + "|----------|%n")); + + "|----------|%n" + + "| VAR1 |%n" + + "| (NUMBER) |%n" + + "|----------|%n" + + "| 1 |%n" + + "|----------|%n")); Assertions.assertThat(byteArrayOutputStream3.toString()).isEqualTo(String.format("[Row at index 0 of TEST table]%n" - + "|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" - + "| | * | | | | | | | | | | | | | | | | | | |%n" - + "| PRIMARY | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 |%n" - + "| KEY | (NUMBER) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (DATE) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (TEXT) |%n" - + "| | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 |%n" - + "|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" - + "| 1 | 1 | 13 | 2 | 14 | 15 | 2007-12-23 | 3.3 | 4.4 | 5.5 | 6.6 | 20 | 8 | 16 | 9 | 10.1 | 11 | 09:01:00 | 2007-12-23 09:01:00.0 | 12 |%n" - + "|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n")); + + "|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" + + "| | * | | | | | | | | | | | | | | | | | | |%n" + + "| PRIMARY | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 |%n" + + "| KEY | (NUMBER) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (DATE) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (TEXT) |%n" + + "| | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 |%n" + + "|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" + + "| 1 | 1 | 13 | 2 | 14 | 15 | 2007-12-23 | 3.3 | 4.4 | 5.5 | 6.6 | 20 | 8 | 16 | 9 | 10.1 | 11 | 09:01:00 | 2007-12-23 09:01:00.0 | 12 |%n" + + "|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n")); Assertions.assertThat(byteArrayOutputStream4.toString()).isEqualTo(String.format("[Value at index 0 (column name : VAR1) of Row at index 0 of TEST table]%n" - + "|----------|%n" - + "| VAR1 |%n" - + "| (NUMBER) |%n" - + "|----------|%n" - + "| 1 |%n" - + "|----------|%n")); + + "|----------|%n" + + "| VAR1 |%n" + + "| (NUMBER) |%n" + + "|----------|%n" + + "| 1 |%n" + + "|----------|%n")); Assertions.assertThat(byteArrayOutputStream5.toString()).isEqualTo(String.format("[Changes on TEST table of a data source]%n" - + "|-----------|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" - + "| | | | | | * | | | | | | | | | | | | | | | | | | |%n" - + "| | TYPE | TABLE | PRIMARY | | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 |%n" - + "| | | | KEY | | (NUMBER) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (DATE) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (TEXT) |%n" - + "| | | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 |%n" - + "|-----------|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" - + "| | | | | At start point | 1 | 13 | 2 | 14 | 15 | 2007-12-23 | 3.3 | 4.4 | 5.5 | 6.6 | 7 | 8 | 16 | 9 | 10.1 | 11 | 09:01:00 | 2007-12-23 09:01:00.0 | 12 |%n" - + "| Index : 0 | MODIFICATION | TEST | 1 |----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" - + "| | | | | At end point | 1 | 13 | 2 | 14 | 15 | 2007-12-23 | 3.3 | 4.4 | 5.5 | 6.6 | 20 | 8 | 16 | 9 | 10.1 | 11 | 09:01:00 | 2007-12-23 09:01:00.0 | 12 |%n" - + "|-----------|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n")); + + "|-----------|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" + + "| | | | | | * | | | | | | | | | | | | | | | | | | |%n" + + "| | TYPE | TABLE | PRIMARY | | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 |%n" + + "| | | | KEY | | (NUMBER) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (DATE) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (TEXT) |%n" + + "| | | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 |%n" + + "|-----------|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" + + "| | | | | At start point | 1 | 13 | 2 | 14 | 15 | 2007-12-23 | 3.3 | 4.4 | 5.5 | 6.6 | 7 | 8 | 16 | 9 | 10.1 | 11 | 09:01:00 | 2007-12-23 09:01:00.0 | 12 |%n" + + "| Index : 0 | MODIFICATION | TEST | 1 |----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" + + "| | | | | At end point | 1 | 13 | 2 | 14 | 15 | 2007-12-23 | 3.3 | 4.4 | 5.5 | 6.6 | 20 | 8 | 16 | 9 | 10.1 | 11 | 09:01:00 | 2007-12-23 09:01:00.0 | 12 |%n" + + "|-----------|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n")); Assertions.assertThat(byteArrayOutputStream6.toString()).isEqualTo(String.format("[Change at index 0 (with primary key : [1]) of Changes on TEST table of a data source]%n" - + "|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" - + "| | | | | * | | | | | | | | | | | | | | | | | | |%n" - + "| TYPE | TABLE | PRIMARY | | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 |%n" - + "| | | KEY | | (NUMBER) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (DATE) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (TEXT) |%n" - + "| | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 |%n" - + "|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" - + "| | | | At start point | 1 | 13 | 2 | 14 | 15 | 2007-12-23 | 3.3 | 4.4 | 5.5 | 6.6 | 7 | 8 | 16 | 9 | 10.1 | 11 | 09:01:00 | 2007-12-23 09:01:00.0 | 12 |%n" - + "| MODIFICATION | TEST | 1 |----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" - + "| | | | At end point | 1 | 13 | 2 | 14 | 15 | 2007-12-23 | 3.3 | 4.4 | 5.5 | 6.6 | 20 | 8 | 16 | 9 | 10.1 | 11 | 09:01:00 | 2007-12-23 09:01:00.0 | 12 |%n" - + "|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n")); + + "|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" + + "| | | | | * | | | | | | | | | | | | | | | | | | |%n" + + "| TYPE | TABLE | PRIMARY | | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 |%n" + + "| | | KEY | | (NUMBER) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (DATE) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (TEXT) |%n" + + "| | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 |%n" + + "|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" + + "| | | | At start point | 1 | 13 | 2 | 14 | 15 | 2007-12-23 | 3.3 | 4.4 | 5.5 | 6.6 | 7 | 8 | 16 | 9 | 10.1 | 11 | 09:01:00 | 2007-12-23 09:01:00.0 | 12 |%n" + + "| MODIFICATION | TEST | 1 |----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" + + "| | | | At end point | 1 | 13 | 2 | 14 | 15 | 2007-12-23 | 3.3 | 4.4 | 5.5 | 6.6 | 20 | 8 | 16 | 9 | 10.1 | 11 | 09:01:00 | 2007-12-23 09:01:00.0 | 12 |%n" + + "|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n")); Assertions.assertThat(byteArrayOutputStream7.toString()).isEqualTo(String.format("[Row at end point of Change at index 0 (with primary key : [1]) of Changes on TEST table of a data source]%n" - + "|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" - + "| | * | | | | | | | | | | | | | | | | | | |%n" - + "| PRIMARY | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 |%n" - + "| KEY | (NUMBER) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (DATE) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (TEXT) |%n" - + "| | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 |%n" - + "|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" - + "| 1 | 1 | 13 | 2 | 14 | 15 | 2007-12-23 | 3.3 | 4.4 | 5.5 | 6.6 | 20 | 8 | 16 | 9 | 10.1 | 11 | 09:01:00 | 2007-12-23 09:01:00.0 | 12 |%n" - + "|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n")); + + "|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" + + "| | * | | | | | | | | | | | | | | | | | | |%n" + + "| PRIMARY | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 |%n" + + "| KEY | (NUMBER) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (DATE) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (TEXT) |%n" + + "| | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 |%n" + + "|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" + + "| 1 | 1 | 13 | 2 | 14 | 15 | 2007-12-23 | 3.3 | 4.4 | 5.5 | 6.6 | 20 | 8 | 16 | 9 | 10.1 | 11 | 09:01:00 | 2007-12-23 09:01:00.0 | 12 |%n" + + "|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n")); Assertions.assertThat(byteArrayOutputStream8.toString()).isEqualTo(String.format("[Value at index 0 (column name : VAR1) of Row at end point of Change at index 0 (with primary key : [1]) of Changes on TEST table of a data source]%n" - + "|----------|%n" - + "| VAR1 |%n" - + "| (NUMBER) |%n" - + "|----------|%n" - + "| 1 |%n" - + "|----------|%n")); + + "|----------|%n" + + "| VAR1 |%n" + + "| (NUMBER) |%n" + + "|----------|%n" + + "| 1 |%n" + + "|----------|%n")); Assertions.assertThat(byteArrayOutputStream9.toString()).isEqualTo(String.format("[Column at index 0 (column name : VAR1) of Change at index 0 (with primary key : [1]) of Changes on TEST table of a data source]%n" - + "|----------------|----------|%n" - + "| | VAR1 |%n" - + "| | (NUMBER) |%n" - + "|----------------|----------|%n" - + "| At start point | 1 |%n" - + "|----------------|----------|%n" - + "| At end point | 1 |%n" - + "|----------------|----------|%n")); + + "|----------------|----------|%n" + + "| | VAR1 |%n" + + "| | (NUMBER) |%n" + + "|----------------|----------|%n" + + "| At start point | 1 |%n" + + "|----------------|----------|%n" + + "| At end point | 1 |%n" + + "|----------------|----------|%n")); Assertions.assertThat(byteArrayOutputStream10.toString()).isEqualTo(String.format("[Value at end point of Column at index 0 (column name : VAR1) of Change at index 0 (with primary key : [1]) of Changes on TEST table of a data source]%n" - + "|----------|%n" - + "| VAR1 |%n" - + "| (NUMBER) |%n" - + "|----------|%n" - + "| 1 |%n" - + "|----------|%n")); + + "|----------|%n" + + "| VAR1 |%n" + + "| (NUMBER) |%n" + + "|----------|%n" + + "| 1 |%n" + + "|----------|%n")); } @Test @@ -191,49 +191,49 @@ public void test_ColumnName_hasColumnName() { changes.setEndPointNow(); assertThat(table) - .column().hasColumnName("var1") - .column().hasColumnName("var2") - .column().hasColumnName("var3") - .column().hasColumnName("var4") - .column().hasColumnName("var5") - .column().hasColumnName("var6") - .column().hasColumnName("var7") - .column().hasColumnName("var8") - .column().hasColumnName("var9") - .column().hasColumnName("var10") - .column().hasColumnName("var11") - .column().hasColumnName("var12") - .column().hasColumnName("var13") - .column().hasColumnName("var14") - .column().hasColumnName("var15") - .column().hasColumnName("var16") - .column().hasColumnName("var17") - .column().hasColumnName("var18") - .column().hasColumnName("var19") - .column().hasColumnName("var20") + .column().hasColumnName("var1") + .column().hasColumnName("var2") + .column().hasColumnName("var3") + .column().hasColumnName("var4") + .column().hasColumnName("var5") + .column().hasColumnName("var6") + .column().hasColumnName("var7") + .column().hasColumnName("var8") + .column().hasColumnName("var9") + .column().hasColumnName("var10") + .column().hasColumnName("var11") + .column().hasColumnName("var12") + .column().hasColumnName("var13") + .column().hasColumnName("var14") + .column().hasColumnName("var15") + .column().hasColumnName("var16") + .column().hasColumnName("var17") + .column().hasColumnName("var18") + .column().hasColumnName("var19") + .column().hasColumnName("var20") ; assertThat(changes).change() - .column().hasColumnName("var1") - .column().hasColumnName("var2") - .column().hasColumnName("var3") - .column().hasColumnName("var4") - .column().hasColumnName("var5") - .column().hasColumnName("var6") - .column().hasColumnName("var7") - .column().hasColumnName("var8") - .column().hasColumnName("var9") - .column().hasColumnName("var10") - .column().hasColumnName("var11") - .column().hasColumnName("var12") - .column().hasColumnName("var13") - .column().hasColumnName("var14") - .column().hasColumnName("var15") - .column().hasColumnName("var16") - .column().hasColumnName("var17") - .column().hasColumnName("var18") - .column().hasColumnName("var19") - .column().hasColumnName("var20") + .column().hasColumnName("var1") + .column().hasColumnName("var2") + .column().hasColumnName("var3") + .column().hasColumnName("var4") + .column().hasColumnName("var5") + .column().hasColumnName("var6") + .column().hasColumnName("var7") + .column().hasColumnName("var8") + .column().hasColumnName("var9") + .column().hasColumnName("var10") + .column().hasColumnName("var11") + .column().hasColumnName("var12") + .column().hasColumnName("var13") + .column().hasColumnName("var14") + .column().hasColumnName("var15") + .column().hasColumnName("var16") + .column().hasColumnName("var17") + .column().hasColumnName("var18") + .column().hasColumnName("var19") + .column().hasColumnName("var20") ; } @@ -246,131 +246,131 @@ public void test_ColumnClass_isOfClass() { changes.setEndPointNow(); assertThat(table) - .column("var1").isOfClass(Integer.class, false) - .column("var2").isOfClass(String.class, false) - .column("var3").isOfClass(String.class, false) - .column("var4").isOfClass(String.class, false) - .column("var5").isOfClass(String.class, false) - .column("var6").isOfClass(Date.class, false) - .column("var7").isOfClass(Double.class, false) - .column("var8").isOfClass(Double.class, false) - .column("var9").isOfClass(Double.class, false) - .column("var10").isOfClass(Double.class, false) - .column("var11").isOfClass(Integer.class, false) - .column("var12").isOfClass(String.class, false) - .column("var13").isOfClass(String.class, false) - .column("var14").isOfClass(Integer.class, false) - .column("var15").isOfClass(Double.class, false) - .column("var16").isOfClass(Integer.class, false) - .column("var17").isOfClass(String.class, false) - .column("var18").isOfClass(String.class, false) - .column("var19").isOfClass(String.class, false) - .column("var20").isOfClass(String.class, false) + .column("var1").isOfClass(Integer.class, false) + .column("var2").isOfClass(String.class, false) + .column("var3").isOfClass(String.class, false) + .column("var4").isOfClass(String.class, false) + .column("var5").isOfClass(String.class, false) + .column("var6").isOfClass(Date.class, false) + .column("var7").isOfClass(Double.class, false) + .column("var8").isOfClass(Double.class, false) + .column("var9").isOfClass(Double.class, false) + .column("var10").isOfClass(Double.class, false) + .column("var11").isOfClass(Integer.class, false) + .column("var12").isOfClass(String.class, false) + .column("var13").isOfClass(String.class, false) + .column("var14").isOfClass(Integer.class, false) + .column("var15").isOfClass(Double.class, false) + .column("var16").isOfClass(Integer.class, false) + .column("var17").isOfClass(String.class, false) + .column("var18").isOfClass(String.class, false) + .column("var19").isOfClass(String.class, false) + .column("var20").isOfClass(String.class, false) ; assertThat(changes).change() - .column("var1").isOfClass(Integer.class, false) - .column("var2").isOfClass(String.class, false) - .column("var3").isOfClass(String.class, false) - .column("var4").isOfClass(String.class, false) - .column("var5").isOfClass(String.class, false) - .column("var6").isOfClass(Date.class, false) - .column("var7").isOfClass(Double.class, false) - .column("var8").isOfClass(Double.class, false) - .column("var9").isOfClass(Double.class, false) - .column("var10").isOfClass(Double.class, false) - .column("var11").isOfClass(Integer.class, false) - .column("var12").isOfClass(String.class, false) - .column("var13").isOfClass(String.class, false) - .column("var14").isOfClass(Integer.class, false) - .column("var15").isOfClass(Double.class, false) - .column("var16").isOfClass(Integer.class, false) - .column("var17").isOfClass(String.class, false) - .column("var18").isOfClass(String.class, false) - .column("var19").isOfClass(String.class, false) - .column("var20").isOfClass(String.class, false) + .column("var1").isOfClass(Integer.class, false) + .column("var2").isOfClass(String.class, false) + .column("var3").isOfClass(String.class, false) + .column("var4").isOfClass(String.class, false) + .column("var5").isOfClass(String.class, false) + .column("var6").isOfClass(Date.class, false) + .column("var7").isOfClass(Double.class, false) + .column("var8").isOfClass(Double.class, false) + .column("var9").isOfClass(Double.class, false) + .column("var10").isOfClass(Double.class, false) + .column("var11").isOfClass(Integer.class, false) + .column("var12").isOfClass(String.class, false) + .column("var13").isOfClass(String.class, false) + .column("var14").isOfClass(Integer.class, false) + .column("var15").isOfClass(Double.class, false) + .column("var16").isOfClass(Integer.class, false) + .column("var17").isOfClass(String.class, false) + .column("var18").isOfClass(String.class, false) + .column("var19").isOfClass(String.class, false) + .column("var20").isOfClass(String.class, false) ; } @Test @NeedReload public void test_ColumnEquality_hasValues() { - Table table = new Table(dataSource, "test", null, new String[] {"var20"}); + Table table = new Table(dataSource, "test", null, new String[]{"var20"}); Changes changes = new Changes(table).setStartPointNow(); update(); changes.setEndPointNow(); assertThat(table).column("var1").hasValues(1) - .column("var2").hasValues("13") - .column("var3").hasValues("2") - .column("var4").hasValues("14") - .column("var5").hasValues("15") - .column("var6").hasValues(Date.valueOf("2007-12-23")) - .column("var7").hasValues(3.3) - .column("var8").hasValues(4.4) - .column("var9").hasValues(5.5) - .column("var10").hasValues(6.6) - .column("var11").hasValues(20) - .column("var12").hasValues("8") - .column("var13").hasValues("16") - .column("var14").hasValues(9) - .column("var15").hasValues(10.1) - .column("var16").hasValues(11) - .column("var17").hasValues("09:01:00") - .column("var18").hasValues("2007-12-23 09:01:00.0") - .column("var19").hasValues("12") + .column("var2").hasValues("13") + .column("var3").hasValues("2") + .column("var4").hasValues("14") + .column("var5").hasValues("15") + .column("var6").hasValues(Date.valueOf("2007-12-23")) + .column("var7").hasValues(3.3) + .column("var8").hasValues(4.4) + .column("var9").hasValues(5.5) + .column("var10").hasValues(6.6) + .column("var11").hasValues(20) + .column("var12").hasValues("8") + .column("var13").hasValues("16") + .column("var14").hasValues(9) + .column("var15").hasValues(10.1) + .column("var16").hasValues(11) + .column("var17").hasValues("09:01:00") + .column("var18").hasValues("2007-12-23 09:01:00.0") + .column("var19").hasValues("12") ; assertThat(changes).change() - .column("var1").hasValues(1) - .column("var2").hasValues("13") - .column("var3").hasValues("2") - .column("var4").hasValues("14") - .column("var5").hasValues("15") - .column("var6").hasValues(Date.valueOf("2007-12-23")) - .column("var7").hasValues(3.3) - .column("var8").hasValues(4.4) - .column("var9").hasValues(5.5) - .column("var10").hasValues(6.6) - .column("var11").hasValues(7, 20) - .column("var12").hasValues("8") - .column("var13").hasValues("16") - .column("var14").hasValues(9) - .column("var15").hasValues(10.1) - .column("var16").hasValues(11) - .column("var17").hasValues("09:01:00") - .column("var18").hasValues("2007-12-23 09:01:00.0") - .column("var19").hasValues("12") + .column("var1").hasValues(1) + .column("var2").hasValues("13") + .column("var3").hasValues("2") + .column("var4").hasValues("14") + .column("var5").hasValues("15") + .column("var6").hasValues(Date.valueOf("2007-12-23")) + .column("var7").hasValues(3.3) + .column("var8").hasValues(4.4) + .column("var9").hasValues(5.5) + .column("var10").hasValues(6.6) + .column("var11").hasValues(7, 20) + .column("var12").hasValues("8") + .column("var13").hasValues("16") + .column("var14").hasValues(9) + .column("var15").hasValues(10.1) + .column("var16").hasValues(11) + .column("var17").hasValues("09:01:00") + .column("var18").hasValues("2007-12-23 09:01:00.0") + .column("var19").hasValues("12") ; } @Test @NeedReload public void test_ColumnEquality_containsValues() { - Table table = new Table(dataSource, "test", null, new String[] {"var20"}); + Table table = new Table(dataSource, "test", null, new String[]{"var20"}); Changes changes = new Changes(table).setStartPointNow(); update(); changes.setEndPointNow(); assertThat(table).column("var1").containsValues(1) - .column("var2").containsValues("13") - .column("var3").containsValues("2") - .column("var4").containsValues("14") - .column("var5").containsValues("15") - .column("var6").containsValues(Date.valueOf("2007-12-23")) - .column("var7").containsValues(3.3) - .column("var8").containsValues(4.4) - .column("var9").containsValues(5.5) - .column("var10").containsValues(6.6) - .column("var11").containsValues(20) - .column("var12").containsValues("8") - .column("var13").containsValues("16") - .column("var14").containsValues(9) - .column("var15").containsValues(10.1) - .column("var16").containsValues(11) - .column("var17").containsValues("09:01:00") - .column("var18").containsValues("2007-12-23 09:01:00.0") - .column("var19").containsValues("12") + .column("var2").containsValues("13") + .column("var3").containsValues("2") + .column("var4").containsValues("14") + .column("var5").containsValues("15") + .column("var6").containsValues(Date.valueOf("2007-12-23")) + .column("var7").containsValues(3.3) + .column("var8").containsValues(4.4) + .column("var9").containsValues(5.5) + .column("var10").containsValues(6.6) + .column("var11").containsValues(20) + .column("var12").containsValues("8") + .column("var13").containsValues("16") + .column("var14").containsValues(9) + .column("var15").containsValues(10.1) + .column("var16").containsValues(11) + .column("var17").containsValues("09:01:00") + .column("var18").containsValues("2007-12-23 09:01:00.0") + .column("var19").containsValues("12") ; } @@ -383,124 +383,124 @@ public void test_ColumnType_isOfType() { changes.setEndPointNow(); assertThat(table).column("var1").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var2").isText(false).isOfType(ValueType.TEXT, false) - .column("var3").isText(false).isOfType(ValueType.TEXT, false) - .column("var4").isText(false).isOfType(ValueType.TEXT, false) - .column("var5").isText(false).isOfType(ValueType.TEXT, false) - .column("var6").isDate(false).isOfType(ValueType.DATE, false) - .column("var7").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var8").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var9").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var10").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var11").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var12").isText(false).isOfType(ValueType.TEXT, false) - .column("var13").isText(false).isOfType(ValueType.TEXT, false) - .column("var14").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var15").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var16").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var17").isText(false).isOfType(ValueType.TEXT, false) - .column("var18").isText(false).isOfType(ValueType.TEXT, false) - .column("var19").isText(false).isOfType(ValueType.TEXT, false) - .column("var20").isText(false).isOfType(ValueType.TEXT, false) + .column("var2").isText(false).isOfType(ValueType.TEXT, false) + .column("var3").isText(false).isOfType(ValueType.TEXT, false) + .column("var4").isText(false).isOfType(ValueType.TEXT, false) + .column("var5").isText(false).isOfType(ValueType.TEXT, false) + .column("var6").isDate(false).isOfType(ValueType.DATE, false) + .column("var7").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var8").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var9").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var10").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var11").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var12").isText(false).isOfType(ValueType.TEXT, false) + .column("var13").isText(false).isOfType(ValueType.TEXT, false) + .column("var14").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var15").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var16").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var17").isText(false).isOfType(ValueType.TEXT, false) + .column("var18").isText(false).isOfType(ValueType.TEXT, false) + .column("var19").isText(false).isOfType(ValueType.TEXT, false) + .column("var20").isText(false).isOfType(ValueType.TEXT, false) ; assertThat(changes).change() - .column("var1").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var2").isText(false).isOfType(ValueType.TEXT, false) - .column("var3").isText(false).isOfType(ValueType.TEXT, false) - .column("var4").isText(false).isOfType(ValueType.TEXT, false) - .column("var5").isText(false).isOfType(ValueType.TEXT, false) - .column("var6").isDate(false).isOfType(ValueType.DATE, false) - .column("var7").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var8").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var9").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var10").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var11").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var12").isText(false).isOfType(ValueType.TEXT, false) - .column("var13").isText(false).isOfType(ValueType.TEXT, false) - .column("var14").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var15").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var16").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var17").isText(false).isOfType(ValueType.TEXT, false) - .column("var18").isText(false).isOfType(ValueType.TEXT, false) - .column("var19").isText(false).isOfType(ValueType.TEXT, false) - .column("var20").isText(false).isOfType(ValueType.TEXT, false) + .column("var1").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var2").isText(false).isOfType(ValueType.TEXT, false) + .column("var3").isText(false).isOfType(ValueType.TEXT, false) + .column("var4").isText(false).isOfType(ValueType.TEXT, false) + .column("var5").isText(false).isOfType(ValueType.TEXT, false) + .column("var6").isDate(false).isOfType(ValueType.DATE, false) + .column("var7").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var8").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var9").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var10").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var11").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var12").isText(false).isOfType(ValueType.TEXT, false) + .column("var13").isText(false).isOfType(ValueType.TEXT, false) + .column("var14").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var15").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var16").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var17").isText(false).isOfType(ValueType.TEXT, false) + .column("var18").isText(false).isOfType(ValueType.TEXT, false) + .column("var19").isText(false).isOfType(ValueType.TEXT, false) + .column("var20").isText(false).isOfType(ValueType.TEXT, false) ; } @Test @NeedReload public void test_ColumnOfChangeEquality_hasValues() { - Table table = new Table(dataSource, "test", null, new String[] {"var20"}); + Table table = new Table(dataSource, "test", null, new String[]{"var20"}); Changes changes = new Changes(table).setStartPointNow(); update(); changes.setEndPointNow(); assertThat(changes).change() - .column("var1").hasValues(1) - .column("var2").hasValues("13") - .column("var3").hasValues("2") - .column("var4").hasValues("14") - .column("var5").hasValues("15") - .column("var6").hasValues(Date.valueOf("2007-12-23")) - .column("var7").hasValues(3.3) - .column("var8").hasValues(4.4) - .column("var9").hasValues(5.5) - .column("var10").hasValues(6.6) - .column("var11").hasValues(7, 20) - .column("var12").hasValues("8") - .column("var13").hasValues("16") - .column("var14").hasValues(9) - .column("var15").hasValues(10.1) - .column("var16").hasValues(11) - .column("var17").hasValues("09:01:00") - .column("var18").hasValues("2007-12-23 09:01:00.0") - .column("var19").hasValues("12") + .column("var1").hasValues(1) + .column("var2").hasValues("13") + .column("var3").hasValues("2") + .column("var4").hasValues("14") + .column("var5").hasValues("15") + .column("var6").hasValues(Date.valueOf("2007-12-23")) + .column("var7").hasValues(3.3) + .column("var8").hasValues(4.4) + .column("var9").hasValues(5.5) + .column("var10").hasValues(6.6) + .column("var11").hasValues(7, 20) + .column("var12").hasValues("8") + .column("var13").hasValues("16") + .column("var14").hasValues(9) + .column("var15").hasValues(10.1) + .column("var16").hasValues(11) + .column("var17").hasValues("09:01:00") + .column("var18").hasValues("2007-12-23 09:01:00.0") + .column("var19").hasValues("12") ; assertThat(changes).change() - .column("var1").hasValues(1, 1) - .column("var2").hasValues("13", "13") - .column("var3").hasValues("2", "2") - .column("var4").hasValues("14", "14") - .column("var5").hasValues("15", "15") - .column("var6").hasValues(Date.valueOf("2007-12-23"), Date.valueOf("2007-12-23")) - .column("var7").hasValues(3.3, 3.3) - .column("var8").hasValues(4.4, 4.4) - .column("var9").hasValues(5.5, 5.5) - .column("var10").hasValues(6.6, 6.6) - .column("var11").hasValues(7, 20) - .column("var12").hasValues("8", "8") - .column("var13").hasValues("16", "16") - .column("var14").hasValues(9, 9) - .column("var15").hasValues(10.1, 10.1) - .column("var16").hasValues(11, 11) - .column("var17").hasValues("09:01:00", "09:01:00") - .column("var18").hasValues("2007-12-23 09:01:00.0", "2007-12-23 09:01:00.0") - .column("var19").hasValues("12", "12") + .column("var1").hasValues(1, 1) + .column("var2").hasValues("13", "13") + .column("var3").hasValues("2", "2") + .column("var4").hasValues("14", "14") + .column("var5").hasValues("15", "15") + .column("var6").hasValues(Date.valueOf("2007-12-23"), Date.valueOf("2007-12-23")) + .column("var7").hasValues(3.3, 3.3) + .column("var8").hasValues(4.4, 4.4) + .column("var9").hasValues(5.5, 5.5) + .column("var10").hasValues(6.6, 6.6) + .column("var11").hasValues(7, 20) + .column("var12").hasValues("8", "8") + .column("var13").hasValues("16", "16") + .column("var14").hasValues(9, 9) + .column("var15").hasValues(10.1, 10.1) + .column("var16").hasValues(11, 11) + .column("var17").hasValues("09:01:00", "09:01:00") + .column("var18").hasValues("2007-12-23 09:01:00.0", "2007-12-23 09:01:00.0") + .column("var19").hasValues("12", "12") ; } @Test @NeedReload public void test_RowEquality_hasValues() { - Table table = new Table(dataSource, "test", null, new String[] { "var20" }); + Table table = new Table(dataSource, "test", null, new String[]{"var20"}); Changes changes = new Changes(table).setStartPointNow(); update(); changes.setEndPointNow(); assertThat(table).row() - .hasValues(1, "13", "2", "14", "15", - DateValue.of(2007, 12, 23), 3.3, 4.4, 5.5, 6.6, - 20, "8", "16", 9, 10.1, - 11, "09:01:00", "2007-12-23 09:01:00.0", "12") + .hasValues(1, "13", "2", "14", "15", + DateValue.of(2007, 12, 23), 3.3, 4.4, 5.5, 6.6, + 20, "8", "16", 9, 10.1, + 11, "09:01:00", "2007-12-23 09:01:00.0", "12") ; assertThat(changes).change().rowAtStartPoint() - .hasValues(1, "13", "2", "14", "15", - DateValue.of(2007, 12, 23), 3.3, 4.4, 5.5, 6.6, - 7, "8", "16", 9, 10.1, - 11, "09:01:00", "2007-12-23 09:01:00.0", "12") + .hasValues(1, "13", "2", "14", "15", + DateValue.of(2007, 12, 23), 3.3, 4.4, 5.5, 6.6, + 7, "8", "16", 9, 10.1, + 11, "09:01:00", "2007-12-23 09:01:00.0", "12") ; } @@ -513,49 +513,49 @@ public void test_ValueClass_isOfClass() { changes.setEndPointNow(); assertThat(table).row() - .value("var1").isOfClass(Integer.class) - .value("var2").isOfClass(String.class) - .value("var3").isOfClass(String.class) - .value("var4").isOfClass(String.class) - .value("var5").isOfClass(String.class) - .value("var6").isOfClass(Date.class) - .value("var7").isOfClass(Double.class) - .value("var8").isOfClass(Double.class) - .value("var9").isOfClass(Double.class) - .value("var10").isOfClass(Double.class) - .value("var11").isOfClass(Integer.class) - .value("var12").isOfClass(String.class) - .value("var13").isOfClass(String.class) - .value("var14").isOfClass(Integer.class) - .value("var15").isOfClass(Double.class) - .value("var16").isOfClass(Integer.class) - .value("var17").isOfClass(String.class) - .value("var18").isOfClass(String.class) - .value("var19").isOfClass(String.class) - .value("var20").isOfClass(String.class) + .value("var1").isOfClass(Integer.class) + .value("var2").isOfClass(String.class) + .value("var3").isOfClass(String.class) + .value("var4").isOfClass(String.class) + .value("var5").isOfClass(String.class) + .value("var6").isOfClass(Date.class) + .value("var7").isOfClass(Double.class) + .value("var8").isOfClass(Double.class) + .value("var9").isOfClass(Double.class) + .value("var10").isOfClass(Double.class) + .value("var11").isOfClass(Integer.class) + .value("var12").isOfClass(String.class) + .value("var13").isOfClass(String.class) + .value("var14").isOfClass(Integer.class) + .value("var15").isOfClass(Double.class) + .value("var16").isOfClass(Integer.class) + .value("var17").isOfClass(String.class) + .value("var18").isOfClass(String.class) + .value("var19").isOfClass(String.class) + .value("var20").isOfClass(String.class) ; assertThat(changes).change().rowAtStartPoint() - .value("var1").isOfClass(Integer.class) - .value("var2").isOfClass(String.class) - .value("var3").isOfClass(String.class) - .value("var4").isOfClass(String.class) - .value("var5").isOfClass(String.class) - .value("var6").isOfClass(Date.class) - .value("var7").isOfClass(Double.class) - .value("var8").isOfClass(Double.class) - .value("var9").isOfClass(Double.class) - .value("var10").isOfClass(Double.class) - .value("var11").isOfClass(Integer.class) - .value("var12").isOfClass(String.class) - .value("var13").isOfClass(String.class) - .value("var14").isOfClass(Integer.class) - .value("var15").isOfClass(Double.class) - .value("var16").isOfClass(Integer.class) - .value("var17").isOfClass(String.class) - .value("var18").isOfClass(String.class) - .value("var19").isOfClass(String.class) - .value("var20").isOfClass(String.class) + .value("var1").isOfClass(Integer.class) + .value("var2").isOfClass(String.class) + .value("var3").isOfClass(String.class) + .value("var4").isOfClass(String.class) + .value("var5").isOfClass(String.class) + .value("var6").isOfClass(Date.class) + .value("var7").isOfClass(Double.class) + .value("var8").isOfClass(Double.class) + .value("var9").isOfClass(Double.class) + .value("var10").isOfClass(Double.class) + .value("var11").isOfClass(Integer.class) + .value("var12").isOfClass(String.class) + .value("var13").isOfClass(String.class) + .value("var14").isOfClass(Integer.class) + .value("var15").isOfClass(Double.class) + .value("var16").isOfClass(Integer.class) + .value("var17").isOfClass(String.class) + .value("var18").isOfClass(String.class) + .value("var19").isOfClass(String.class) + .value("var20").isOfClass(String.class) ; } @@ -568,47 +568,47 @@ public void test_ValueEquality_isEqualTo() { changes.setEndPointNow(); assertThat(table).row() - .value("var1").isEqualTo(1) - .value("var2").isEqualTo("13") - .value("var3").isEqualTo("2") - .value("var4").isEqualTo("14") - .value("var5").isEqualTo("15") - .value("var6").isEqualTo(Date.valueOf("2007-12-23")) - .value("var7").isEqualTo(3.3) - .value("var8").isEqualTo(4.4) - .value("var9").isEqualTo(5.5) - .value("var10").isEqualTo(6.6) - .value("var11").isEqualTo(20) - .value("var12").isEqualTo("8") - .value("var13").isEqualTo("16") - .value("var14").isEqualTo(9) - .value("var15").isEqualTo(10.1) - .value("var16").isEqualTo(11) - .value("var17").isEqualTo("09:01:00") - .value("var18").isEqualTo("2007-12-23 09:01:00.0") - .value("var19").isEqualTo("12") + .value("var1").isEqualTo(1) + .value("var2").isEqualTo("13") + .value("var3").isEqualTo("2") + .value("var4").isEqualTo("14") + .value("var5").isEqualTo("15") + .value("var6").isEqualTo(Date.valueOf("2007-12-23")) + .value("var7").isEqualTo(3.3) + .value("var8").isEqualTo(4.4) + .value("var9").isEqualTo(5.5) + .value("var10").isEqualTo(6.6) + .value("var11").isEqualTo(20) + .value("var12").isEqualTo("8") + .value("var13").isEqualTo("16") + .value("var14").isEqualTo(9) + .value("var15").isEqualTo(10.1) + .value("var16").isEqualTo(11) + .value("var17").isEqualTo("09:01:00") + .value("var18").isEqualTo("2007-12-23 09:01:00.0") + .value("var19").isEqualTo("12") ; assertThat(changes).change().rowAtStartPoint() - .value("var1").isEqualTo(1) - .value("var2").isEqualTo("13") - .value("var3").isEqualTo("2") - .value("var4").isEqualTo("14") - .value("var5").isEqualTo("15") - .value("var6").isEqualTo(Date.valueOf("2007-12-23")) - .value("var7").isEqualTo(3.3) - .value("var8").isEqualTo(4.4) - .value("var9").isEqualTo(5.5) - .value("var10").isEqualTo(6.6) - .value("var11").isEqualTo(7) - .value("var12").isEqualTo("8") - .value("var13").isEqualTo("16") - .value("var14").isEqualTo(9) - .value("var15").isEqualTo(10.1) - .value("var16").isEqualTo(11) - .value("var17").isEqualTo("09:01:00") - .value("var18").isEqualTo("2007-12-23 09:01:00.0") - .value("var19").isEqualTo("12") + .value("var1").isEqualTo(1) + .value("var2").isEqualTo("13") + .value("var3").isEqualTo("2") + .value("var4").isEqualTo("14") + .value("var5").isEqualTo("15") + .value("var6").isEqualTo(Date.valueOf("2007-12-23")) + .value("var7").isEqualTo(3.3) + .value("var8").isEqualTo(4.4) + .value("var9").isEqualTo(5.5) + .value("var10").isEqualTo(6.6) + .value("var11").isEqualTo(7) + .value("var12").isEqualTo("8") + .value("var13").isEqualTo("16") + .value("var14").isEqualTo(9) + .value("var15").isEqualTo(10.1) + .value("var16").isEqualTo(11) + .value("var17").isEqualTo("09:01:00") + .value("var18").isEqualTo("2007-12-23 09:01:00.0") + .value("var19").isEqualTo("12") ; } @@ -621,47 +621,47 @@ public void test_ValueNonEquality_isNotEqualTo() { changes.setEndPointNow(); assertThat(table).row() - .value("var1").isNotEqualTo(2) - .value("var2").isNotEqualTo("14") - .value("var3").isNotEqualTo("3") - .value("var4").isNotEqualTo("15") - .value("var5").isNotEqualTo("16") - .value("var6").isNotEqualTo(Date.valueOf("2008-12-23")) - .value("var7").isNotEqualTo(4.3) - .value("var8").isNotEqualTo(5.4) - .value("var9").isNotEqualTo(6.5) - .value("var10").isNotEqualTo(7.6) - .value("var11").isNotEqualTo(21) - .value("var12").isNotEqualTo("9") - .value("var13").isNotEqualTo("17") - .value("var14").isNotEqualTo(8) - .value("var15").isNotEqualTo(11.1) - .value("var16").isNotEqualTo(12) - .value("var17").isNotEqualTo("09:02:00") - .value("var18").isNotEqualTo("2007-12-24 09:01:00.0") - .value("var19").isNotEqualTo("121") + .value("var1").isNotEqualTo(2) + .value("var2").isNotEqualTo("14") + .value("var3").isNotEqualTo("3") + .value("var4").isNotEqualTo("15") + .value("var5").isNotEqualTo("16") + .value("var6").isNotEqualTo(Date.valueOf("2008-12-23")) + .value("var7").isNotEqualTo(4.3) + .value("var8").isNotEqualTo(5.4) + .value("var9").isNotEqualTo(6.5) + .value("var10").isNotEqualTo(7.6) + .value("var11").isNotEqualTo(21) + .value("var12").isNotEqualTo("9") + .value("var13").isNotEqualTo("17") + .value("var14").isNotEqualTo(8) + .value("var15").isNotEqualTo(11.1) + .value("var16").isNotEqualTo(12) + .value("var17").isNotEqualTo("09:02:00") + .value("var18").isNotEqualTo("2007-12-24 09:01:00.0") + .value("var19").isNotEqualTo("121") ; assertThat(changes).change().rowAtStartPoint() - .value("var1").isNotEqualTo(2) - .value("var2").isNotEqualTo("14") - .value("var3").isNotEqualTo("3") - .value("var4").isNotEqualTo("15") - .value("var5").isNotEqualTo("16") - .value("var6").isNotEqualTo(Date.valueOf("2008-12-23")) - .value("var7").isNotEqualTo(4.3) - .value("var8").isNotEqualTo(5.4) - .value("var9").isNotEqualTo(6.5) - .value("var10").isNotEqualTo(7.6) - .value("var11").isNotEqualTo(21) - .value("var12").isNotEqualTo("9") - .value("var13").isNotEqualTo("17") - .value("var14").isNotEqualTo(8) - .value("var15").isNotEqualTo(11.1) - .value("var16").isNotEqualTo(12) - .value("var17").isNotEqualTo("09:02:00") - .value("var18").isNotEqualTo("2007-12-24 09:01:00.0") - .value("var19").isNotEqualTo("121") + .value("var1").isNotEqualTo(2) + .value("var2").isNotEqualTo("14") + .value("var3").isNotEqualTo("3") + .value("var4").isNotEqualTo("15") + .value("var5").isNotEqualTo("16") + .value("var6").isNotEqualTo(Date.valueOf("2008-12-23")) + .value("var7").isNotEqualTo(4.3) + .value("var8").isNotEqualTo(5.4) + .value("var9").isNotEqualTo(6.5) + .value("var10").isNotEqualTo(7.6) + .value("var11").isNotEqualTo(21) + .value("var12").isNotEqualTo("9") + .value("var13").isNotEqualTo("17") + .value("var14").isNotEqualTo(8) + .value("var15").isNotEqualTo(11.1) + .value("var16").isNotEqualTo(12) + .value("var17").isNotEqualTo("09:02:00") + .value("var18").isNotEqualTo("2007-12-24 09:01:00.0") + .value("var19").isNotEqualTo("121") ; } @@ -674,49 +674,49 @@ public void test_ValueType_isOfType() { changes.setEndPointNow(); assertThat(table).row() - .value("var1").isNumber().isOfType(ValueType.NUMBER) - .value("var2").isText().isOfType(ValueType.TEXT) - .value("var3").isText().isOfType(ValueType.TEXT) - .value("var4").isText().isOfType(ValueType.TEXT) - .value("var5").isText().isOfType(ValueType.TEXT) - .value("var6").isDate().isOfType(ValueType.DATE) - .value("var7").isNumber().isOfType(ValueType.NUMBER) - .value("var8").isNumber().isOfType(ValueType.NUMBER) - .value("var9").isNumber().isOfType(ValueType.NUMBER) - .value("var10").isNumber().isOfType(ValueType.NUMBER) - .value("var11").isNumber().isOfType(ValueType.NUMBER) - .value("var12").isText().isOfType(ValueType.TEXT) - .value("var13").isText().isOfType(ValueType.TEXT) - .value("var14").isNumber().isOfType(ValueType.NUMBER) - .value("var15").isNumber().isOfType(ValueType.NUMBER) - .value("var16").isNumber().isOfType(ValueType.NUMBER) - .value("var17").isText().isOfType(ValueType.TEXT) - .value("var18").isText().isOfType(ValueType.TEXT) - .value("var19").isText().isOfType(ValueType.TEXT) - .value("var20").isText().isOfType(ValueType.TEXT) + .value("var1").isNumber().isOfType(ValueType.NUMBER) + .value("var2").isText().isOfType(ValueType.TEXT) + .value("var3").isText().isOfType(ValueType.TEXT) + .value("var4").isText().isOfType(ValueType.TEXT) + .value("var5").isText().isOfType(ValueType.TEXT) + .value("var6").isDate().isOfType(ValueType.DATE) + .value("var7").isNumber().isOfType(ValueType.NUMBER) + .value("var8").isNumber().isOfType(ValueType.NUMBER) + .value("var9").isNumber().isOfType(ValueType.NUMBER) + .value("var10").isNumber().isOfType(ValueType.NUMBER) + .value("var11").isNumber().isOfType(ValueType.NUMBER) + .value("var12").isText().isOfType(ValueType.TEXT) + .value("var13").isText().isOfType(ValueType.TEXT) + .value("var14").isNumber().isOfType(ValueType.NUMBER) + .value("var15").isNumber().isOfType(ValueType.NUMBER) + .value("var16").isNumber().isOfType(ValueType.NUMBER) + .value("var17").isText().isOfType(ValueType.TEXT) + .value("var18").isText().isOfType(ValueType.TEXT) + .value("var19").isText().isOfType(ValueType.TEXT) + .value("var20").isText().isOfType(ValueType.TEXT) ; assertThat(changes).change().rowAtStartPoint() - .value("var1").isNumber().isOfType(ValueType.NUMBER) - .value("var2").isText().isOfType(ValueType.TEXT) - .value("var3").isText().isOfType(ValueType.TEXT) - .value("var4").isText().isOfType(ValueType.TEXT) - .value("var5").isText().isOfType(ValueType.TEXT) - .value("var6").isDate().isOfType(ValueType.DATE) - .value("var7").isNumber().isOfType(ValueType.NUMBER) - .value("var8").isNumber().isOfType(ValueType.NUMBER) - .value("var9").isNumber().isOfType(ValueType.NUMBER) - .value("var10").isNumber().isOfType(ValueType.NUMBER) - .value("var11").isNumber().isOfType(ValueType.NUMBER) - .value("var12").isText().isOfType(ValueType.TEXT) - .value("var13").isText().isOfType(ValueType.TEXT) - .value("var14").isNumber().isOfType(ValueType.NUMBER) - .value("var15").isNumber().isOfType(ValueType.NUMBER) - .value("var16").isNumber().isOfType(ValueType.NUMBER) - .value("var17").isText().isOfType(ValueType.TEXT) - .value("var18").isText().isOfType(ValueType.TEXT) - .value("var19").isText().isOfType(ValueType.TEXT) - .value("var20").isText().isOfType(ValueType.TEXT) + .value("var1").isNumber().isOfType(ValueType.NUMBER) + .value("var2").isText().isOfType(ValueType.TEXT) + .value("var3").isText().isOfType(ValueType.TEXT) + .value("var4").isText().isOfType(ValueType.TEXT) + .value("var5").isText().isOfType(ValueType.TEXT) + .value("var6").isDate().isOfType(ValueType.DATE) + .value("var7").isNumber().isOfType(ValueType.NUMBER) + .value("var8").isNumber().isOfType(ValueType.NUMBER) + .value("var9").isNumber().isOfType(ValueType.NUMBER) + .value("var10").isNumber().isOfType(ValueType.NUMBER) + .value("var11").isNumber().isOfType(ValueType.NUMBER) + .value("var12").isText().isOfType(ValueType.TEXT) + .value("var13").isText().isOfType(ValueType.TEXT) + .value("var14").isNumber().isOfType(ValueType.NUMBER) + .value("var15").isNumber().isOfType(ValueType.NUMBER) + .value("var16").isNumber().isOfType(ValueType.NUMBER) + .value("var17").isText().isOfType(ValueType.TEXT) + .value("var18").isText().isOfType(ValueType.TEXT) + .value("var19").isText().isOfType(ValueType.TEXT) + .value("var20").isText().isOfType(ValueType.TEXT) ; } } diff --git a/src/test/java/org/assertj/db/database/sqlite/SqliteDatabase_Source_DDD_Test.java b/src/test/java/org/assertj/db/database/sqlite/SqliteDatabase_Source_DDD_Test.java index c9c360f2..4b4c21fd 100644 --- a/src/test/java/org/assertj/db/database/sqlite/SqliteDatabase_Source_DDD_Test.java +++ b/src/test/java/org/assertj/db/database/sqlite/SqliteDatabase_Source_DDD_Test.java @@ -8,23 +8,27 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.database.sqlite; +import static org.assertj.db.api.Assertions.assertThat; +import static org.assertj.db.output.Outputs.output; + +import java.io.ByteArrayOutputStream; +import java.sql.Date; + import org.assertj.core.api.Assertions; import org.assertj.db.common.NeedReload; import org.assertj.db.output.Outputs; -import org.assertj.db.type.*; +import org.assertj.db.type.Changes; +import org.assertj.db.type.DateValue; +import org.assertj.db.type.Source; +import org.assertj.db.type.Table; +import org.assertj.db.type.ValueType; import org.junit.Before; import org.junit.Test; -import java.io.ByteArrayOutputStream; -import java.sql.Date; - -import static org.assertj.db.api.Assertions.assertThat; -import static org.assertj.db.output.Outputs.output; - /** * Test on the Sqlite database. * @@ -42,7 +46,7 @@ public void init() { @Test @NeedReload public void test_Outputs_output() { - Table table = new Table(source, "test", null, new String[] {"var20"}); + Table table = new Table(source, "test", null, new String[]{"var20"}); Changes changes = new Changes(table).setStartPointNow(); update(); changes.setEndPointNow(); @@ -59,111 +63,111 @@ public void test_Outputs_output() { ByteArrayOutputStream byteArrayOutputStream9 = new ByteArrayOutputStream(); ByteArrayOutputStream byteArrayOutputStream10 = new ByteArrayOutputStream(); Outputs.output(table).toStream(byteArrayOutputStream0) - .column().toStream(byteArrayOutputStream1) - .value().toStream(byteArrayOutputStream2) - .row().toStream(byteArrayOutputStream3) - .value().toStream(byteArrayOutputStream4) + .column().toStream(byteArrayOutputStream1) + .value().toStream(byteArrayOutputStream2) + .row().toStream(byteArrayOutputStream3) + .value().toStream(byteArrayOutputStream4) ; output(changes).toStream(byteArrayOutputStream5) - .change().toStream(byteArrayOutputStream6) - .rowAtEndPoint().toStream(byteArrayOutputStream7) - .value().toStream(byteArrayOutputStream8) - .column().toStream(byteArrayOutputStream9) - .valueAtEndPoint().toStream(byteArrayOutputStream10); + .change().toStream(byteArrayOutputStream6) + .rowAtEndPoint().toStream(byteArrayOutputStream7) + .value().toStream(byteArrayOutputStream8) + .column().toStream(byteArrayOutputStream9) + .valueAtEndPoint().toStream(byteArrayOutputStream10); Assertions.assertThat(byteArrayOutputStream0.toString()).isEqualTo(String.format("[teSt table]%n" - + "|-----------|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" - + "| | | * | | | | | | | | | | | | | | | | | | |%n" - + "| | PRIMARY | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 |%n" - + "| | KEY | (NUMBER) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (DATE) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (TEXT) |%n" - + "| | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 |%n" - + "|-----------|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" - + "| Index : 0 | 1 | 1 | 13 | 2 | 14 | 15 | 2007-12-23 | 3.3 | 4.4 | 5.5 | 6.6 | 20 | 8 | 16 | 9 | 10.1 | 11 | 09:01:00 | 2007-12-23 09:01:00.0 | 12 |%n" - + "|-----------|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n")); + + "|-----------|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" + + "| | | * | | | | | | | | | | | | | | | | | | |%n" + + "| | PRIMARY | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 |%n" + + "| | KEY | (NUMBER) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (DATE) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (TEXT) |%n" + + "| | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 |%n" + + "|-----------|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" + + "| Index : 0 | 1 | 1 | 13 | 2 | 14 | 15 | 2007-12-23 | 3.3 | 4.4 | 5.5 | 6.6 | 20 | 8 | 16 | 9 | 10.1 | 11 | 09:01:00 | 2007-12-23 09:01:00.0 | 12 |%n" + + "|-----------|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n")); Assertions.assertThat(byteArrayOutputStream1.toString()).isEqualTo(String.format("[Column at index 0 (column name : VAR1) of teSt table]%n" - + "|-----------|----------|%n" - + "| | VAR1 |%n" - + "| | (NUMBER) |%n" - + "|-----------|----------|%n" - + "| Index : 0 | 1 |%n" - + "|-----------|----------|%n")); + + "|-----------|----------|%n" + + "| | VAR1 |%n" + + "| | (NUMBER) |%n" + + "|-----------|----------|%n" + + "| Index : 0 | 1 |%n" + + "|-----------|----------|%n")); Assertions.assertThat(byteArrayOutputStream2.toString()).isEqualTo(String.format("[Value at index 0 of Column at index 0 (column name : VAR1) of teSt table]%n" - + "|----------|%n" - + "| VAR1 |%n" - + "| (NUMBER) |%n" - + "|----------|%n" - + "| 1 |%n" - + "|----------|%n")); + + "|----------|%n" + + "| VAR1 |%n" + + "| (NUMBER) |%n" + + "|----------|%n" + + "| 1 |%n" + + "|----------|%n")); Assertions.assertThat(byteArrayOutputStream3.toString()).isEqualTo(String.format("[Row at index 0 of teSt table]%n" - + "|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" - + "| | * | | | | | | | | | | | | | | | | | | |%n" - + "| PRIMARY | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 |%n" - + "| KEY | (NUMBER) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (DATE) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (TEXT) |%n" - + "| | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 |%n" - + "|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" - + "| 1 | 1 | 13 | 2 | 14 | 15 | 2007-12-23 | 3.3 | 4.4 | 5.5 | 6.6 | 20 | 8 | 16 | 9 | 10.1 | 11 | 09:01:00 | 2007-12-23 09:01:00.0 | 12 |%n" - + "|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n")); + + "|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" + + "| | * | | | | | | | | | | | | | | | | | | |%n" + + "| PRIMARY | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 |%n" + + "| KEY | (NUMBER) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (DATE) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (TEXT) |%n" + + "| | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 |%n" + + "|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" + + "| 1 | 1 | 13 | 2 | 14 | 15 | 2007-12-23 | 3.3 | 4.4 | 5.5 | 6.6 | 20 | 8 | 16 | 9 | 10.1 | 11 | 09:01:00 | 2007-12-23 09:01:00.0 | 12 |%n" + + "|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n")); Assertions.assertThat(byteArrayOutputStream4.toString()).isEqualTo(String.format("[Value at index 0 (column name : VAR1) of Row at index 0 of teSt table]%n" - + "|----------|%n" - + "| VAR1 |%n" - + "| (NUMBER) |%n" - + "|----------|%n" - + "| 1 |%n" - + "|----------|%n")); + + "|----------|%n" + + "| VAR1 |%n" + + "| (NUMBER) |%n" + + "|----------|%n" + + "| 1 |%n" + + "|----------|%n")); Assertions.assertThat(byteArrayOutputStream5.toString()).isEqualTo(String.format("[Changes on teSt table of '/jdbc:sqlite:target/testDerby.db' source]%n" - + "|-----------|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" - + "| | | | | | * | | | | | | | | | | | | | | | | | | |%n" - + "| | TYPE | TABLE | PRIMARY | | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 |%n" - + "| | | | KEY | | (NUMBER) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (DATE) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (TEXT) |%n" - + "| | | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 |%n" - + "|-----------|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" - + "| | | | | At start point | 1 | 13 | 2 | 14 | 15 | 2007-12-23 | 3.3 | 4.4 | 5.5 | 6.6 | 7 | 8 | 16 | 9 | 10.1 | 11 | 09:01:00 | 2007-12-23 09:01:00.0 | 12 |%n" - + "| Index : 0 | MODIFICATION | teSt | 1 |----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" - + "| | | | | At end point | 1 | 13 | 2 | 14 | 15 | 2007-12-23 | 3.3 | 4.4 | 5.5 | 6.6 | 20 | 8 | 16 | 9 | 10.1 | 11 | 09:01:00 | 2007-12-23 09:01:00.0 | 12 |%n" - + "|-----------|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n")); + + "|-----------|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" + + "| | | | | | * | | | | | | | | | | | | | | | | | | |%n" + + "| | TYPE | TABLE | PRIMARY | | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 |%n" + + "| | | | KEY | | (NUMBER) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (DATE) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (TEXT) |%n" + + "| | | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 |%n" + + "|-----------|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" + + "| | | | | At start point | 1 | 13 | 2 | 14 | 15 | 2007-12-23 | 3.3 | 4.4 | 5.5 | 6.6 | 7 | 8 | 16 | 9 | 10.1 | 11 | 09:01:00 | 2007-12-23 09:01:00.0 | 12 |%n" + + "| Index : 0 | MODIFICATION | teSt | 1 |----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" + + "| | | | | At end point | 1 | 13 | 2 | 14 | 15 | 2007-12-23 | 3.3 | 4.4 | 5.5 | 6.6 | 20 | 8 | 16 | 9 | 10.1 | 11 | 09:01:00 | 2007-12-23 09:01:00.0 | 12 |%n" + + "|-----------|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n")); Assertions.assertThat(byteArrayOutputStream6.toString()).isEqualTo(String.format("[Change at index 0 (with primary key : [1]) of Changes on teSt table of '/jdbc:sqlite:target/testDerby.db' source]%n" - + "|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" - + "| | | | | * | | | | | | | | | | | | | | | | | | |%n" - + "| TYPE | TABLE | PRIMARY | | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 |%n" - + "| | | KEY | | (NUMBER) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (DATE) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (TEXT) |%n" - + "| | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 |%n" - + "|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" - + "| | | | At start point | 1 | 13 | 2 | 14 | 15 | 2007-12-23 | 3.3 | 4.4 | 5.5 | 6.6 | 7 | 8 | 16 | 9 | 10.1 | 11 | 09:01:00 | 2007-12-23 09:01:00.0 | 12 |%n" - + "| MODIFICATION | teSt | 1 |----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" - + "| | | | At end point | 1 | 13 | 2 | 14 | 15 | 2007-12-23 | 3.3 | 4.4 | 5.5 | 6.6 | 20 | 8 | 16 | 9 | 10.1 | 11 | 09:01:00 | 2007-12-23 09:01:00.0 | 12 |%n" - + "|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n")); + + "|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" + + "| | | | | * | | | | | | | | | | | | | | | | | | |%n" + + "| TYPE | TABLE | PRIMARY | | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 |%n" + + "| | | KEY | | (NUMBER) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (DATE) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (TEXT) |%n" + + "| | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 |%n" + + "|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" + + "| | | | At start point | 1 | 13 | 2 | 14 | 15 | 2007-12-23 | 3.3 | 4.4 | 5.5 | 6.6 | 7 | 8 | 16 | 9 | 10.1 | 11 | 09:01:00 | 2007-12-23 09:01:00.0 | 12 |%n" + + "| MODIFICATION | teSt | 1 |----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" + + "| | | | At end point | 1 | 13 | 2 | 14 | 15 | 2007-12-23 | 3.3 | 4.4 | 5.5 | 6.6 | 20 | 8 | 16 | 9 | 10.1 | 11 | 09:01:00 | 2007-12-23 09:01:00.0 | 12 |%n" + + "|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n")); Assertions.assertThat(byteArrayOutputStream7.toString()).isEqualTo(String.format("[Row at end point of Change at index 0 (with primary key : [1]) of Changes on teSt table of '/jdbc:sqlite:target/testDerby.db' source]%n" - + "|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" - + "| | * | | | | | | | | | | | | | | | | | | |%n" - + "| PRIMARY | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 |%n" - + "| KEY | (NUMBER) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (DATE) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (TEXT) |%n" - + "| | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 |%n" - + "|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" - + "| 1 | 1 | 13 | 2 | 14 | 15 | 2007-12-23 | 3.3 | 4.4 | 5.5 | 6.6 | 20 | 8 | 16 | 9 | 10.1 | 11 | 09:01:00 | 2007-12-23 09:01:00.0 | 12 |%n" - + "|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n")); + + "|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" + + "| | * | | | | | | | | | | | | | | | | | | |%n" + + "| PRIMARY | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 |%n" + + "| KEY | (NUMBER) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (DATE) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (TEXT) |%n" + + "| | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 |%n" + + "|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" + + "| 1 | 1 | 13 | 2 | 14 | 15 | 2007-12-23 | 3.3 | 4.4 | 5.5 | 6.6 | 20 | 8 | 16 | 9 | 10.1 | 11 | 09:01:00 | 2007-12-23 09:01:00.0 | 12 |%n" + + "|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n")); Assertions.assertThat(byteArrayOutputStream8.toString()).isEqualTo(String.format("[Value at index 0 (column name : VAR1) of Row at end point of Change at index 0 (with primary key : [1]) of Changes on teSt table of '/jdbc:sqlite:target/testDerby.db' source]%n" - + "|----------|%n" - + "| VAR1 |%n" - + "| (NUMBER) |%n" - + "|----------|%n" - + "| 1 |%n" - + "|----------|%n")); + + "|----------|%n" + + "| VAR1 |%n" + + "| (NUMBER) |%n" + + "|----------|%n" + + "| 1 |%n" + + "|----------|%n")); Assertions.assertThat(byteArrayOutputStream9.toString()).isEqualTo(String.format("[Column at index 0 (column name : VAR1) of Change at index 0 (with primary key : [1]) of Changes on teSt table of '/jdbc:sqlite:target/testDerby.db' source]%n" - + "|----------------|----------|%n" - + "| | VAR1 |%n" - + "| | (NUMBER) |%n" - + "|----------------|----------|%n" - + "| At start point | 1 |%n" - + "|----------------|----------|%n" - + "| At end point | 1 |%n" - + "|----------------|----------|%n")); + + "|----------------|----------|%n" + + "| | VAR1 |%n" + + "| | (NUMBER) |%n" + + "|----------------|----------|%n" + + "| At start point | 1 |%n" + + "|----------------|----------|%n" + + "| At end point | 1 |%n" + + "|----------------|----------|%n")); Assertions.assertThat(byteArrayOutputStream10.toString()).isEqualTo(String.format("[Value at end point of Column at index 0 (column name : VAR1) of Change at index 0 (with primary key : [1]) of Changes on teSt table of '/jdbc:sqlite:target/testDerby.db' source]%n" - + "|----------|%n" - + "| VAR1 |%n" - + "| (NUMBER) |%n" - + "|----------|%n" - + "| 1 |%n" - + "|----------|%n")); + + "|----------|%n" + + "| VAR1 |%n" + + "| (NUMBER) |%n" + + "|----------|%n" + + "| 1 |%n" + + "|----------|%n")); } @Test @@ -187,49 +191,49 @@ public void test_ColumnName_hasColumnName() { changes.setEndPointNow(); assertThat(table) - .column().hasColumnName("var1") - .column().hasColumnName("var2") - .column().hasColumnName("var3") - .column().hasColumnName("var4") - .column().hasColumnName("var5") - .column().hasColumnName("var6") - .column().hasColumnName("var7") - .column().hasColumnName("var8") - .column().hasColumnName("var9") - .column().hasColumnName("var10") - .column().hasColumnName("var11") - .column().hasColumnName("var12") - .column().hasColumnName("var13") - .column().hasColumnName("var14") - .column().hasColumnName("var15") - .column().hasColumnName("var16") - .column().hasColumnName("var17") - .column().hasColumnName("var18") - .column().hasColumnName("var19") - .column().hasColumnName("var20") + .column().hasColumnName("var1") + .column().hasColumnName("var2") + .column().hasColumnName("var3") + .column().hasColumnName("var4") + .column().hasColumnName("var5") + .column().hasColumnName("var6") + .column().hasColumnName("var7") + .column().hasColumnName("var8") + .column().hasColumnName("var9") + .column().hasColumnName("var10") + .column().hasColumnName("var11") + .column().hasColumnName("var12") + .column().hasColumnName("var13") + .column().hasColumnName("var14") + .column().hasColumnName("var15") + .column().hasColumnName("var16") + .column().hasColumnName("var17") + .column().hasColumnName("var18") + .column().hasColumnName("var19") + .column().hasColumnName("var20") ; assertThat(changes).change() - .column().hasColumnName("var1") - .column().hasColumnName("var2") - .column().hasColumnName("var3") - .column().hasColumnName("var4") - .column().hasColumnName("var5") - .column().hasColumnName("var6") - .column().hasColumnName("var7") - .column().hasColumnName("var8") - .column().hasColumnName("var9") - .column().hasColumnName("var10") - .column().hasColumnName("var11") - .column().hasColumnName("var12") - .column().hasColumnName("var13") - .column().hasColumnName("var14") - .column().hasColumnName("var15") - .column().hasColumnName("var16") - .column().hasColumnName("var17") - .column().hasColumnName("var18") - .column().hasColumnName("var19") - .column().hasColumnName("var20") + .column().hasColumnName("var1") + .column().hasColumnName("var2") + .column().hasColumnName("var3") + .column().hasColumnName("var4") + .column().hasColumnName("var5") + .column().hasColumnName("var6") + .column().hasColumnName("var7") + .column().hasColumnName("var8") + .column().hasColumnName("var9") + .column().hasColumnName("var10") + .column().hasColumnName("var11") + .column().hasColumnName("var12") + .column().hasColumnName("var13") + .column().hasColumnName("var14") + .column().hasColumnName("var15") + .column().hasColumnName("var16") + .column().hasColumnName("var17") + .column().hasColumnName("var18") + .column().hasColumnName("var19") + .column().hasColumnName("var20") ; } @@ -242,131 +246,131 @@ public void test_ColumnClass_isOfClass() { changes.setEndPointNow(); assertThat(table) - .column("var1").isOfClass(Integer.class, false) - .column("var2").isOfClass(String.class, false) - .column("var3").isOfClass(String.class, false) - .column("var4").isOfClass(String.class, false) - .column("var5").isOfClass(String.class, false) - .column("var6").isOfClass(Date.class, false) - .column("var7").isOfClass(Double.class, false) - .column("var8").isOfClass(Double.class, false) - .column("var9").isOfClass(Double.class, false) - .column("var10").isOfClass(Double.class, false) - .column("var11").isOfClass(Integer.class, false) - .column("var12").isOfClass(String.class, false) - .column("var13").isOfClass(String.class, false) - .column("var14").isOfClass(Integer.class, false) - .column("var15").isOfClass(Double.class, false) - .column("var16").isOfClass(Integer.class, false) - .column("var17").isOfClass(String.class, false) - .column("var18").isOfClass(String.class, false) - .column("var19").isOfClass(String.class, false) - .column("var20").isOfClass(String.class, false) + .column("var1").isOfClass(Integer.class, false) + .column("var2").isOfClass(String.class, false) + .column("var3").isOfClass(String.class, false) + .column("var4").isOfClass(String.class, false) + .column("var5").isOfClass(String.class, false) + .column("var6").isOfClass(Date.class, false) + .column("var7").isOfClass(Double.class, false) + .column("var8").isOfClass(Double.class, false) + .column("var9").isOfClass(Double.class, false) + .column("var10").isOfClass(Double.class, false) + .column("var11").isOfClass(Integer.class, false) + .column("var12").isOfClass(String.class, false) + .column("var13").isOfClass(String.class, false) + .column("var14").isOfClass(Integer.class, false) + .column("var15").isOfClass(Double.class, false) + .column("var16").isOfClass(Integer.class, false) + .column("var17").isOfClass(String.class, false) + .column("var18").isOfClass(String.class, false) + .column("var19").isOfClass(String.class, false) + .column("var20").isOfClass(String.class, false) ; assertThat(changes).change() - .column("var1").isOfClass(Integer.class, false) - .column("var2").isOfClass(String.class, false) - .column("var3").isOfClass(String.class, false) - .column("var4").isOfClass(String.class, false) - .column("var5").isOfClass(String.class, false) - .column("var6").isOfClass(Date.class, false) - .column("var7").isOfClass(Double.class, false) - .column("var8").isOfClass(Double.class, false) - .column("var9").isOfClass(Double.class, false) - .column("var10").isOfClass(Double.class, false) - .column("var11").isOfClass(Integer.class, false) - .column("var12").isOfClass(String.class, false) - .column("var13").isOfClass(String.class, false) - .column("var14").isOfClass(Integer.class, false) - .column("var15").isOfClass(Double.class, false) - .column("var16").isOfClass(Integer.class, false) - .column("var17").isOfClass(String.class, false) - .column("var18").isOfClass(String.class, false) - .column("var19").isOfClass(String.class, false) - .column("var20").isOfClass(String.class, false) + .column("var1").isOfClass(Integer.class, false) + .column("var2").isOfClass(String.class, false) + .column("var3").isOfClass(String.class, false) + .column("var4").isOfClass(String.class, false) + .column("var5").isOfClass(String.class, false) + .column("var6").isOfClass(Date.class, false) + .column("var7").isOfClass(Double.class, false) + .column("var8").isOfClass(Double.class, false) + .column("var9").isOfClass(Double.class, false) + .column("var10").isOfClass(Double.class, false) + .column("var11").isOfClass(Integer.class, false) + .column("var12").isOfClass(String.class, false) + .column("var13").isOfClass(String.class, false) + .column("var14").isOfClass(Integer.class, false) + .column("var15").isOfClass(Double.class, false) + .column("var16").isOfClass(Integer.class, false) + .column("var17").isOfClass(String.class, false) + .column("var18").isOfClass(String.class, false) + .column("var19").isOfClass(String.class, false) + .column("var20").isOfClass(String.class, false) ; } @Test @NeedReload public void test_ColumnEquality_hasValues() { - Table table = new Table(source, "test", null, new String[] {"var20"}); + Table table = new Table(source, "test", null, new String[]{"var20"}); Changes changes = new Changes(table).setStartPointNow(); update(); changes.setEndPointNow(); assertThat(table).column("var1").hasValues(1) - .column("var2").hasValues("13") - .column("var3").hasValues("2") - .column("var4").hasValues("14") - .column("var5").hasValues("15") - .column("var6").hasValues(Date.valueOf("2007-12-23")) - .column("var7").hasValues(3.3) - .column("var8").hasValues(4.4) - .column("var9").hasValues(5.5) - .column("var10").hasValues(6.6) - .column("var11").hasValues(20) - .column("var12").hasValues("8") - .column("var13").hasValues("16") - .column("var14").hasValues(9) - .column("var15").hasValues(10.1) - .column("var16").hasValues(11) - .column("var17").hasValues("09:01:00") - .column("var18").hasValues("2007-12-23 09:01:00.0") - .column("var19").hasValues("12") + .column("var2").hasValues("13") + .column("var3").hasValues("2") + .column("var4").hasValues("14") + .column("var5").hasValues("15") + .column("var6").hasValues(Date.valueOf("2007-12-23")) + .column("var7").hasValues(3.3) + .column("var8").hasValues(4.4) + .column("var9").hasValues(5.5) + .column("var10").hasValues(6.6) + .column("var11").hasValues(20) + .column("var12").hasValues("8") + .column("var13").hasValues("16") + .column("var14").hasValues(9) + .column("var15").hasValues(10.1) + .column("var16").hasValues(11) + .column("var17").hasValues("09:01:00") + .column("var18").hasValues("2007-12-23 09:01:00.0") + .column("var19").hasValues("12") ; assertThat(changes).change() - .column("var1").hasValues(1) - .column("var2").hasValues("13") - .column("var3").hasValues("2") - .column("var4").hasValues("14") - .column("var5").hasValues("15") - .column("var6").hasValues(Date.valueOf("2007-12-23")) - .column("var7").hasValues(3.3) - .column("var8").hasValues(4.4) - .column("var9").hasValues(5.5) - .column("var10").hasValues(6.6) - .column("var11").hasValues(7, 20) - .column("var12").hasValues("8") - .column("var13").hasValues("16") - .column("var14").hasValues(9) - .column("var15").hasValues(10.1) - .column("var16").hasValues(11) - .column("var17").hasValues("09:01:00") - .column("var18").hasValues("2007-12-23 09:01:00.0") - .column("var19").hasValues("12") + .column("var1").hasValues(1) + .column("var2").hasValues("13") + .column("var3").hasValues("2") + .column("var4").hasValues("14") + .column("var5").hasValues("15") + .column("var6").hasValues(Date.valueOf("2007-12-23")) + .column("var7").hasValues(3.3) + .column("var8").hasValues(4.4) + .column("var9").hasValues(5.5) + .column("var10").hasValues(6.6) + .column("var11").hasValues(7, 20) + .column("var12").hasValues("8") + .column("var13").hasValues("16") + .column("var14").hasValues(9) + .column("var15").hasValues(10.1) + .column("var16").hasValues(11) + .column("var17").hasValues("09:01:00") + .column("var18").hasValues("2007-12-23 09:01:00.0") + .column("var19").hasValues("12") ; } @Test @NeedReload public void test_ColumnEquality_containsValues() { - Table table = new Table(source, "test", null, new String[] {"var20"}); + Table table = new Table(source, "test", null, new String[]{"var20"}); Changes changes = new Changes(table).setStartPointNow(); update(); changes.setEndPointNow(); assertThat(table).column("var1").containsValues(1) - .column("var2").containsValues("13") - .column("var3").containsValues("2") - .column("var4").containsValues("14") - .column("var5").containsValues("15") - .column("var6").containsValues(Date.valueOf("2007-12-23")) - .column("var7").containsValues(3.3) - .column("var8").containsValues(4.4) - .column("var9").containsValues(5.5) - .column("var10").containsValues(6.6) - .column("var11").containsValues(20) - .column("var12").containsValues("8") - .column("var13").containsValues("16") - .column("var14").containsValues(9) - .column("var15").containsValues(10.1) - .column("var16").containsValues(11) - .column("var17").containsValues("09:01:00") - .column("var18").containsValues("2007-12-23 09:01:00.0") - .column("var19").containsValues("12") + .column("var2").containsValues("13") + .column("var3").containsValues("2") + .column("var4").containsValues("14") + .column("var5").containsValues("15") + .column("var6").containsValues(Date.valueOf("2007-12-23")) + .column("var7").containsValues(3.3) + .column("var8").containsValues(4.4) + .column("var9").containsValues(5.5) + .column("var10").containsValues(6.6) + .column("var11").containsValues(20) + .column("var12").containsValues("8") + .column("var13").containsValues("16") + .column("var14").containsValues(9) + .column("var15").containsValues(10.1) + .column("var16").containsValues(11) + .column("var17").containsValues("09:01:00") + .column("var18").containsValues("2007-12-23 09:01:00.0") + .column("var19").containsValues("12") ; } @@ -379,124 +383,124 @@ public void test_ColumnType_isOfType() { changes.setEndPointNow(); assertThat(table).column("var1").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var2").isText(false).isOfType(ValueType.TEXT, false) - .column("var3").isText(false).isOfType(ValueType.TEXT, false) - .column("var4").isText(false).isOfType(ValueType.TEXT, false) - .column("var5").isText(false).isOfType(ValueType.TEXT, false) - .column("var6").isDate(false).isOfType(ValueType.DATE, false) - .column("var7").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var8").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var9").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var10").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var11").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var12").isText(false).isOfType(ValueType.TEXT, false) - .column("var13").isText(false).isOfType(ValueType.TEXT, false) - .column("var14").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var15").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var16").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var17").isText(false).isOfType(ValueType.TEXT, false) - .column("var18").isText(false).isOfType(ValueType.TEXT, false) - .column("var19").isText(false).isOfType(ValueType.TEXT, false) - .column("var20").isText(false).isOfType(ValueType.TEXT, false) + .column("var2").isText(false).isOfType(ValueType.TEXT, false) + .column("var3").isText(false).isOfType(ValueType.TEXT, false) + .column("var4").isText(false).isOfType(ValueType.TEXT, false) + .column("var5").isText(false).isOfType(ValueType.TEXT, false) + .column("var6").isDate(false).isOfType(ValueType.DATE, false) + .column("var7").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var8").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var9").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var10").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var11").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var12").isText(false).isOfType(ValueType.TEXT, false) + .column("var13").isText(false).isOfType(ValueType.TEXT, false) + .column("var14").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var15").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var16").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var17").isText(false).isOfType(ValueType.TEXT, false) + .column("var18").isText(false).isOfType(ValueType.TEXT, false) + .column("var19").isText(false).isOfType(ValueType.TEXT, false) + .column("var20").isText(false).isOfType(ValueType.TEXT, false) ; assertThat(changes).change() - .column("var1").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var2").isText(false).isOfType(ValueType.TEXT, false) - .column("var3").isText(false).isOfType(ValueType.TEXT, false) - .column("var4").isText(false).isOfType(ValueType.TEXT, false) - .column("var5").isText(false).isOfType(ValueType.TEXT, false) - .column("var6").isDate(false).isOfType(ValueType.DATE, false) - .column("var7").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var8").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var9").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var10").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var11").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var12").isText(false).isOfType(ValueType.TEXT, false) - .column("var13").isText(false).isOfType(ValueType.TEXT, false) - .column("var14").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var15").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var16").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var17").isText(false).isOfType(ValueType.TEXT, false) - .column("var18").isText(false).isOfType(ValueType.TEXT, false) - .column("var19").isText(false).isOfType(ValueType.TEXT, false) - .column("var20").isText(false).isOfType(ValueType.TEXT, false) + .column("var1").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var2").isText(false).isOfType(ValueType.TEXT, false) + .column("var3").isText(false).isOfType(ValueType.TEXT, false) + .column("var4").isText(false).isOfType(ValueType.TEXT, false) + .column("var5").isText(false).isOfType(ValueType.TEXT, false) + .column("var6").isDate(false).isOfType(ValueType.DATE, false) + .column("var7").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var8").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var9").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var10").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var11").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var12").isText(false).isOfType(ValueType.TEXT, false) + .column("var13").isText(false).isOfType(ValueType.TEXT, false) + .column("var14").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var15").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var16").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var17").isText(false).isOfType(ValueType.TEXT, false) + .column("var18").isText(false).isOfType(ValueType.TEXT, false) + .column("var19").isText(false).isOfType(ValueType.TEXT, false) + .column("var20").isText(false).isOfType(ValueType.TEXT, false) ; } @Test @NeedReload public void test_ColumnOfChangeEquality_hasValues() { - Table table = new Table(source, "test", null, new String[] {"var20"}); + Table table = new Table(source, "test", null, new String[]{"var20"}); Changes changes = new Changes(table).setStartPointNow(); update(); changes.setEndPointNow(); assertThat(changes).change() - .column("var1").hasValues(1) - .column("var2").hasValues("13") - .column("var3").hasValues("2") - .column("var4").hasValues("14") - .column("var5").hasValues("15") - .column("var6").hasValues(Date.valueOf("2007-12-23")) - .column("var7").hasValues(3.3) - .column("var8").hasValues(4.4) - .column("var9").hasValues(5.5) - .column("var10").hasValues(6.6) - .column("var11").hasValues(7, 20) - .column("var12").hasValues("8") - .column("var13").hasValues("16") - .column("var14").hasValues(9) - .column("var15").hasValues(10.1) - .column("var16").hasValues(11) - .column("var17").hasValues("09:01:00") - .column("var18").hasValues("2007-12-23 09:01:00.0") - .column("var19").hasValues("12") + .column("var1").hasValues(1) + .column("var2").hasValues("13") + .column("var3").hasValues("2") + .column("var4").hasValues("14") + .column("var5").hasValues("15") + .column("var6").hasValues(Date.valueOf("2007-12-23")) + .column("var7").hasValues(3.3) + .column("var8").hasValues(4.4) + .column("var9").hasValues(5.5) + .column("var10").hasValues(6.6) + .column("var11").hasValues(7, 20) + .column("var12").hasValues("8") + .column("var13").hasValues("16") + .column("var14").hasValues(9) + .column("var15").hasValues(10.1) + .column("var16").hasValues(11) + .column("var17").hasValues("09:01:00") + .column("var18").hasValues("2007-12-23 09:01:00.0") + .column("var19").hasValues("12") ; assertThat(changes).change() - .column("var1").hasValues(1, 1) - .column("var2").hasValues("13", "13") - .column("var3").hasValues("2", "2") - .column("var4").hasValues("14", "14") - .column("var5").hasValues("15", "15") - .column("var6").hasValues(Date.valueOf("2007-12-23"), Date.valueOf("2007-12-23")) - .column("var7").hasValues(3.3, 3.3) - .column("var8").hasValues(4.4, 4.4) - .column("var9").hasValues(5.5, 5.5) - .column("var10").hasValues(6.6, 6.6) - .column("var11").hasValues(7, 20) - .column("var12").hasValues("8", "8") - .column("var13").hasValues("16", "16") - .column("var14").hasValues(9, 9) - .column("var15").hasValues(10.1, 10.1) - .column("var16").hasValues(11, 11) - .column("var17").hasValues("09:01:00", "09:01:00") - .column("var18").hasValues("2007-12-23 09:01:00.0", "2007-12-23 09:01:00.0") - .column("var19").hasValues("12", "12") + .column("var1").hasValues(1, 1) + .column("var2").hasValues("13", "13") + .column("var3").hasValues("2", "2") + .column("var4").hasValues("14", "14") + .column("var5").hasValues("15", "15") + .column("var6").hasValues(Date.valueOf("2007-12-23"), Date.valueOf("2007-12-23")) + .column("var7").hasValues(3.3, 3.3) + .column("var8").hasValues(4.4, 4.4) + .column("var9").hasValues(5.5, 5.5) + .column("var10").hasValues(6.6, 6.6) + .column("var11").hasValues(7, 20) + .column("var12").hasValues("8", "8") + .column("var13").hasValues("16", "16") + .column("var14").hasValues(9, 9) + .column("var15").hasValues(10.1, 10.1) + .column("var16").hasValues(11, 11) + .column("var17").hasValues("09:01:00", "09:01:00") + .column("var18").hasValues("2007-12-23 09:01:00.0", "2007-12-23 09:01:00.0") + .column("var19").hasValues("12", "12") ; } @Test @NeedReload public void test_RowEquality_hasValues() { - Table table = new Table(source, "test", null, new String[] { "var20" }); + Table table = new Table(source, "test", null, new String[]{"var20"}); Changes changes = new Changes(table).setStartPointNow(); update(); changes.setEndPointNow(); assertThat(table).row() - .hasValues(1, "13", "2", "14", "15", - DateValue.of(2007, 12, 23), 3.3, 4.4, 5.5, 6.6, - 20, "8", "16", 9, 10.1, - 11, "09:01:00", "2007-12-23 09:01:00.0", "12") + .hasValues(1, "13", "2", "14", "15", + DateValue.of(2007, 12, 23), 3.3, 4.4, 5.5, 6.6, + 20, "8", "16", 9, 10.1, + 11, "09:01:00", "2007-12-23 09:01:00.0", "12") ; assertThat(changes).change().rowAtStartPoint() - .hasValues(1, "13", "2", "14", "15", - DateValue.of(2007, 12, 23), 3.3, 4.4, 5.5, 6.6, - 7, "8", "16", 9, 10.1, - 11, "09:01:00", "2007-12-23 09:01:00.0", "12") + .hasValues(1, "13", "2", "14", "15", + DateValue.of(2007, 12, 23), 3.3, 4.4, 5.5, 6.6, + 7, "8", "16", 9, 10.1, + 11, "09:01:00", "2007-12-23 09:01:00.0", "12") ; } @@ -509,49 +513,49 @@ public void test_ValueClass_isOfClass() { changes.setEndPointNow(); assertThat(table).row() - .value("var1").isOfClass(Integer.class) - .value("var2").isOfClass(String.class) - .value("var3").isOfClass(String.class) - .value("var4").isOfClass(String.class) - .value("var5").isOfClass(String.class) - .value("var6").isOfClass(Date.class) - .value("var7").isOfClass(Double.class) - .value("var8").isOfClass(Double.class) - .value("var9").isOfClass(Double.class) - .value("var10").isOfClass(Double.class) - .value("var11").isOfClass(Integer.class) - .value("var12").isOfClass(String.class) - .value("var13").isOfClass(String.class) - .value("var14").isOfClass(Integer.class) - .value("var15").isOfClass(Double.class) - .value("var16").isOfClass(Integer.class) - .value("var17").isOfClass(String.class) - .value("var18").isOfClass(String.class) - .value("var19").isOfClass(String.class) - .value("var20").isOfClass(String.class) + .value("var1").isOfClass(Integer.class) + .value("var2").isOfClass(String.class) + .value("var3").isOfClass(String.class) + .value("var4").isOfClass(String.class) + .value("var5").isOfClass(String.class) + .value("var6").isOfClass(Date.class) + .value("var7").isOfClass(Double.class) + .value("var8").isOfClass(Double.class) + .value("var9").isOfClass(Double.class) + .value("var10").isOfClass(Double.class) + .value("var11").isOfClass(Integer.class) + .value("var12").isOfClass(String.class) + .value("var13").isOfClass(String.class) + .value("var14").isOfClass(Integer.class) + .value("var15").isOfClass(Double.class) + .value("var16").isOfClass(Integer.class) + .value("var17").isOfClass(String.class) + .value("var18").isOfClass(String.class) + .value("var19").isOfClass(String.class) + .value("var20").isOfClass(String.class) ; assertThat(changes).change().rowAtStartPoint() - .value("var1").isOfClass(Integer.class) - .value("var2").isOfClass(String.class) - .value("var3").isOfClass(String.class) - .value("var4").isOfClass(String.class) - .value("var5").isOfClass(String.class) - .value("var6").isOfClass(Date.class) - .value("var7").isOfClass(Double.class) - .value("var8").isOfClass(Double.class) - .value("var9").isOfClass(Double.class) - .value("var10").isOfClass(Double.class) - .value("var11").isOfClass(Integer.class) - .value("var12").isOfClass(String.class) - .value("var13").isOfClass(String.class) - .value("var14").isOfClass(Integer.class) - .value("var15").isOfClass(Double.class) - .value("var16").isOfClass(Integer.class) - .value("var17").isOfClass(String.class) - .value("var18").isOfClass(String.class) - .value("var19").isOfClass(String.class) - .value("var20").isOfClass(String.class) + .value("var1").isOfClass(Integer.class) + .value("var2").isOfClass(String.class) + .value("var3").isOfClass(String.class) + .value("var4").isOfClass(String.class) + .value("var5").isOfClass(String.class) + .value("var6").isOfClass(Date.class) + .value("var7").isOfClass(Double.class) + .value("var8").isOfClass(Double.class) + .value("var9").isOfClass(Double.class) + .value("var10").isOfClass(Double.class) + .value("var11").isOfClass(Integer.class) + .value("var12").isOfClass(String.class) + .value("var13").isOfClass(String.class) + .value("var14").isOfClass(Integer.class) + .value("var15").isOfClass(Double.class) + .value("var16").isOfClass(Integer.class) + .value("var17").isOfClass(String.class) + .value("var18").isOfClass(String.class) + .value("var19").isOfClass(String.class) + .value("var20").isOfClass(String.class) ; } @@ -564,47 +568,47 @@ public void test_ValueEquality_isEqualTo() { changes.setEndPointNow(); assertThat(table).row() - .value("var1").isEqualTo(1) - .value("var2").isEqualTo("13") - .value("var3").isEqualTo("2") - .value("var4").isEqualTo("14") - .value("var5").isEqualTo("15") - .value("var6").isEqualTo(Date.valueOf("2007-12-23")) - .value("var7").isEqualTo(3.3) - .value("var8").isEqualTo(4.4) - .value("var9").isEqualTo(5.5) - .value("var10").isEqualTo(6.6) - .value("var11").isEqualTo(20) - .value("var12").isEqualTo("8") - .value("var13").isEqualTo("16") - .value("var14").isEqualTo(9) - .value("var15").isEqualTo(10.1) - .value("var16").isEqualTo(11) - .value("var17").isEqualTo("09:01:00") - .value("var18").isEqualTo("2007-12-23 09:01:00.0") - .value("var19").isEqualTo("12") + .value("var1").isEqualTo(1) + .value("var2").isEqualTo("13") + .value("var3").isEqualTo("2") + .value("var4").isEqualTo("14") + .value("var5").isEqualTo("15") + .value("var6").isEqualTo(Date.valueOf("2007-12-23")) + .value("var7").isEqualTo(3.3) + .value("var8").isEqualTo(4.4) + .value("var9").isEqualTo(5.5) + .value("var10").isEqualTo(6.6) + .value("var11").isEqualTo(20) + .value("var12").isEqualTo("8") + .value("var13").isEqualTo("16") + .value("var14").isEqualTo(9) + .value("var15").isEqualTo(10.1) + .value("var16").isEqualTo(11) + .value("var17").isEqualTo("09:01:00") + .value("var18").isEqualTo("2007-12-23 09:01:00.0") + .value("var19").isEqualTo("12") ; assertThat(changes).change().rowAtStartPoint() - .value("var1").isEqualTo(1) - .value("var2").isEqualTo("13") - .value("var3").isEqualTo("2") - .value("var4").isEqualTo("14") - .value("var5").isEqualTo("15") - .value("var6").isEqualTo(Date.valueOf("2007-12-23")) - .value("var7").isEqualTo(3.3) - .value("var8").isEqualTo(4.4) - .value("var9").isEqualTo(5.5) - .value("var10").isEqualTo(6.6) - .value("var11").isEqualTo(7) - .value("var12").isEqualTo("8") - .value("var13").isEqualTo("16") - .value("var14").isEqualTo(9) - .value("var15").isEqualTo(10.1) - .value("var16").isEqualTo(11) - .value("var17").isEqualTo("09:01:00") - .value("var18").isEqualTo("2007-12-23 09:01:00.0") - .value("var19").isEqualTo("12") + .value("var1").isEqualTo(1) + .value("var2").isEqualTo("13") + .value("var3").isEqualTo("2") + .value("var4").isEqualTo("14") + .value("var5").isEqualTo("15") + .value("var6").isEqualTo(Date.valueOf("2007-12-23")) + .value("var7").isEqualTo(3.3) + .value("var8").isEqualTo(4.4) + .value("var9").isEqualTo(5.5) + .value("var10").isEqualTo(6.6) + .value("var11").isEqualTo(7) + .value("var12").isEqualTo("8") + .value("var13").isEqualTo("16") + .value("var14").isEqualTo(9) + .value("var15").isEqualTo(10.1) + .value("var16").isEqualTo(11) + .value("var17").isEqualTo("09:01:00") + .value("var18").isEqualTo("2007-12-23 09:01:00.0") + .value("var19").isEqualTo("12") ; } @@ -617,47 +621,47 @@ public void test_ValueNonEquality_isNotEqualTo() { changes.setEndPointNow(); assertThat(table).row() - .value("var1").isNotEqualTo(2) - .value("var2").isNotEqualTo("14") - .value("var3").isNotEqualTo("3") - .value("var4").isNotEqualTo("15") - .value("var5").isNotEqualTo("16") - .value("var6").isNotEqualTo(Date.valueOf("2008-12-23")) - .value("var7").isNotEqualTo(4.3) - .value("var8").isNotEqualTo(5.4) - .value("var9").isNotEqualTo(6.5) - .value("var10").isNotEqualTo(7.6) - .value("var11").isNotEqualTo(21) - .value("var12").isNotEqualTo("9") - .value("var13").isNotEqualTo("17") - .value("var14").isNotEqualTo(8) - .value("var15").isNotEqualTo(11.1) - .value("var16").isNotEqualTo(12) - .value("var17").isNotEqualTo("09:02:00") - .value("var18").isNotEqualTo("2007-12-24 09:01:00.0") - .value("var19").isNotEqualTo("121") + .value("var1").isNotEqualTo(2) + .value("var2").isNotEqualTo("14") + .value("var3").isNotEqualTo("3") + .value("var4").isNotEqualTo("15") + .value("var5").isNotEqualTo("16") + .value("var6").isNotEqualTo(Date.valueOf("2008-12-23")) + .value("var7").isNotEqualTo(4.3) + .value("var8").isNotEqualTo(5.4) + .value("var9").isNotEqualTo(6.5) + .value("var10").isNotEqualTo(7.6) + .value("var11").isNotEqualTo(21) + .value("var12").isNotEqualTo("9") + .value("var13").isNotEqualTo("17") + .value("var14").isNotEqualTo(8) + .value("var15").isNotEqualTo(11.1) + .value("var16").isNotEqualTo(12) + .value("var17").isNotEqualTo("09:02:00") + .value("var18").isNotEqualTo("2007-12-24 09:01:00.0") + .value("var19").isNotEqualTo("121") ; assertThat(changes).change().rowAtStartPoint() - .value("var1").isNotEqualTo(2) - .value("var2").isNotEqualTo("14") - .value("var3").isNotEqualTo("3") - .value("var4").isNotEqualTo("15") - .value("var5").isNotEqualTo("16") - .value("var6").isNotEqualTo(Date.valueOf("2008-12-23")) - .value("var7").isNotEqualTo(4.3) - .value("var8").isNotEqualTo(5.4) - .value("var9").isNotEqualTo(6.5) - .value("var10").isNotEqualTo(7.6) - .value("var11").isNotEqualTo(21) - .value("var12").isNotEqualTo("9") - .value("var13").isNotEqualTo("17") - .value("var14").isNotEqualTo(8) - .value("var15").isNotEqualTo(11.1) - .value("var16").isNotEqualTo(12) - .value("var17").isNotEqualTo("09:02:00") - .value("var18").isNotEqualTo("2007-12-24 09:01:00.0") - .value("var19").isNotEqualTo("121") + .value("var1").isNotEqualTo(2) + .value("var2").isNotEqualTo("14") + .value("var3").isNotEqualTo("3") + .value("var4").isNotEqualTo("15") + .value("var5").isNotEqualTo("16") + .value("var6").isNotEqualTo(Date.valueOf("2008-12-23")) + .value("var7").isNotEqualTo(4.3) + .value("var8").isNotEqualTo(5.4) + .value("var9").isNotEqualTo(6.5) + .value("var10").isNotEqualTo(7.6) + .value("var11").isNotEqualTo(21) + .value("var12").isNotEqualTo("9") + .value("var13").isNotEqualTo("17") + .value("var14").isNotEqualTo(8) + .value("var15").isNotEqualTo(11.1) + .value("var16").isNotEqualTo(12) + .value("var17").isNotEqualTo("09:02:00") + .value("var18").isNotEqualTo("2007-12-24 09:01:00.0") + .value("var19").isNotEqualTo("121") ; } @@ -670,49 +674,49 @@ public void test_ValueType_isOfType() { changes.setEndPointNow(); assertThat(table).row() - .value("var1").isNumber().isOfType(ValueType.NUMBER) - .value("var2").isText().isOfType(ValueType.TEXT) - .value("var3").isText().isOfType(ValueType.TEXT) - .value("var4").isText().isOfType(ValueType.TEXT) - .value("var5").isText().isOfType(ValueType.TEXT) - .value("var6").isDate().isOfType(ValueType.DATE) - .value("var7").isNumber().isOfType(ValueType.NUMBER) - .value("var8").isNumber().isOfType(ValueType.NUMBER) - .value("var9").isNumber().isOfType(ValueType.NUMBER) - .value("var10").isNumber().isOfType(ValueType.NUMBER) - .value("var11").isNumber().isOfType(ValueType.NUMBER) - .value("var12").isText().isOfType(ValueType.TEXT) - .value("var13").isText().isOfType(ValueType.TEXT) - .value("var14").isNumber().isOfType(ValueType.NUMBER) - .value("var15").isNumber().isOfType(ValueType.NUMBER) - .value("var16").isNumber().isOfType(ValueType.NUMBER) - .value("var17").isText().isOfType(ValueType.TEXT) - .value("var18").isText().isOfType(ValueType.TEXT) - .value("var19").isText().isOfType(ValueType.TEXT) - .value("var20").isText().isOfType(ValueType.TEXT) + .value("var1").isNumber().isOfType(ValueType.NUMBER) + .value("var2").isText().isOfType(ValueType.TEXT) + .value("var3").isText().isOfType(ValueType.TEXT) + .value("var4").isText().isOfType(ValueType.TEXT) + .value("var5").isText().isOfType(ValueType.TEXT) + .value("var6").isDate().isOfType(ValueType.DATE) + .value("var7").isNumber().isOfType(ValueType.NUMBER) + .value("var8").isNumber().isOfType(ValueType.NUMBER) + .value("var9").isNumber().isOfType(ValueType.NUMBER) + .value("var10").isNumber().isOfType(ValueType.NUMBER) + .value("var11").isNumber().isOfType(ValueType.NUMBER) + .value("var12").isText().isOfType(ValueType.TEXT) + .value("var13").isText().isOfType(ValueType.TEXT) + .value("var14").isNumber().isOfType(ValueType.NUMBER) + .value("var15").isNumber().isOfType(ValueType.NUMBER) + .value("var16").isNumber().isOfType(ValueType.NUMBER) + .value("var17").isText().isOfType(ValueType.TEXT) + .value("var18").isText().isOfType(ValueType.TEXT) + .value("var19").isText().isOfType(ValueType.TEXT) + .value("var20").isText().isOfType(ValueType.TEXT) ; assertThat(changes).change().rowAtStartPoint() - .value("var1").isNumber().isOfType(ValueType.NUMBER) - .value("var2").isText().isOfType(ValueType.TEXT) - .value("var3").isText().isOfType(ValueType.TEXT) - .value("var4").isText().isOfType(ValueType.TEXT) - .value("var5").isText().isOfType(ValueType.TEXT) - .value("var6").isDate().isOfType(ValueType.DATE) - .value("var7").isNumber().isOfType(ValueType.NUMBER) - .value("var8").isNumber().isOfType(ValueType.NUMBER) - .value("var9").isNumber().isOfType(ValueType.NUMBER) - .value("var10").isNumber().isOfType(ValueType.NUMBER) - .value("var11").isNumber().isOfType(ValueType.NUMBER) - .value("var12").isText().isOfType(ValueType.TEXT) - .value("var13").isText().isOfType(ValueType.TEXT) - .value("var14").isNumber().isOfType(ValueType.NUMBER) - .value("var15").isNumber().isOfType(ValueType.NUMBER) - .value("var16").isNumber().isOfType(ValueType.NUMBER) - .value("var17").isText().isOfType(ValueType.TEXT) - .value("var18").isText().isOfType(ValueType.TEXT) - .value("var19").isText().isOfType(ValueType.TEXT) - .value("var20").isText().isOfType(ValueType.TEXT) + .value("var1").isNumber().isOfType(ValueType.NUMBER) + .value("var2").isText().isOfType(ValueType.TEXT) + .value("var3").isText().isOfType(ValueType.TEXT) + .value("var4").isText().isOfType(ValueType.TEXT) + .value("var5").isText().isOfType(ValueType.TEXT) + .value("var6").isDate().isOfType(ValueType.DATE) + .value("var7").isNumber().isOfType(ValueType.NUMBER) + .value("var8").isNumber().isOfType(ValueType.NUMBER) + .value("var9").isNumber().isOfType(ValueType.NUMBER) + .value("var10").isNumber().isOfType(ValueType.NUMBER) + .value("var11").isNumber().isOfType(ValueType.NUMBER) + .value("var12").isText().isOfType(ValueType.TEXT) + .value("var13").isText().isOfType(ValueType.TEXT) + .value("var14").isNumber().isOfType(ValueType.NUMBER) + .value("var15").isNumber().isOfType(ValueType.NUMBER) + .value("var16").isNumber().isOfType(ValueType.NUMBER) + .value("var17").isText().isOfType(ValueType.TEXT) + .value("var18").isText().isOfType(ValueType.TEXT) + .value("var19").isText().isOfType(ValueType.TEXT) + .value("var20").isText().isOfType(ValueType.TEXT) ; } } diff --git a/src/test/java/org/assertj/db/database/sqlite/SqliteDatabase_Source_NSNSNS_Test.java b/src/test/java/org/assertj/db/database/sqlite/SqliteDatabase_Source_NSNSNS_Test.java index a4a0d57d..23f21978 100644 --- a/src/test/java/org/assertj/db/database/sqlite/SqliteDatabase_Source_NSNSNS_Test.java +++ b/src/test/java/org/assertj/db/database/sqlite/SqliteDatabase_Source_NSNSNS_Test.java @@ -8,10 +8,16 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.database.sqlite; +import static org.assertj.db.api.Assertions.assertThat; +import static org.assertj.db.output.Outputs.output; +import static org.junit.Assert.fail; + +import java.io.ByteArrayOutputStream; + import org.assertj.core.api.Assertions; import org.assertj.db.common.NeedReload; import org.assertj.db.exception.AssertJDBException; @@ -22,12 +28,6 @@ import org.junit.Before; import org.junit.Test; -import java.io.ByteArrayOutputStream; - -import static org.assertj.db.api.Assertions.assertThat; -import static org.assertj.db.output.Outputs.output; -import static org.junit.Assert.fail; - /** * Test on the Sqlite database. * @@ -45,7 +45,7 @@ public void init() { @Test @NeedReload public void test_Outputs_output() { - Table table = new Table(source, "test", null, new String[] {"var20"}); + Table table = new Table(source, "test", null, new String[]{"var20"}); Changes changes = new Changes(table).setStartPointNow(); update(); changes.setEndPointNow(); @@ -62,110 +62,110 @@ public void test_Outputs_output() { ByteArrayOutputStream byteArrayOutputStream9 = new ByteArrayOutputStream(); ByteArrayOutputStream byteArrayOutputStream10 = new ByteArrayOutputStream(); Outputs.output(table).toStream(byteArrayOutputStream0) - .column().toStream(byteArrayOutputStream1) - .value().toStream(byteArrayOutputStream2) - .row().toStream(byteArrayOutputStream3) - .value().toStream(byteArrayOutputStream4); + .column().toStream(byteArrayOutputStream1) + .value().toStream(byteArrayOutputStream2) + .row().toStream(byteArrayOutputStream3) + .value().toStream(byteArrayOutputStream4); output(changes).toStream(byteArrayOutputStream5) - .change().toStream(byteArrayOutputStream6) - .rowAtEndPoint().toStream(byteArrayOutputStream7) - .value().toStream(byteArrayOutputStream8) - .column().toStream(byteArrayOutputStream9) - .valueAtEndPoint().toStream(byteArrayOutputStream10); + .change().toStream(byteArrayOutputStream6) + .rowAtEndPoint().toStream(byteArrayOutputStream7) + .value().toStream(byteArrayOutputStream8) + .column().toStream(byteArrayOutputStream9) + .valueAtEndPoint().toStream(byteArrayOutputStream10); Assertions.assertThat(byteArrayOutputStream0.toString()).isEqualTo(String.format("[test table]%n" - + "|-----------|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" - + "| | | * | | | | | | | | | | | | | | | | | | |%n" - + "| | PRIMARY | Var1 | vAr2 | vaR3 | var4 | var5 | var6 | var7 | var8 | var9 | var10 | var11 | var12 | var13 | var14 | var15 | var16 | var17 | var18 | var19 |%n" - + "| | KEY | (NUMBER) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (DATE) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (TEXT) |%n" - + "| | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 |%n" - + "|-----------|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" - + "| Index : 0 | 1 | 1 | 13 | 2 | 14 | 15 | 2007-12-23 | 3.3 | 4.4 | 5.5 | 6.6 | 20 | 8 | 16 | 9 | 10.1 | 11 | 09:01:00 | 2007-12-23 09:01:00.0 | 12 |%n" - + "|-----------|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n")); + + "|-----------|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" + + "| | | * | | | | | | | | | | | | | | | | | | |%n" + + "| | PRIMARY | Var1 | vAr2 | vaR3 | var4 | var5 | var6 | var7 | var8 | var9 | var10 | var11 | var12 | var13 | var14 | var15 | var16 | var17 | var18 | var19 |%n" + + "| | KEY | (NUMBER) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (DATE) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (TEXT) |%n" + + "| | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 |%n" + + "|-----------|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" + + "| Index : 0 | 1 | 1 | 13 | 2 | 14 | 15 | 2007-12-23 | 3.3 | 4.4 | 5.5 | 6.6 | 20 | 8 | 16 | 9 | 10.1 | 11 | 09:01:00 | 2007-12-23 09:01:00.0 | 12 |%n" + + "|-----------|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n")); Assertions.assertThat(byteArrayOutputStream1.toString()).isEqualTo(String.format("[Column at index 0 (column name : Var1) of test table]%n" - + "|-----------|----------|%n" - + "| | Var1 |%n" - + "| | (NUMBER) |%n" - + "|-----------|----------|%n" - + "| Index : 0 | 1 |%n" - + "|-----------|----------|%n")); + + "|-----------|----------|%n" + + "| | Var1 |%n" + + "| | (NUMBER) |%n" + + "|-----------|----------|%n" + + "| Index : 0 | 1 |%n" + + "|-----------|----------|%n")); Assertions.assertThat(byteArrayOutputStream2.toString()).isEqualTo(String.format("[Value at index 0 of Column at index 0 (column name : Var1) of test table]%n" - + "|----------|%n" - + "| Var1 |%n" - + "| (NUMBER) |%n" - + "|----------|%n" - + "| 1 |%n" - + "|----------|%n")); + + "|----------|%n" + + "| Var1 |%n" + + "| (NUMBER) |%n" + + "|----------|%n" + + "| 1 |%n" + + "|----------|%n")); Assertions.assertThat(byteArrayOutputStream3.toString()).isEqualTo(String.format("[Row at index 0 of test table]%n" - + "|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" - + "| | * | | | | | | | | | | | | | | | | | | |%n" - + "| PRIMARY | Var1 | vAr2 | vaR3 | var4 | var5 | var6 | var7 | var8 | var9 | var10 | var11 | var12 | var13 | var14 | var15 | var16 | var17 | var18 | var19 |%n" - + "| KEY | (NUMBER) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (DATE) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (TEXT) |%n" - + "| | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 |%n" - + "|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" - + "| 1 | 1 | 13 | 2 | 14 | 15 | 2007-12-23 | 3.3 | 4.4 | 5.5 | 6.6 | 20 | 8 | 16 | 9 | 10.1 | 11 | 09:01:00 | 2007-12-23 09:01:00.0 | 12 |%n" - + "|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n")); + + "|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" + + "| | * | | | | | | | | | | | | | | | | | | |%n" + + "| PRIMARY | Var1 | vAr2 | vaR3 | var4 | var5 | var6 | var7 | var8 | var9 | var10 | var11 | var12 | var13 | var14 | var15 | var16 | var17 | var18 | var19 |%n" + + "| KEY | (NUMBER) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (DATE) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (TEXT) |%n" + + "| | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 |%n" + + "|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" + + "| 1 | 1 | 13 | 2 | 14 | 15 | 2007-12-23 | 3.3 | 4.4 | 5.5 | 6.6 | 20 | 8 | 16 | 9 | 10.1 | 11 | 09:01:00 | 2007-12-23 09:01:00.0 | 12 |%n" + + "|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n")); Assertions.assertThat(byteArrayOutputStream4.toString()).isEqualTo(String.format("[Value at index 0 (column name : Var1) of Row at index 0 of test table]%n" - + "|----------|%n" - + "| Var1 |%n" - + "| (NUMBER) |%n" - + "|----------|%n" - + "| 1 |%n" - + "|----------|%n")); + + "|----------|%n" + + "| Var1 |%n" + + "| (NUMBER) |%n" + + "|----------|%n" + + "| 1 |%n" + + "|----------|%n")); Assertions.assertThat(byteArrayOutputStream5.toString()).isEqualTo(String.format("[Changes on test table of '/jdbc:sqlite:target/testDerby.db' source]%n" - + "|-----------|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" - + "| | | | | | * | | | | | | | | | | | | | | | | | | |%n" - + "| | TYPE | TABLE | PRIMARY | | Var1 | vAr2 | vaR3 | var4 | var5 | var6 | var7 | var8 | var9 | var10 | var11 | var12 | var13 | var14 | var15 | var16 | var17 | var18 | var19 |%n" - + "| | | | KEY | | (NUMBER) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (DATE) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (TEXT) |%n" - + "| | | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 |%n" - + "|-----------|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" - + "| | | | | At start point | 1 | 13 | 2 | 14 | 15 | 2007-12-23 | 3.3 | 4.4 | 5.5 | 6.6 | 7 | 8 | 16 | 9 | 10.1 | 11 | 09:01:00 | 2007-12-23 09:01:00.0 | 12 |%n" - + "| Index : 0 | MODIFICATION | test | 1 |----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" - + "| | | | | At end point | 1 | 13 | 2 | 14 | 15 | 2007-12-23 | 3.3 | 4.4 | 5.5 | 6.6 | 20 | 8 | 16 | 9 | 10.1 | 11 | 09:01:00 | 2007-12-23 09:01:00.0 | 12 |%n" - + "|-----------|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n")); + + "|-----------|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" + + "| | | | | | * | | | | | | | | | | | | | | | | | | |%n" + + "| | TYPE | TABLE | PRIMARY | | Var1 | vAr2 | vaR3 | var4 | var5 | var6 | var7 | var8 | var9 | var10 | var11 | var12 | var13 | var14 | var15 | var16 | var17 | var18 | var19 |%n" + + "| | | | KEY | | (NUMBER) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (DATE) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (TEXT) |%n" + + "| | | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 |%n" + + "|-----------|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" + + "| | | | | At start point | 1 | 13 | 2 | 14 | 15 | 2007-12-23 | 3.3 | 4.4 | 5.5 | 6.6 | 7 | 8 | 16 | 9 | 10.1 | 11 | 09:01:00 | 2007-12-23 09:01:00.0 | 12 |%n" + + "| Index : 0 | MODIFICATION | test | 1 |----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" + + "| | | | | At end point | 1 | 13 | 2 | 14 | 15 | 2007-12-23 | 3.3 | 4.4 | 5.5 | 6.6 | 20 | 8 | 16 | 9 | 10.1 | 11 | 09:01:00 | 2007-12-23 09:01:00.0 | 12 |%n" + + "|-----------|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n")); Assertions.assertThat(byteArrayOutputStream6.toString()).isEqualTo(String.format("[Change at index 0 (with primary key : [1]) of Changes on test table of '/jdbc:sqlite:target/testDerby.db' source]%n" - + "|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" - + "| | | | | * | | | | | | | | | | | | | | | | | | |%n" - + "| TYPE | TABLE | PRIMARY | | Var1 | vAr2 | vaR3 | var4 | var5 | var6 | var7 | var8 | var9 | var10 | var11 | var12 | var13 | var14 | var15 | var16 | var17 | var18 | var19 |%n" - + "| | | KEY | | (NUMBER) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (DATE) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (TEXT) |%n" - + "| | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 |%n" - + "|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" - + "| | | | At start point | 1 | 13 | 2 | 14 | 15 | 2007-12-23 | 3.3 | 4.4 | 5.5 | 6.6 | 7 | 8 | 16 | 9 | 10.1 | 11 | 09:01:00 | 2007-12-23 09:01:00.0 | 12 |%n" - + "| MODIFICATION | test | 1 |----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" - + "| | | | At end point | 1 | 13 | 2 | 14 | 15 | 2007-12-23 | 3.3 | 4.4 | 5.5 | 6.6 | 20 | 8 | 16 | 9 | 10.1 | 11 | 09:01:00 | 2007-12-23 09:01:00.0 | 12 |%n" - + "|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n")); + + "|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" + + "| | | | | * | | | | | | | | | | | | | | | | | | |%n" + + "| TYPE | TABLE | PRIMARY | | Var1 | vAr2 | vaR3 | var4 | var5 | var6 | var7 | var8 | var9 | var10 | var11 | var12 | var13 | var14 | var15 | var16 | var17 | var18 | var19 |%n" + + "| | | KEY | | (NUMBER) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (DATE) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (TEXT) |%n" + + "| | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 |%n" + + "|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" + + "| | | | At start point | 1 | 13 | 2 | 14 | 15 | 2007-12-23 | 3.3 | 4.4 | 5.5 | 6.6 | 7 | 8 | 16 | 9 | 10.1 | 11 | 09:01:00 | 2007-12-23 09:01:00.0 | 12 |%n" + + "| MODIFICATION | test | 1 |----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" + + "| | | | At end point | 1 | 13 | 2 | 14 | 15 | 2007-12-23 | 3.3 | 4.4 | 5.5 | 6.6 | 20 | 8 | 16 | 9 | 10.1 | 11 | 09:01:00 | 2007-12-23 09:01:00.0 | 12 |%n" + + "|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n")); Assertions.assertThat(byteArrayOutputStream7.toString()).isEqualTo(String.format("[Row at end point of Change at index 0 (with primary key : [1]) of Changes on test table of '/jdbc:sqlite:target/testDerby.db' source]%n" - + "|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" - + "| | * | | | | | | | | | | | | | | | | | | |%n" - + "| PRIMARY | Var1 | vAr2 | vaR3 | var4 | var5 | var6 | var7 | var8 | var9 | var10 | var11 | var12 | var13 | var14 | var15 | var16 | var17 | var18 | var19 |%n" - + "| KEY | (NUMBER) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (DATE) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (TEXT) |%n" - + "| | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 |%n" - + "|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" - + "| 1 | 1 | 13 | 2 | 14 | 15 | 2007-12-23 | 3.3 | 4.4 | 5.5 | 6.6 | 20 | 8 | 16 | 9 | 10.1 | 11 | 09:01:00 | 2007-12-23 09:01:00.0 | 12 |%n" - + "|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n")); + + "|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" + + "| | * | | | | | | | | | | | | | | | | | | |%n" + + "| PRIMARY | Var1 | vAr2 | vaR3 | var4 | var5 | var6 | var7 | var8 | var9 | var10 | var11 | var12 | var13 | var14 | var15 | var16 | var17 | var18 | var19 |%n" + + "| KEY | (NUMBER) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (DATE) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (TEXT) |%n" + + "| | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 |%n" + + "|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" + + "| 1 | 1 | 13 | 2 | 14 | 15 | 2007-12-23 | 3.3 | 4.4 | 5.5 | 6.6 | 20 | 8 | 16 | 9 | 10.1 | 11 | 09:01:00 | 2007-12-23 09:01:00.0 | 12 |%n" + + "|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n")); Assertions.assertThat(byteArrayOutputStream8.toString()).isEqualTo(String.format("[Value at index 0 (column name : Var1) of Row at end point of Change at index 0 (with primary key : [1]) of Changes on test table of '/jdbc:sqlite:target/testDerby.db' source]%n" - + "|----------|%n" - + "| Var1 |%n" - + "| (NUMBER) |%n" - + "|----------|%n" - + "| 1 |%n" - + "|----------|%n")); + + "|----------|%n" + + "| Var1 |%n" + + "| (NUMBER) |%n" + + "|----------|%n" + + "| 1 |%n" + + "|----------|%n")); Assertions.assertThat(byteArrayOutputStream9.toString()).isEqualTo(String.format("[Column at index 0 (column name : Var1) of Change at index 0 (with primary key : [1]) of Changes on test table of '/jdbc:sqlite:target/testDerby.db' source]%n" - + "|----------------|----------|%n" - + "| | Var1 |%n" - + "| | (NUMBER) |%n" - + "|----------------|----------|%n" - + "| At start point | 1 |%n" - + "|----------------|----------|%n" - + "| At end point | 1 |%n" - + "|----------------|----------|%n")); + + "|----------------|----------|%n" + + "| | Var1 |%n" + + "| | (NUMBER) |%n" + + "|----------------|----------|%n" + + "| At start point | 1 |%n" + + "|----------------|----------|%n" + + "| At end point | 1 |%n" + + "|----------------|----------|%n")); Assertions.assertThat(byteArrayOutputStream10.toString()).isEqualTo(String.format("[Value at end point of Column at index 0 (column name : Var1) of Change at index 0 (with primary key : [1]) of Changes on test table of '/jdbc:sqlite:target/testDerby.db' source]%n" - + "|----------|%n" - + "| Var1 |%n" - + "| (NUMBER) |%n" - + "|----------|%n" - + "| 1 |%n" - + "|----------|%n")); + + "|----------|%n" + + "| Var1 |%n" + + "| (NUMBER) |%n" + + "|----------|%n" + + "| 1 |%n" + + "|----------|%n")); } @Test @@ -181,25 +181,23 @@ public void should_fail_because_primary_key_is_different() { try { assertThat(changes).change().hasPksNames("var1"); fail("An exception must be raised"); - } - catch (AssertionError e) { + } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Change at index 0 (with primary key : [1]) of Changes on test table of '/jdbc:sqlite:target/testDerby.db' source] %n" - + "Expecting :%n" - + " [\"var1\"]%n" - + "to be the name of the columns of the primary keys but was:%n" - + " [\"Var1\"]")); + + "Expecting :%n" + + " [\"var1\"]%n" + + "to be the name of the columns of the primary keys but was:%n" + + " [\"Var1\"]")); } try { assertThat(changes2).change().hasPksNames("var1"); fail("An exception must be raised"); - } - catch (AssertionError e) { + } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Change at index 0 (with primary key : [1]) of Changes on teSt table of '/jdbc:sqlite:target/testDerby.db' source] %n" - + "Expecting :%n" - + " [\"var1\"]%n" - + "to be the name of the columns of the primary keys but was:%n" - + " [\"Var1\"]")); + + "Expecting :%n" + + " [\"var1\"]%n" + + "to be the name of the columns of the primary keys but was:%n" + + " [\"Var1\"]")); } } @@ -216,70 +214,64 @@ public void should_fail_because_column_name_is_different() { try { assertThat(table).column().hasColumnName("var1"); fail("An exception must be raised"); - } - catch (AssertionError e) { + } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 0 (column name : Var1) of test table] %n" - + "Expecting :%n" - + " \"var1\"%n" - + "to be the name of the column but was:%n" - + " \"Var1\"")); + + "Expecting :%n" + + " \"var1\"%n" + + "to be the name of the column but was:%n" + + " \"Var1\"")); } try { assertThat(table).row().value().hasColumnName("var1"); fail("An exception must be raised"); - } - catch (AssertionError e) { + } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at index 0 (column name : Var1) of Row at index 0 of test table] %n" - + "Expecting :%n" - + " \"var1\"%n" - + "to be the name of the column but was:%n" - + " \"Var1\"")); + + "Expecting :%n" + + " \"var1\"%n" + + "to be the name of the column but was:%n" + + " \"Var1\"")); } try { assertThat(changes).change().column().hasColumnName("var1"); fail("An exception must be raised"); - } - catch (AssertionError e) { + } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 0 (column name : Var1) of Change at index 0 (with primary key : [1]) of Changes on test table of '/jdbc:sqlite:target/testDerby.db' source] %n" - + "Expecting :%n" - + " \"var1\"%n" - + "to be the name of the column but was:%n" - + " \"Var1\"")); + + "Expecting :%n" + + " \"var1\"%n" + + "to be the name of the column but was:%n" + + " \"Var1\"")); } try { assertThat(changes).change().rowAtEndPoint().value().hasColumnName("var1"); fail("An exception must be raised"); - } - catch (AssertionError e) { + } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at index 0 (column name : Var1) of Row at end point of Change at index 0 (with primary key : [1]) of Changes on test table of '/jdbc:sqlite:target/testDerby.db' source] %n" - + "Expecting :%n" - + " \"var1\"%n" - + "to be the name of the column but was:%n" - + " \"Var1\"")); + + "Expecting :%n" + + " \"var1\"%n" + + "to be the name of the column but was:%n" + + " \"Var1\"")); } try { assertThat(changes2).change().column().hasColumnName("var1"); fail("An exception must be raised"); - } - catch (AssertionError e) { + } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Column at index 0 (column name : Var1) of Change at index 0 (with primary key : [1]) of Changes on teSt table of '/jdbc:sqlite:target/testDerby.db' source] %n" - + "Expecting :%n" - + " \"var1\"%n" - + "to be the name of the column but was:%n" - + " \"Var1\"")); + + "Expecting :%n" + + " \"var1\"%n" + + "to be the name of the column but was:%n" + + " \"Var1\"")); } try { assertThat(changes2).change().rowAtEndPoint().value().hasColumnName("var1"); fail("An exception must be raised"); - } - catch (AssertionError e) { + } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Value at index 0 (column name : Var1) of Row at end point of Change at index 0 (with primary key : [1]) of Changes on teSt table of '/jdbc:sqlite:target/testDerby.db' source] %n" - + "Expecting :%n" - + " \"var1\"%n" - + "to be the name of the column but was:%n" - + " \"Var1\"")); + + "Expecting :%n" + + " \"var1\"%n" + + "to be the name of the column but was:%n" + + " \"Var1\"")); } } @@ -296,58 +288,52 @@ public void should_fail_because_column_name_is_wrong_to_navigate() { try { assertThat(table).column("var1"); fail("An exception must be raised"); - } - catch (AssertJDBException e) { + } catch (AssertJDBException e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("Column does not exist%n" - + "in <[Var1, vAr2, vaR3, var4, var5, var6, var7, var8, var9, var10, var11, var12, var13, var14, var15, var16, var17, var18, var19, var20]>%n" - + "with comparison STRICT - Strictly compare the case")); + + "in <[Var1, vAr2, vaR3, var4, var5, var6, var7, var8, var9, var10, var11, var12, var13, var14, var15, var16, var17, var18, var19, var20]>%n" + + "with comparison STRICT - Strictly compare the case")); } try { assertThat(table).row().value("var1"); fail("An exception must be raised"); - } - catch (AssertJDBException e) { + } catch (AssertJDBException e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("Column does not exist%n" - + "in <[Var1, vAr2, vaR3, var4, var5, var6, var7, var8, var9, var10, var11, var12, var13, var14, var15, var16, var17, var18, var19, var20]>%n" - + "with comparison STRICT - Strictly compare the case")); + + "in <[Var1, vAr2, vaR3, var4, var5, var6, var7, var8, var9, var10, var11, var12, var13, var14, var15, var16, var17, var18, var19, var20]>%n" + + "with comparison STRICT - Strictly compare the case")); } try { assertThat(changes).change().column("var1"); fail("An exception must be raised"); - } - catch (AssertJDBException e) { + } catch (AssertJDBException e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("Column does not exist%n" - + "in <[Var1, vAr2, vaR3, var4, var5, var6, var7, var8, var9, var10, var11, var12, var13, var14, var15, var16, var17, var18, var19, var20]>%n" - + "with comparison STRICT - Strictly compare the case")); + + "in <[Var1, vAr2, vaR3, var4, var5, var6, var7, var8, var9, var10, var11, var12, var13, var14, var15, var16, var17, var18, var19, var20]>%n" + + "with comparison STRICT - Strictly compare the case")); } try { assertThat(changes).change().rowAtEndPoint().value("var1"); fail("An exception must be raised"); - } - catch (AssertJDBException e) { + } catch (AssertJDBException e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("Column does not exist%n" - + "in <[Var1, vAr2, vaR3, var4, var5, var6, var7, var8, var9, var10, var11, var12, var13, var14, var15, var16, var17, var18, var19, var20]>%n" - + "with comparison STRICT - Strictly compare the case")); + + "in <[Var1, vAr2, vaR3, var4, var5, var6, var7, var8, var9, var10, var11, var12, var13, var14, var15, var16, var17, var18, var19, var20]>%n" + + "with comparison STRICT - Strictly compare the case")); } try { assertThat(changes2).change().column("var1"); fail("An exception must be raised"); - } - catch (AssertJDBException e) { + } catch (AssertJDBException e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("Column does not exist%n" - + "in <[Var1, vAr2, vaR3, var4, var5, var6, var7, var8, var9, var10, var11, var12, var13, var14, var15, var16, var17, var18, var19, var20]>%n" - + "with comparison STRICT - Strictly compare the case")); + + "in <[Var1, vAr2, vaR3, var4, var5, var6, var7, var8, var9, var10, var11, var12, var13, var14, var15, var16, var17, var18, var19, var20]>%n" + + "with comparison STRICT - Strictly compare the case")); } try { assertThat(changes2).change().rowAtEndPoint().value("var1"); fail("An exception must be raised"); - } - catch (AssertJDBException e) { + } catch (AssertJDBException e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("Column does not exist%n" - + "in <[Var1, vAr2, vaR3, var4, var5, var6, var7, var8, var9, var10, var11, var12, var13, var14, var15, var16, var17, var18, var19, var20]>%n" - + "with comparison STRICT - Strictly compare the case")); + + "in <[Var1, vAr2, vaR3, var4, var5, var6, var7, var8, var9, var10, var11, var12, var13, var14, var15, var16, var17, var18, var19, var20]>%n" + + "with comparison STRICT - Strictly compare the case")); } } @@ -364,24 +350,22 @@ public void should_fail_because_table_name_is_different() { try { assertThat(changes).change().isOnTable("teSt"); fail("An exception must be raised"); - } - catch (AssertionError e) { + } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Change at index 0 (with primary key : [1]) of Changes on test table of '/jdbc:sqlite:target/testDerby.db' source] %n" - + "Expecting to be on the table:%n" - + " <\"teSt\">%n" - + "but was on the table:%n" - + " <\"test\">")); + + "Expecting to be on the table:%n" + + " <\"teSt\">%n" + + "but was on the table:%n" + + " <\"test\">")); } try { assertThat(changes2).change().isOnTable("test"); fail("An exception must be raised"); - } - catch (AssertionError e) { + } catch (AssertionError e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("[Change at index 0 (with primary key : [1]) of Changes on teSt table of '/jdbc:sqlite:target/testDerby.db' source] %n" - + "Expecting to be on the table:%n" - + " <\"test\">%n" - + "but was on the table:%n" - + " <\"teSt\">")); + + "Expecting to be on the table:%n" + + " <\"test\">%n" + + "but was on the table:%n" + + " <\"teSt\">")); } } @@ -398,44 +382,38 @@ public void should_fail_because_table_name_is_wrong_to_navigate() { try { assertThat(changes).changeOnTable("teSt"); fail("An exception must be raised"); - } - catch (AssertJDBException e) { + } catch (AssertJDBException e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("Index 0 out of the limits [0, 0[")); } try { assertThat(changes).changeOnTable("teSt", 0); fail("An exception must be raised"); - } - catch (AssertJDBException e) { + } catch (AssertJDBException e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("Index 0 out of the limits [0, 0[")); } try { assertThat(changes).changeOnTableWithPks("teSt", 1); fail("An exception must be raised"); - } - catch (AssertJDBException e) { + } catch (AssertJDBException e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("No change found for table teSt and primary keys [1]")); } try { assertThat(changes2).changeOnTable("test"); fail("An exception must be raised"); - } - catch (AssertJDBException e) { + } catch (AssertJDBException e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("Index 0 out of the limits [0, 0[")); } try { assertThat(changes2).changeOnTable("test", 0); fail("An exception must be raised"); - } - catch (AssertJDBException e) { + } catch (AssertJDBException e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("Index 0 out of the limits [0, 0[")); } try { assertThat(changes2).changeOnTableWithPks("test", 1); fail("An exception must be raised"); - } - catch (AssertJDBException e) { + } catch (AssertJDBException e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("No change found for table test and primary keys [1]")); } } diff --git a/src/test/java/org/assertj/db/database/sqlite/SqliteDatabase_Source_UIUIUI_Test.java b/src/test/java/org/assertj/db/database/sqlite/SqliteDatabase_Source_UIUIUI_Test.java index 0ab124a6..a39fc0f7 100644 --- a/src/test/java/org/assertj/db/database/sqlite/SqliteDatabase_Source_UIUIUI_Test.java +++ b/src/test/java/org/assertj/db/database/sqlite/SqliteDatabase_Source_UIUIUI_Test.java @@ -8,23 +8,27 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.database.sqlite; +import static org.assertj.db.api.Assertions.assertThat; +import static org.assertj.db.output.Outputs.output; + +import java.io.ByteArrayOutputStream; +import java.sql.Date; + import org.assertj.core.api.Assertions; import org.assertj.db.common.NeedReload; import org.assertj.db.output.Outputs; -import org.assertj.db.type.*; +import org.assertj.db.type.Changes; +import org.assertj.db.type.DateValue; +import org.assertj.db.type.Source; +import org.assertj.db.type.Table; +import org.assertj.db.type.ValueType; import org.junit.Before; import org.junit.Test; -import java.io.ByteArrayOutputStream; -import java.sql.Date; - -import static org.assertj.db.api.Assertions.assertThat; -import static org.assertj.db.output.Outputs.output; - /** * Test on the Sqlite database. * @@ -42,7 +46,7 @@ public void init() { @Test @NeedReload public void test_Outputs_output() { - Table table = new Table(source, "test", null, new String[] {"var20"}); + Table table = new Table(source, "test", null, new String[]{"var20"}); Changes changes = new Changes(table).setStartPointNow(); update(); changes.setEndPointNow(); @@ -59,111 +63,111 @@ public void test_Outputs_output() { ByteArrayOutputStream byteArrayOutputStream9 = new ByteArrayOutputStream(); ByteArrayOutputStream byteArrayOutputStream10 = new ByteArrayOutputStream(); Outputs.output(table).toStream(byteArrayOutputStream0) - .column().toStream(byteArrayOutputStream1) - .value().toStream(byteArrayOutputStream2) - .row().toStream(byteArrayOutputStream3) - .value().toStream(byteArrayOutputStream4) + .column().toStream(byteArrayOutputStream1) + .value().toStream(byteArrayOutputStream2) + .row().toStream(byteArrayOutputStream3) + .value().toStream(byteArrayOutputStream4) ; output(changes).toStream(byteArrayOutputStream5) - .change().toStream(byteArrayOutputStream6) - .rowAtEndPoint().toStream(byteArrayOutputStream7) - .value().toStream(byteArrayOutputStream8) - .column().toStream(byteArrayOutputStream9) - .valueAtEndPoint().toStream(byteArrayOutputStream10); + .change().toStream(byteArrayOutputStream6) + .rowAtEndPoint().toStream(byteArrayOutputStream7) + .value().toStream(byteArrayOutputStream8) + .column().toStream(byteArrayOutputStream9) + .valueAtEndPoint().toStream(byteArrayOutputStream10); Assertions.assertThat(byteArrayOutputStream0.toString()).isEqualTo(String.format("[TEST table]%n" - + "|-----------|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" - + "| | | * | | | | | | | | | | | | | | | | | | |%n" - + "| | PRIMARY | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 |%n" - + "| | KEY | (NUMBER) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (DATE) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (TEXT) |%n" - + "| | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 |%n" - + "|-----------|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" - + "| Index : 0 | 1 | 1 | 13 | 2 | 14 | 15 | 2007-12-23 | 3.3 | 4.4 | 5.5 | 6.6 | 20 | 8 | 16 | 9 | 10.1 | 11 | 09:01:00 | 2007-12-23 09:01:00.0 | 12 |%n" - + "|-----------|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n")); + + "|-----------|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" + + "| | | * | | | | | | | | | | | | | | | | | | |%n" + + "| | PRIMARY | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 |%n" + + "| | KEY | (NUMBER) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (DATE) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (TEXT) |%n" + + "| | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 |%n" + + "|-----------|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" + + "| Index : 0 | 1 | 1 | 13 | 2 | 14 | 15 | 2007-12-23 | 3.3 | 4.4 | 5.5 | 6.6 | 20 | 8 | 16 | 9 | 10.1 | 11 | 09:01:00 | 2007-12-23 09:01:00.0 | 12 |%n" + + "|-----------|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n")); Assertions.assertThat(byteArrayOutputStream1.toString()).isEqualTo(String.format("[Column at index 0 (column name : VAR1) of TEST table]%n" - + "|-----------|----------|%n" - + "| | VAR1 |%n" - + "| | (NUMBER) |%n" - + "|-----------|----------|%n" - + "| Index : 0 | 1 |%n" - + "|-----------|----------|%n")); + + "|-----------|----------|%n" + + "| | VAR1 |%n" + + "| | (NUMBER) |%n" + + "|-----------|----------|%n" + + "| Index : 0 | 1 |%n" + + "|-----------|----------|%n")); Assertions.assertThat(byteArrayOutputStream2.toString()).isEqualTo(String.format("[Value at index 0 of Column at index 0 (column name : VAR1) of TEST table]%n" - + "|----------|%n" - + "| VAR1 |%n" - + "| (NUMBER) |%n" - + "|----------|%n" - + "| 1 |%n" - + "|----------|%n")); + + "|----------|%n" + + "| VAR1 |%n" + + "| (NUMBER) |%n" + + "|----------|%n" + + "| 1 |%n" + + "|----------|%n")); Assertions.assertThat(byteArrayOutputStream3.toString()).isEqualTo(String.format("[Row at index 0 of TEST table]%n" - + "|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" - + "| | * | | | | | | | | | | | | | | | | | | |%n" - + "| PRIMARY | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 |%n" - + "| KEY | (NUMBER) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (DATE) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (TEXT) |%n" - + "| | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 |%n" - + "|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" - + "| 1 | 1 | 13 | 2 | 14 | 15 | 2007-12-23 | 3.3 | 4.4 | 5.5 | 6.6 | 20 | 8 | 16 | 9 | 10.1 | 11 | 09:01:00 | 2007-12-23 09:01:00.0 | 12 |%n" - + "|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n")); + + "|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" + + "| | * | | | | | | | | | | | | | | | | | | |%n" + + "| PRIMARY | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 |%n" + + "| KEY | (NUMBER) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (DATE) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (TEXT) |%n" + + "| | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 |%n" + + "|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" + + "| 1 | 1 | 13 | 2 | 14 | 15 | 2007-12-23 | 3.3 | 4.4 | 5.5 | 6.6 | 20 | 8 | 16 | 9 | 10.1 | 11 | 09:01:00 | 2007-12-23 09:01:00.0 | 12 |%n" + + "|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n")); Assertions.assertThat(byteArrayOutputStream4.toString()).isEqualTo(String.format("[Value at index 0 (column name : VAR1) of Row at index 0 of TEST table]%n" - + "|----------|%n" - + "| VAR1 |%n" - + "| (NUMBER) |%n" - + "|----------|%n" - + "| 1 |%n" - + "|----------|%n")); + + "|----------|%n" + + "| VAR1 |%n" + + "| (NUMBER) |%n" + + "|----------|%n" + + "| 1 |%n" + + "|----------|%n")); Assertions.assertThat(byteArrayOutputStream5.toString()).isEqualTo(String.format("[Changes on TEST table of '/jdbc:sqlite:target/testDerby.db' source]%n" - + "|-----------|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" - + "| | | | | | * | | | | | | | | | | | | | | | | | | |%n" - + "| | TYPE | TABLE | PRIMARY | | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 |%n" - + "| | | | KEY | | (NUMBER) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (DATE) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (TEXT) |%n" - + "| | | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 |%n" - + "|-----------|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" - + "| | | | | At start point | 1 | 13 | 2 | 14 | 15 | 2007-12-23 | 3.3 | 4.4 | 5.5 | 6.6 | 7 | 8 | 16 | 9 | 10.1 | 11 | 09:01:00 | 2007-12-23 09:01:00.0 | 12 |%n" - + "| Index : 0 | MODIFICATION | TEST | 1 |----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" - + "| | | | | At end point | 1 | 13 | 2 | 14 | 15 | 2007-12-23 | 3.3 | 4.4 | 5.5 | 6.6 | 20 | 8 | 16 | 9 | 10.1 | 11 | 09:01:00 | 2007-12-23 09:01:00.0 | 12 |%n" - + "|-----------|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n")); + + "|-----------|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" + + "| | | | | | * | | | | | | | | | | | | | | | | | | |%n" + + "| | TYPE | TABLE | PRIMARY | | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 |%n" + + "| | | | KEY | | (NUMBER) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (DATE) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (TEXT) |%n" + + "| | | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 |%n" + + "|-----------|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" + + "| | | | | At start point | 1 | 13 | 2 | 14 | 15 | 2007-12-23 | 3.3 | 4.4 | 5.5 | 6.6 | 7 | 8 | 16 | 9 | 10.1 | 11 | 09:01:00 | 2007-12-23 09:01:00.0 | 12 |%n" + + "| Index : 0 | MODIFICATION | TEST | 1 |----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" + + "| | | | | At end point | 1 | 13 | 2 | 14 | 15 | 2007-12-23 | 3.3 | 4.4 | 5.5 | 6.6 | 20 | 8 | 16 | 9 | 10.1 | 11 | 09:01:00 | 2007-12-23 09:01:00.0 | 12 |%n" + + "|-----------|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n")); Assertions.assertThat(byteArrayOutputStream6.toString()).isEqualTo(String.format("[Change at index 0 (with primary key : [1]) of Changes on TEST table of '/jdbc:sqlite:target/testDerby.db' source]%n" - + "|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" - + "| | | | | * | | | | | | | | | | | | | | | | | | |%n" - + "| TYPE | TABLE | PRIMARY | | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 |%n" - + "| | | KEY | | (NUMBER) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (DATE) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (TEXT) |%n" - + "| | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 |%n" - + "|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" - + "| | | | At start point | 1 | 13 | 2 | 14 | 15 | 2007-12-23 | 3.3 | 4.4 | 5.5 | 6.6 | 7 | 8 | 16 | 9 | 10.1 | 11 | 09:01:00 | 2007-12-23 09:01:00.0 | 12 |%n" - + "| MODIFICATION | TEST | 1 |----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" - + "| | | | At end point | 1 | 13 | 2 | 14 | 15 | 2007-12-23 | 3.3 | 4.4 | 5.5 | 6.6 | 20 | 8 | 16 | 9 | 10.1 | 11 | 09:01:00 | 2007-12-23 09:01:00.0 | 12 |%n" - + "|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n")); + + "|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" + + "| | | | | * | | | | | | | | | | | | | | | | | | |%n" + + "| TYPE | TABLE | PRIMARY | | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 |%n" + + "| | | KEY | | (NUMBER) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (DATE) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (TEXT) |%n" + + "| | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 |%n" + + "|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" + + "| | | | At start point | 1 | 13 | 2 | 14 | 15 | 2007-12-23 | 3.3 | 4.4 | 5.5 | 6.6 | 7 | 8 | 16 | 9 | 10.1 | 11 | 09:01:00 | 2007-12-23 09:01:00.0 | 12 |%n" + + "| MODIFICATION | TEST | 1 |----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" + + "| | | | At end point | 1 | 13 | 2 | 14 | 15 | 2007-12-23 | 3.3 | 4.4 | 5.5 | 6.6 | 20 | 8 | 16 | 9 | 10.1 | 11 | 09:01:00 | 2007-12-23 09:01:00.0 | 12 |%n" + + "|--------------|-------|---------|----------------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n")); Assertions.assertThat(byteArrayOutputStream7.toString()).isEqualTo(String.format("[Row at end point of Change at index 0 (with primary key : [1]) of Changes on TEST table of '/jdbc:sqlite:target/testDerby.db' source]%n" - + "|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" - + "| | * | | | | | | | | | | | | | | | | | | |%n" - + "| PRIMARY | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 |%n" - + "| KEY | (NUMBER) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (DATE) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (TEXT) |%n" - + "| | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 |%n" - + "|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" - + "| 1 | 1 | 13 | 2 | 14 | 15 | 2007-12-23 | 3.3 | 4.4 | 5.5 | 6.6 | 20 | 8 | 16 | 9 | 10.1 | 11 | 09:01:00 | 2007-12-23 09:01:00.0 | 12 |%n" - + "|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n")); + + "|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" + + "| | * | | | | | | | | | | | | | | | | | | |%n" + + "| PRIMARY | VAR1 | VAR2 | VAR3 | VAR4 | VAR5 | VAR6 | VAR7 | VAR8 | VAR9 | VAR10 | VAR11 | VAR12 | VAR13 | VAR14 | VAR15 | VAR16 | VAR17 | VAR18 | VAR19 |%n" + + "| KEY | (NUMBER) | (TEXT) | (TEXT) | (TEXT) | (TEXT) | (DATE) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) | (TEXT) | (TEXT) |%n" + + "| | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 | Index : 10 | Index : 11 | Index : 12 | Index : 13 | Index : 14 | Index : 15 | Index : 16 | Index : 17 | Index : 18 |%n" + + "|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n" + + "| 1 | 1 | 13 | 2 | 14 | 15 | 2007-12-23 | 3.3 | 4.4 | 5.5 | 6.6 | 20 | 8 | 16 | 9 | 10.1 | 11 | 09:01:00 | 2007-12-23 09:01:00.0 | 12 |%n" + + "|---------|-----------|-----------|-----------|-----------|-----------|------------|-----------|-----------|-----------|-----------|------------|------------|------------|------------|------------|------------|------------|-----------------------|------------|%n")); Assertions.assertThat(byteArrayOutputStream8.toString()).isEqualTo(String.format("[Value at index 0 (column name : VAR1) of Row at end point of Change at index 0 (with primary key : [1]) of Changes on TEST table of '/jdbc:sqlite:target/testDerby.db' source]%n" - + "|----------|%n" - + "| VAR1 |%n" - + "| (NUMBER) |%n" - + "|----------|%n" - + "| 1 |%n" - + "|----------|%n")); + + "|----------|%n" + + "| VAR1 |%n" + + "| (NUMBER) |%n" + + "|----------|%n" + + "| 1 |%n" + + "|----------|%n")); Assertions.assertThat(byteArrayOutputStream9.toString()).isEqualTo(String.format("[Column at index 0 (column name : VAR1) of Change at index 0 (with primary key : [1]) of Changes on TEST table of '/jdbc:sqlite:target/testDerby.db' source]%n" - + "|----------------|----------|%n" - + "| | VAR1 |%n" - + "| | (NUMBER) |%n" - + "|----------------|----------|%n" - + "| At start point | 1 |%n" - + "|----------------|----------|%n" - + "| At end point | 1 |%n" - + "|----------------|----------|%n")); + + "|----------------|----------|%n" + + "| | VAR1 |%n" + + "| | (NUMBER) |%n" + + "|----------------|----------|%n" + + "| At start point | 1 |%n" + + "|----------------|----------|%n" + + "| At end point | 1 |%n" + + "|----------------|----------|%n")); Assertions.assertThat(byteArrayOutputStream10.toString()).isEqualTo(String.format("[Value at end point of Column at index 0 (column name : VAR1) of Change at index 0 (with primary key : [1]) of Changes on TEST table of '/jdbc:sqlite:target/testDerby.db' source]%n" - + "|----------|%n" - + "| VAR1 |%n" - + "| (NUMBER) |%n" - + "|----------|%n" - + "| 1 |%n" - + "|----------|%n")); + + "|----------|%n" + + "| VAR1 |%n" + + "| (NUMBER) |%n" + + "|----------|%n" + + "| 1 |%n" + + "|----------|%n")); } @Test @@ -187,49 +191,49 @@ public void test_ColumnName_hasColumnName() { changes.setEndPointNow(); assertThat(table) - .column().hasColumnName("var1") - .column().hasColumnName("var2") - .column().hasColumnName("var3") - .column().hasColumnName("var4") - .column().hasColumnName("var5") - .column().hasColumnName("var6") - .column().hasColumnName("var7") - .column().hasColumnName("var8") - .column().hasColumnName("var9") - .column().hasColumnName("var10") - .column().hasColumnName("var11") - .column().hasColumnName("var12") - .column().hasColumnName("var13") - .column().hasColumnName("var14") - .column().hasColumnName("var15") - .column().hasColumnName("var16") - .column().hasColumnName("var17") - .column().hasColumnName("var18") - .column().hasColumnName("var19") - .column().hasColumnName("var20") + .column().hasColumnName("var1") + .column().hasColumnName("var2") + .column().hasColumnName("var3") + .column().hasColumnName("var4") + .column().hasColumnName("var5") + .column().hasColumnName("var6") + .column().hasColumnName("var7") + .column().hasColumnName("var8") + .column().hasColumnName("var9") + .column().hasColumnName("var10") + .column().hasColumnName("var11") + .column().hasColumnName("var12") + .column().hasColumnName("var13") + .column().hasColumnName("var14") + .column().hasColumnName("var15") + .column().hasColumnName("var16") + .column().hasColumnName("var17") + .column().hasColumnName("var18") + .column().hasColumnName("var19") + .column().hasColumnName("var20") ; assertThat(changes).change() - .column().hasColumnName("var1") - .column().hasColumnName("var2") - .column().hasColumnName("var3") - .column().hasColumnName("var4") - .column().hasColumnName("var5") - .column().hasColumnName("var6") - .column().hasColumnName("var7") - .column().hasColumnName("var8") - .column().hasColumnName("var9") - .column().hasColumnName("var10") - .column().hasColumnName("var11") - .column().hasColumnName("var12") - .column().hasColumnName("var13") - .column().hasColumnName("var14") - .column().hasColumnName("var15") - .column().hasColumnName("var16") - .column().hasColumnName("var17") - .column().hasColumnName("var18") - .column().hasColumnName("var19") - .column().hasColumnName("var20") + .column().hasColumnName("var1") + .column().hasColumnName("var2") + .column().hasColumnName("var3") + .column().hasColumnName("var4") + .column().hasColumnName("var5") + .column().hasColumnName("var6") + .column().hasColumnName("var7") + .column().hasColumnName("var8") + .column().hasColumnName("var9") + .column().hasColumnName("var10") + .column().hasColumnName("var11") + .column().hasColumnName("var12") + .column().hasColumnName("var13") + .column().hasColumnName("var14") + .column().hasColumnName("var15") + .column().hasColumnName("var16") + .column().hasColumnName("var17") + .column().hasColumnName("var18") + .column().hasColumnName("var19") + .column().hasColumnName("var20") ; } @@ -242,131 +246,131 @@ public void test_ColumnClass_isOfClass() { changes.setEndPointNow(); assertThat(table) - .column("var1").isOfClass(Integer.class, false) - .column("var2").isOfClass(String.class, false) - .column("var3").isOfClass(String.class, false) - .column("var4").isOfClass(String.class, false) - .column("var5").isOfClass(String.class, false) - .column("var6").isOfClass(Date.class, false) - .column("var7").isOfClass(Double.class, false) - .column("var8").isOfClass(Double.class, false) - .column("var9").isOfClass(Double.class, false) - .column("var10").isOfClass(Double.class, false) - .column("var11").isOfClass(Integer.class, false) - .column("var12").isOfClass(String.class, false) - .column("var13").isOfClass(String.class, false) - .column("var14").isOfClass(Integer.class, false) - .column("var15").isOfClass(Double.class, false) - .column("var16").isOfClass(Integer.class, false) - .column("var17").isOfClass(String.class, false) - .column("var18").isOfClass(String.class, false) - .column("var19").isOfClass(String.class, false) - .column("var20").isOfClass(String.class, false) + .column("var1").isOfClass(Integer.class, false) + .column("var2").isOfClass(String.class, false) + .column("var3").isOfClass(String.class, false) + .column("var4").isOfClass(String.class, false) + .column("var5").isOfClass(String.class, false) + .column("var6").isOfClass(Date.class, false) + .column("var7").isOfClass(Double.class, false) + .column("var8").isOfClass(Double.class, false) + .column("var9").isOfClass(Double.class, false) + .column("var10").isOfClass(Double.class, false) + .column("var11").isOfClass(Integer.class, false) + .column("var12").isOfClass(String.class, false) + .column("var13").isOfClass(String.class, false) + .column("var14").isOfClass(Integer.class, false) + .column("var15").isOfClass(Double.class, false) + .column("var16").isOfClass(Integer.class, false) + .column("var17").isOfClass(String.class, false) + .column("var18").isOfClass(String.class, false) + .column("var19").isOfClass(String.class, false) + .column("var20").isOfClass(String.class, false) ; assertThat(changes).change() - .column("var1").isOfClass(Integer.class, false) - .column("var2").isOfClass(String.class, false) - .column("var3").isOfClass(String.class, false) - .column("var4").isOfClass(String.class, false) - .column("var5").isOfClass(String.class, false) - .column("var6").isOfClass(Date.class, false) - .column("var7").isOfClass(Double.class, false) - .column("var8").isOfClass(Double.class, false) - .column("var9").isOfClass(Double.class, false) - .column("var10").isOfClass(Double.class, false) - .column("var11").isOfClass(Integer.class, false) - .column("var12").isOfClass(String.class, false) - .column("var13").isOfClass(String.class, false) - .column("var14").isOfClass(Integer.class, false) - .column("var15").isOfClass(Double.class, false) - .column("var16").isOfClass(Integer.class, false) - .column("var17").isOfClass(String.class, false) - .column("var18").isOfClass(String.class, false) - .column("var19").isOfClass(String.class, false) - .column("var20").isOfClass(String.class, false) + .column("var1").isOfClass(Integer.class, false) + .column("var2").isOfClass(String.class, false) + .column("var3").isOfClass(String.class, false) + .column("var4").isOfClass(String.class, false) + .column("var5").isOfClass(String.class, false) + .column("var6").isOfClass(Date.class, false) + .column("var7").isOfClass(Double.class, false) + .column("var8").isOfClass(Double.class, false) + .column("var9").isOfClass(Double.class, false) + .column("var10").isOfClass(Double.class, false) + .column("var11").isOfClass(Integer.class, false) + .column("var12").isOfClass(String.class, false) + .column("var13").isOfClass(String.class, false) + .column("var14").isOfClass(Integer.class, false) + .column("var15").isOfClass(Double.class, false) + .column("var16").isOfClass(Integer.class, false) + .column("var17").isOfClass(String.class, false) + .column("var18").isOfClass(String.class, false) + .column("var19").isOfClass(String.class, false) + .column("var20").isOfClass(String.class, false) ; } @Test @NeedReload public void test_ColumnEquality_hasValues() { - Table table = new Table(source, "test", null, new String[] {"var20"}); + Table table = new Table(source, "test", null, new String[]{"var20"}); Changes changes = new Changes(table).setStartPointNow(); update(); changes.setEndPointNow(); assertThat(table).column("var1").hasValues(1) - .column("var2").hasValues("13") - .column("var3").hasValues("2") - .column("var4").hasValues("14") - .column("var5").hasValues("15") - .column("var6").hasValues(Date.valueOf("2007-12-23")) - .column("var7").hasValues(3.3) - .column("var8").hasValues(4.4) - .column("var9").hasValues(5.5) - .column("var10").hasValues(6.6) - .column("var11").hasValues(20) - .column("var12").hasValues("8") - .column("var13").hasValues("16") - .column("var14").hasValues(9) - .column("var15").hasValues(10.1) - .column("var16").hasValues(11) - .column("var17").hasValues("09:01:00") - .column("var18").hasValues("2007-12-23 09:01:00.0") - .column("var19").hasValues("12") + .column("var2").hasValues("13") + .column("var3").hasValues("2") + .column("var4").hasValues("14") + .column("var5").hasValues("15") + .column("var6").hasValues(Date.valueOf("2007-12-23")) + .column("var7").hasValues(3.3) + .column("var8").hasValues(4.4) + .column("var9").hasValues(5.5) + .column("var10").hasValues(6.6) + .column("var11").hasValues(20) + .column("var12").hasValues("8") + .column("var13").hasValues("16") + .column("var14").hasValues(9) + .column("var15").hasValues(10.1) + .column("var16").hasValues(11) + .column("var17").hasValues("09:01:00") + .column("var18").hasValues("2007-12-23 09:01:00.0") + .column("var19").hasValues("12") ; assertThat(changes).change() - .column("var1").hasValues(1) - .column("var2").hasValues("13") - .column("var3").hasValues("2") - .column("var4").hasValues("14") - .column("var5").hasValues("15") - .column("var6").hasValues(Date.valueOf("2007-12-23")) - .column("var7").hasValues(3.3) - .column("var8").hasValues(4.4) - .column("var9").hasValues(5.5) - .column("var10").hasValues(6.6) - .column("var11").hasValues(7, 20) - .column("var12").hasValues("8") - .column("var13").hasValues("16") - .column("var14").hasValues(9) - .column("var15").hasValues(10.1) - .column("var16").hasValues(11) - .column("var17").hasValues("09:01:00") - .column("var18").hasValues("2007-12-23 09:01:00.0") - .column("var19").hasValues("12") + .column("var1").hasValues(1) + .column("var2").hasValues("13") + .column("var3").hasValues("2") + .column("var4").hasValues("14") + .column("var5").hasValues("15") + .column("var6").hasValues(Date.valueOf("2007-12-23")) + .column("var7").hasValues(3.3) + .column("var8").hasValues(4.4) + .column("var9").hasValues(5.5) + .column("var10").hasValues(6.6) + .column("var11").hasValues(7, 20) + .column("var12").hasValues("8") + .column("var13").hasValues("16") + .column("var14").hasValues(9) + .column("var15").hasValues(10.1) + .column("var16").hasValues(11) + .column("var17").hasValues("09:01:00") + .column("var18").hasValues("2007-12-23 09:01:00.0") + .column("var19").hasValues("12") ; } @Test @NeedReload public void test_ColumnEquality_containsValues() { - Table table = new Table(source, "test", null, new String[] {"var20"}); + Table table = new Table(source, "test", null, new String[]{"var20"}); Changes changes = new Changes(table).setStartPointNow(); update(); changes.setEndPointNow(); assertThat(table).column("var1").containsValues(1) - .column("var2").containsValues("13") - .column("var3").containsValues("2") - .column("var4").containsValues("14") - .column("var5").containsValues("15") - .column("var6").containsValues(Date.valueOf("2007-12-23")) - .column("var7").containsValues(3.3) - .column("var8").containsValues(4.4) - .column("var9").containsValues(5.5) - .column("var10").containsValues(6.6) - .column("var11").containsValues(20) - .column("var12").containsValues("8") - .column("var13").containsValues("16") - .column("var14").containsValues(9) - .column("var15").containsValues(10.1) - .column("var16").containsValues(11) - .column("var17").containsValues("09:01:00") - .column("var18").containsValues("2007-12-23 09:01:00.0") - .column("var19").containsValues("12") + .column("var2").containsValues("13") + .column("var3").containsValues("2") + .column("var4").containsValues("14") + .column("var5").containsValues("15") + .column("var6").containsValues(Date.valueOf("2007-12-23")) + .column("var7").containsValues(3.3) + .column("var8").containsValues(4.4) + .column("var9").containsValues(5.5) + .column("var10").containsValues(6.6) + .column("var11").containsValues(20) + .column("var12").containsValues("8") + .column("var13").containsValues("16") + .column("var14").containsValues(9) + .column("var15").containsValues(10.1) + .column("var16").containsValues(11) + .column("var17").containsValues("09:01:00") + .column("var18").containsValues("2007-12-23 09:01:00.0") + .column("var19").containsValues("12") ; } @@ -379,124 +383,124 @@ public void test_ColumnType_isOfType() { changes.setEndPointNow(); assertThat(table).column("var1").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var2").isText(false).isOfType(ValueType.TEXT, false) - .column("var3").isText(false).isOfType(ValueType.TEXT, false) - .column("var4").isText(false).isOfType(ValueType.TEXT, false) - .column("var5").isText(false).isOfType(ValueType.TEXT, false) - .column("var6").isDate(false).isOfType(ValueType.DATE, false) - .column("var7").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var8").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var9").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var10").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var11").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var12").isText(false).isOfType(ValueType.TEXT, false) - .column("var13").isText(false).isOfType(ValueType.TEXT, false) - .column("var14").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var15").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var16").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var17").isText(false).isOfType(ValueType.TEXT, false) - .column("var18").isText(false).isOfType(ValueType.TEXT, false) - .column("var19").isText(false).isOfType(ValueType.TEXT, false) - .column("var20").isText(false).isOfType(ValueType.TEXT, false) + .column("var2").isText(false).isOfType(ValueType.TEXT, false) + .column("var3").isText(false).isOfType(ValueType.TEXT, false) + .column("var4").isText(false).isOfType(ValueType.TEXT, false) + .column("var5").isText(false).isOfType(ValueType.TEXT, false) + .column("var6").isDate(false).isOfType(ValueType.DATE, false) + .column("var7").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var8").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var9").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var10").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var11").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var12").isText(false).isOfType(ValueType.TEXT, false) + .column("var13").isText(false).isOfType(ValueType.TEXT, false) + .column("var14").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var15").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var16").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var17").isText(false).isOfType(ValueType.TEXT, false) + .column("var18").isText(false).isOfType(ValueType.TEXT, false) + .column("var19").isText(false).isOfType(ValueType.TEXT, false) + .column("var20").isText(false).isOfType(ValueType.TEXT, false) ; assertThat(changes).change() - .column("var1").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var2").isText(false).isOfType(ValueType.TEXT, false) - .column("var3").isText(false).isOfType(ValueType.TEXT, false) - .column("var4").isText(false).isOfType(ValueType.TEXT, false) - .column("var5").isText(false).isOfType(ValueType.TEXT, false) - .column("var6").isDate(false).isOfType(ValueType.DATE, false) - .column("var7").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var8").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var9").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var10").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var11").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var12").isText(false).isOfType(ValueType.TEXT, false) - .column("var13").isText(false).isOfType(ValueType.TEXT, false) - .column("var14").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var15").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var16").isNumber(false).isOfType(ValueType.NUMBER, false) - .column("var17").isText(false).isOfType(ValueType.TEXT, false) - .column("var18").isText(false).isOfType(ValueType.TEXT, false) - .column("var19").isText(false).isOfType(ValueType.TEXT, false) - .column("var20").isText(false).isOfType(ValueType.TEXT, false) + .column("var1").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var2").isText(false).isOfType(ValueType.TEXT, false) + .column("var3").isText(false).isOfType(ValueType.TEXT, false) + .column("var4").isText(false).isOfType(ValueType.TEXT, false) + .column("var5").isText(false).isOfType(ValueType.TEXT, false) + .column("var6").isDate(false).isOfType(ValueType.DATE, false) + .column("var7").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var8").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var9").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var10").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var11").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var12").isText(false).isOfType(ValueType.TEXT, false) + .column("var13").isText(false).isOfType(ValueType.TEXT, false) + .column("var14").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var15").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var16").isNumber(false).isOfType(ValueType.NUMBER, false) + .column("var17").isText(false).isOfType(ValueType.TEXT, false) + .column("var18").isText(false).isOfType(ValueType.TEXT, false) + .column("var19").isText(false).isOfType(ValueType.TEXT, false) + .column("var20").isText(false).isOfType(ValueType.TEXT, false) ; } @Test @NeedReload public void test_ColumnOfChangeEquality_hasValues() { - Table table = new Table(source, "test", null, new String[] {"var20"}); + Table table = new Table(source, "test", null, new String[]{"var20"}); Changes changes = new Changes(table).setStartPointNow(); update(); changes.setEndPointNow(); assertThat(changes).change() - .column("var1").hasValues(1) - .column("var2").hasValues("13") - .column("var3").hasValues("2") - .column("var4").hasValues("14") - .column("var5").hasValues("15") - .column("var6").hasValues(Date.valueOf("2007-12-23")) - .column("var7").hasValues(3.3) - .column("var8").hasValues(4.4) - .column("var9").hasValues(5.5) - .column("var10").hasValues(6.6) - .column("var11").hasValues(7, 20) - .column("var12").hasValues("8") - .column("var13").hasValues("16") - .column("var14").hasValues(9) - .column("var15").hasValues(10.1) - .column("var16").hasValues(11) - .column("var17").hasValues("09:01:00") - .column("var18").hasValues("2007-12-23 09:01:00.0") - .column("var19").hasValues("12") + .column("var1").hasValues(1) + .column("var2").hasValues("13") + .column("var3").hasValues("2") + .column("var4").hasValues("14") + .column("var5").hasValues("15") + .column("var6").hasValues(Date.valueOf("2007-12-23")) + .column("var7").hasValues(3.3) + .column("var8").hasValues(4.4) + .column("var9").hasValues(5.5) + .column("var10").hasValues(6.6) + .column("var11").hasValues(7, 20) + .column("var12").hasValues("8") + .column("var13").hasValues("16") + .column("var14").hasValues(9) + .column("var15").hasValues(10.1) + .column("var16").hasValues(11) + .column("var17").hasValues("09:01:00") + .column("var18").hasValues("2007-12-23 09:01:00.0") + .column("var19").hasValues("12") ; assertThat(changes).change() - .column("var1").hasValues(1, 1) - .column("var2").hasValues("13", "13") - .column("var3").hasValues("2", "2") - .column("var4").hasValues("14", "14") - .column("var5").hasValues("15", "15") - .column("var6").hasValues(Date.valueOf("2007-12-23"), Date.valueOf("2007-12-23")) - .column("var7").hasValues(3.3, 3.3) - .column("var8").hasValues(4.4, 4.4) - .column("var9").hasValues(5.5, 5.5) - .column("var10").hasValues(6.6, 6.6) - .column("var11").hasValues(7, 20) - .column("var12").hasValues("8", "8") - .column("var13").hasValues("16", "16") - .column("var14").hasValues(9, 9) - .column("var15").hasValues(10.1, 10.1) - .column("var16").hasValues(11, 11) - .column("var17").hasValues("09:01:00", "09:01:00") - .column("var18").hasValues("2007-12-23 09:01:00.0", "2007-12-23 09:01:00.0") - .column("var19").hasValues("12", "12") + .column("var1").hasValues(1, 1) + .column("var2").hasValues("13", "13") + .column("var3").hasValues("2", "2") + .column("var4").hasValues("14", "14") + .column("var5").hasValues("15", "15") + .column("var6").hasValues(Date.valueOf("2007-12-23"), Date.valueOf("2007-12-23")) + .column("var7").hasValues(3.3, 3.3) + .column("var8").hasValues(4.4, 4.4) + .column("var9").hasValues(5.5, 5.5) + .column("var10").hasValues(6.6, 6.6) + .column("var11").hasValues(7, 20) + .column("var12").hasValues("8", "8") + .column("var13").hasValues("16", "16") + .column("var14").hasValues(9, 9) + .column("var15").hasValues(10.1, 10.1) + .column("var16").hasValues(11, 11) + .column("var17").hasValues("09:01:00", "09:01:00") + .column("var18").hasValues("2007-12-23 09:01:00.0", "2007-12-23 09:01:00.0") + .column("var19").hasValues("12", "12") ; } @Test @NeedReload public void test_RowEquality_hasValues() { - Table table = new Table(source, "test", null, new String[] { "var20" }); + Table table = new Table(source, "test", null, new String[]{"var20"}); Changes changes = new Changes(table).setStartPointNow(); update(); changes.setEndPointNow(); assertThat(table).row() - .hasValues(1, "13", "2", "14", "15", - DateValue.of(2007, 12, 23), 3.3, 4.4, 5.5, 6.6, - 20, "8", "16", 9, 10.1, - 11, "09:01:00", "2007-12-23 09:01:00.0", "12") + .hasValues(1, "13", "2", "14", "15", + DateValue.of(2007, 12, 23), 3.3, 4.4, 5.5, 6.6, + 20, "8", "16", 9, 10.1, + 11, "09:01:00", "2007-12-23 09:01:00.0", "12") ; assertThat(changes).change().rowAtStartPoint() - .hasValues(1, "13", "2", "14", "15", - DateValue.of(2007, 12, 23), 3.3, 4.4, 5.5, 6.6, - 7, "8", "16", 9, 10.1, - 11, "09:01:00", "2007-12-23 09:01:00.0", "12") + .hasValues(1, "13", "2", "14", "15", + DateValue.of(2007, 12, 23), 3.3, 4.4, 5.5, 6.6, + 7, "8", "16", 9, 10.1, + 11, "09:01:00", "2007-12-23 09:01:00.0", "12") ; } @@ -509,49 +513,49 @@ public void test_ValueClass_isOfClass() { changes.setEndPointNow(); assertThat(table).row() - .value("var1").isOfClass(Integer.class) - .value("var2").isOfClass(String.class) - .value("var3").isOfClass(String.class) - .value("var4").isOfClass(String.class) - .value("var5").isOfClass(String.class) - .value("var6").isOfClass(Date.class) - .value("var7").isOfClass(Double.class) - .value("var8").isOfClass(Double.class) - .value("var9").isOfClass(Double.class) - .value("var10").isOfClass(Double.class) - .value("var11").isOfClass(Integer.class) - .value("var12").isOfClass(String.class) - .value("var13").isOfClass(String.class) - .value("var14").isOfClass(Integer.class) - .value("var15").isOfClass(Double.class) - .value("var16").isOfClass(Integer.class) - .value("var17").isOfClass(String.class) - .value("var18").isOfClass(String.class) - .value("var19").isOfClass(String.class) - .value("var20").isOfClass(String.class) + .value("var1").isOfClass(Integer.class) + .value("var2").isOfClass(String.class) + .value("var3").isOfClass(String.class) + .value("var4").isOfClass(String.class) + .value("var5").isOfClass(String.class) + .value("var6").isOfClass(Date.class) + .value("var7").isOfClass(Double.class) + .value("var8").isOfClass(Double.class) + .value("var9").isOfClass(Double.class) + .value("var10").isOfClass(Double.class) + .value("var11").isOfClass(Integer.class) + .value("var12").isOfClass(String.class) + .value("var13").isOfClass(String.class) + .value("var14").isOfClass(Integer.class) + .value("var15").isOfClass(Double.class) + .value("var16").isOfClass(Integer.class) + .value("var17").isOfClass(String.class) + .value("var18").isOfClass(String.class) + .value("var19").isOfClass(String.class) + .value("var20").isOfClass(String.class) ; assertThat(changes).change().rowAtStartPoint() - .value("var1").isOfClass(Integer.class) - .value("var2").isOfClass(String.class) - .value("var3").isOfClass(String.class) - .value("var4").isOfClass(String.class) - .value("var5").isOfClass(String.class) - .value("var6").isOfClass(Date.class) - .value("var7").isOfClass(Double.class) - .value("var8").isOfClass(Double.class) - .value("var9").isOfClass(Double.class) - .value("var10").isOfClass(Double.class) - .value("var11").isOfClass(Integer.class) - .value("var12").isOfClass(String.class) - .value("var13").isOfClass(String.class) - .value("var14").isOfClass(Integer.class) - .value("var15").isOfClass(Double.class) - .value("var16").isOfClass(Integer.class) - .value("var17").isOfClass(String.class) - .value("var18").isOfClass(String.class) - .value("var19").isOfClass(String.class) - .value("var20").isOfClass(String.class) + .value("var1").isOfClass(Integer.class) + .value("var2").isOfClass(String.class) + .value("var3").isOfClass(String.class) + .value("var4").isOfClass(String.class) + .value("var5").isOfClass(String.class) + .value("var6").isOfClass(Date.class) + .value("var7").isOfClass(Double.class) + .value("var8").isOfClass(Double.class) + .value("var9").isOfClass(Double.class) + .value("var10").isOfClass(Double.class) + .value("var11").isOfClass(Integer.class) + .value("var12").isOfClass(String.class) + .value("var13").isOfClass(String.class) + .value("var14").isOfClass(Integer.class) + .value("var15").isOfClass(Double.class) + .value("var16").isOfClass(Integer.class) + .value("var17").isOfClass(String.class) + .value("var18").isOfClass(String.class) + .value("var19").isOfClass(String.class) + .value("var20").isOfClass(String.class) ; } @@ -564,47 +568,47 @@ public void test_ValueEquality_isEqualTo() { changes.setEndPointNow(); assertThat(table).row() - .value("var1").isEqualTo(1) - .value("var2").isEqualTo("13") - .value("var3").isEqualTo("2") - .value("var4").isEqualTo("14") - .value("var5").isEqualTo("15") - .value("var6").isEqualTo(Date.valueOf("2007-12-23")) - .value("var7").isEqualTo(3.3) - .value("var8").isEqualTo(4.4) - .value("var9").isEqualTo(5.5) - .value("var10").isEqualTo(6.6) - .value("var11").isEqualTo(20) - .value("var12").isEqualTo("8") - .value("var13").isEqualTo("16") - .value("var14").isEqualTo(9) - .value("var15").isEqualTo(10.1) - .value("var16").isEqualTo(11) - .value("var17").isEqualTo("09:01:00") - .value("var18").isEqualTo("2007-12-23 09:01:00.0") - .value("var19").isEqualTo("12") + .value("var1").isEqualTo(1) + .value("var2").isEqualTo("13") + .value("var3").isEqualTo("2") + .value("var4").isEqualTo("14") + .value("var5").isEqualTo("15") + .value("var6").isEqualTo(Date.valueOf("2007-12-23")) + .value("var7").isEqualTo(3.3) + .value("var8").isEqualTo(4.4) + .value("var9").isEqualTo(5.5) + .value("var10").isEqualTo(6.6) + .value("var11").isEqualTo(20) + .value("var12").isEqualTo("8") + .value("var13").isEqualTo("16") + .value("var14").isEqualTo(9) + .value("var15").isEqualTo(10.1) + .value("var16").isEqualTo(11) + .value("var17").isEqualTo("09:01:00") + .value("var18").isEqualTo("2007-12-23 09:01:00.0") + .value("var19").isEqualTo("12") ; assertThat(changes).change().rowAtStartPoint() - .value("var1").isEqualTo(1) - .value("var2").isEqualTo("13") - .value("var3").isEqualTo("2") - .value("var4").isEqualTo("14") - .value("var5").isEqualTo("15") - .value("var6").isEqualTo(Date.valueOf("2007-12-23")) - .value("var7").isEqualTo(3.3) - .value("var8").isEqualTo(4.4) - .value("var9").isEqualTo(5.5) - .value("var10").isEqualTo(6.6) - .value("var11").isEqualTo(7) - .value("var12").isEqualTo("8") - .value("var13").isEqualTo("16") - .value("var14").isEqualTo(9) - .value("var15").isEqualTo(10.1) - .value("var16").isEqualTo(11) - .value("var17").isEqualTo("09:01:00") - .value("var18").isEqualTo("2007-12-23 09:01:00.0") - .value("var19").isEqualTo("12") + .value("var1").isEqualTo(1) + .value("var2").isEqualTo("13") + .value("var3").isEqualTo("2") + .value("var4").isEqualTo("14") + .value("var5").isEqualTo("15") + .value("var6").isEqualTo(Date.valueOf("2007-12-23")) + .value("var7").isEqualTo(3.3) + .value("var8").isEqualTo(4.4) + .value("var9").isEqualTo(5.5) + .value("var10").isEqualTo(6.6) + .value("var11").isEqualTo(7) + .value("var12").isEqualTo("8") + .value("var13").isEqualTo("16") + .value("var14").isEqualTo(9) + .value("var15").isEqualTo(10.1) + .value("var16").isEqualTo(11) + .value("var17").isEqualTo("09:01:00") + .value("var18").isEqualTo("2007-12-23 09:01:00.0") + .value("var19").isEqualTo("12") ; } @@ -617,47 +621,47 @@ public void test_ValueNonEquality_isNotEqualTo() { changes.setEndPointNow(); assertThat(table).row() - .value("var1").isNotEqualTo(2) - .value("var2").isNotEqualTo("14") - .value("var3").isNotEqualTo("3") - .value("var4").isNotEqualTo("15") - .value("var5").isNotEqualTo("16") - .value("var6").isNotEqualTo(Date.valueOf("2008-12-23")) - .value("var7").isNotEqualTo(4.3) - .value("var8").isNotEqualTo(5.4) - .value("var9").isNotEqualTo(6.5) - .value("var10").isNotEqualTo(7.6) - .value("var11").isNotEqualTo(21) - .value("var12").isNotEqualTo("9") - .value("var13").isNotEqualTo("17") - .value("var14").isNotEqualTo(8) - .value("var15").isNotEqualTo(11.1) - .value("var16").isNotEqualTo(12) - .value("var17").isNotEqualTo("09:02:00") - .value("var18").isNotEqualTo("2007-12-24 09:01:00.0") - .value("var19").isNotEqualTo("121") + .value("var1").isNotEqualTo(2) + .value("var2").isNotEqualTo("14") + .value("var3").isNotEqualTo("3") + .value("var4").isNotEqualTo("15") + .value("var5").isNotEqualTo("16") + .value("var6").isNotEqualTo(Date.valueOf("2008-12-23")) + .value("var7").isNotEqualTo(4.3) + .value("var8").isNotEqualTo(5.4) + .value("var9").isNotEqualTo(6.5) + .value("var10").isNotEqualTo(7.6) + .value("var11").isNotEqualTo(21) + .value("var12").isNotEqualTo("9") + .value("var13").isNotEqualTo("17") + .value("var14").isNotEqualTo(8) + .value("var15").isNotEqualTo(11.1) + .value("var16").isNotEqualTo(12) + .value("var17").isNotEqualTo("09:02:00") + .value("var18").isNotEqualTo("2007-12-24 09:01:00.0") + .value("var19").isNotEqualTo("121") ; assertThat(changes).change().rowAtStartPoint() - .value("var1").isNotEqualTo(2) - .value("var2").isNotEqualTo("14") - .value("var3").isNotEqualTo("3") - .value("var4").isNotEqualTo("15") - .value("var5").isNotEqualTo("16") - .value("var6").isNotEqualTo(Date.valueOf("2008-12-23")) - .value("var7").isNotEqualTo(4.3) - .value("var8").isNotEqualTo(5.4) - .value("var9").isNotEqualTo(6.5) - .value("var10").isNotEqualTo(7.6) - .value("var11").isNotEqualTo(21) - .value("var12").isNotEqualTo("9") - .value("var13").isNotEqualTo("17") - .value("var14").isNotEqualTo(8) - .value("var15").isNotEqualTo(11.1) - .value("var16").isNotEqualTo(12) - .value("var17").isNotEqualTo("09:02:00") - .value("var18").isNotEqualTo("2007-12-24 09:01:00.0") - .value("var19").isNotEqualTo("121") + .value("var1").isNotEqualTo(2) + .value("var2").isNotEqualTo("14") + .value("var3").isNotEqualTo("3") + .value("var4").isNotEqualTo("15") + .value("var5").isNotEqualTo("16") + .value("var6").isNotEqualTo(Date.valueOf("2008-12-23")) + .value("var7").isNotEqualTo(4.3) + .value("var8").isNotEqualTo(5.4) + .value("var9").isNotEqualTo(6.5) + .value("var10").isNotEqualTo(7.6) + .value("var11").isNotEqualTo(21) + .value("var12").isNotEqualTo("9") + .value("var13").isNotEqualTo("17") + .value("var14").isNotEqualTo(8) + .value("var15").isNotEqualTo(11.1) + .value("var16").isNotEqualTo(12) + .value("var17").isNotEqualTo("09:02:00") + .value("var18").isNotEqualTo("2007-12-24 09:01:00.0") + .value("var19").isNotEqualTo("121") ; } @@ -670,49 +674,49 @@ public void test_ValueType_isOfType() { changes.setEndPointNow(); assertThat(table).row() - .value("var1").isNumber().isOfType(ValueType.NUMBER) - .value("var2").isText().isOfType(ValueType.TEXT) - .value("var3").isText().isOfType(ValueType.TEXT) - .value("var4").isText().isOfType(ValueType.TEXT) - .value("var5").isText().isOfType(ValueType.TEXT) - .value("var6").isDate().isOfType(ValueType.DATE) - .value("var7").isNumber().isOfType(ValueType.NUMBER) - .value("var8").isNumber().isOfType(ValueType.NUMBER) - .value("var9").isNumber().isOfType(ValueType.NUMBER) - .value("var10").isNumber().isOfType(ValueType.NUMBER) - .value("var11").isNumber().isOfType(ValueType.NUMBER) - .value("var12").isText().isOfType(ValueType.TEXT) - .value("var13").isText().isOfType(ValueType.TEXT) - .value("var14").isNumber().isOfType(ValueType.NUMBER) - .value("var15").isNumber().isOfType(ValueType.NUMBER) - .value("var16").isNumber().isOfType(ValueType.NUMBER) - .value("var17").isText().isOfType(ValueType.TEXT) - .value("var18").isText().isOfType(ValueType.TEXT) - .value("var19").isText().isOfType(ValueType.TEXT) - .value("var20").isText().isOfType(ValueType.TEXT) + .value("var1").isNumber().isOfType(ValueType.NUMBER) + .value("var2").isText().isOfType(ValueType.TEXT) + .value("var3").isText().isOfType(ValueType.TEXT) + .value("var4").isText().isOfType(ValueType.TEXT) + .value("var5").isText().isOfType(ValueType.TEXT) + .value("var6").isDate().isOfType(ValueType.DATE) + .value("var7").isNumber().isOfType(ValueType.NUMBER) + .value("var8").isNumber().isOfType(ValueType.NUMBER) + .value("var9").isNumber().isOfType(ValueType.NUMBER) + .value("var10").isNumber().isOfType(ValueType.NUMBER) + .value("var11").isNumber().isOfType(ValueType.NUMBER) + .value("var12").isText().isOfType(ValueType.TEXT) + .value("var13").isText().isOfType(ValueType.TEXT) + .value("var14").isNumber().isOfType(ValueType.NUMBER) + .value("var15").isNumber().isOfType(ValueType.NUMBER) + .value("var16").isNumber().isOfType(ValueType.NUMBER) + .value("var17").isText().isOfType(ValueType.TEXT) + .value("var18").isText().isOfType(ValueType.TEXT) + .value("var19").isText().isOfType(ValueType.TEXT) + .value("var20").isText().isOfType(ValueType.TEXT) ; assertThat(changes).change().rowAtStartPoint() - .value("var1").isNumber().isOfType(ValueType.NUMBER) - .value("var2").isText().isOfType(ValueType.TEXT) - .value("var3").isText().isOfType(ValueType.TEXT) - .value("var4").isText().isOfType(ValueType.TEXT) - .value("var5").isText().isOfType(ValueType.TEXT) - .value("var6").isDate().isOfType(ValueType.DATE) - .value("var7").isNumber().isOfType(ValueType.NUMBER) - .value("var8").isNumber().isOfType(ValueType.NUMBER) - .value("var9").isNumber().isOfType(ValueType.NUMBER) - .value("var10").isNumber().isOfType(ValueType.NUMBER) - .value("var11").isNumber().isOfType(ValueType.NUMBER) - .value("var12").isText().isOfType(ValueType.TEXT) - .value("var13").isText().isOfType(ValueType.TEXT) - .value("var14").isNumber().isOfType(ValueType.NUMBER) - .value("var15").isNumber().isOfType(ValueType.NUMBER) - .value("var16").isNumber().isOfType(ValueType.NUMBER) - .value("var17").isText().isOfType(ValueType.TEXT) - .value("var18").isText().isOfType(ValueType.TEXT) - .value("var19").isText().isOfType(ValueType.TEXT) - .value("var20").isText().isOfType(ValueType.TEXT) + .value("var1").isNumber().isOfType(ValueType.NUMBER) + .value("var2").isText().isOfType(ValueType.TEXT) + .value("var3").isText().isOfType(ValueType.TEXT) + .value("var4").isText().isOfType(ValueType.TEXT) + .value("var5").isText().isOfType(ValueType.TEXT) + .value("var6").isDate().isOfType(ValueType.DATE) + .value("var7").isNumber().isOfType(ValueType.NUMBER) + .value("var8").isNumber().isOfType(ValueType.NUMBER) + .value("var9").isNumber().isOfType(ValueType.NUMBER) + .value("var10").isNumber().isOfType(ValueType.NUMBER) + .value("var11").isNumber().isOfType(ValueType.NUMBER) + .value("var12").isText().isOfType(ValueType.TEXT) + .value("var13").isText().isOfType(ValueType.TEXT) + .value("var14").isNumber().isOfType(ValueType.NUMBER) + .value("var15").isNumber().isOfType(ValueType.NUMBER) + .value("var16").isNumber().isOfType(ValueType.NUMBER) + .value("var17").isText().isOfType(ValueType.TEXT) + .value("var18").isText().isOfType(ValueType.TEXT) + .value("var19").isText().isOfType(ValueType.TEXT) + .value("var20").isText().isOfType(ValueType.TEXT) ; } } diff --git a/src/test/java/org/assertj/db/navigation/InstantiationError_Test.java b/src/test/java/org/assertj/db/navigation/InstantiationError_Test.java index 0d1466f7..1f8549c4 100644 --- a/src/test/java/org/assertj/db/navigation/InstantiationError_Test.java +++ b/src/test/java/org/assertj/db/navigation/InstantiationError_Test.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.navigation; @@ -35,7 +35,6 @@ * Tests on instantiation errors. * * @author Régis Pouiller - * */ public class InstantiationError_Test extends AbstractTest { @@ -57,12 +56,12 @@ public void should_fail_because_mistake_in_instantiation_of_column() throws Exce tableAssert.column(); fail("An exception must be raised"); } catch (AssertJDBException e) { - Assertions.assertThat(e.getMessage()).isEqualTo(String.format("There is an exception 'org.assertj.db.navigation.InstantiationError_Test.(org.assertj.db.api.TableAssert, org.assertj.db.type.Column)'%n" - + "\t in the instantiation of the element org.assertj.db.navigation.InstantiationError_Test%n" - + "\t on class org.assertj.db.type.Column with class org.assertj.db.api.TableAssert.%n" - + " It is normally impossible.%n" - + " That means there is a big mistake in the development of AssertJDB.%n" - + " Please write an issue for that if you meet this problem.")); + Assertions.assertThat(e.getMessage()).isEqualTo(String.format("There is an exception 'org.assertj.db.navigation.InstantiationError_Test.(org.assertj.db.api.TableAssert,org.assertj.db.type.Column)'%n" + + "\t in the instantiation of the element org.assertj.db.navigation.InstantiationError_Test%n" + + "\t on class org.assertj.db.type.Column with class org.assertj.db.api.TableAssert.%n" + + " It is normally impossible.%n" + + " That means there is a big mistake in the development of AssertJDB.%n" + + " Please write an issue for that if you meet this problem.")); } } @@ -84,12 +83,12 @@ public void should_fail_because_mistake_in_instantiation_of_row() throws Excepti tableAssert.row(); fail("An exception must be raised"); } catch (AssertJDBException e) { - Assertions.assertThat(e.getMessage()).isEqualTo(String.format("There is an exception 'org.assertj.db.navigation.InstantiationError_Test.(org.assertj.db.api.TableAssert, org.assertj.db.type.Row)'%n" - + "\t in the instantiation of the element org.assertj.db.navigation.InstantiationError_Test%n" - + "\t on class org.assertj.db.type.Row with class org.assertj.db.api.TableAssert.%n" - + " It is normally impossible.%n" - + " That means there is a big mistake in the development of AssertJDB.%n" - + " Please write an issue for that if you meet this problem.")); + Assertions.assertThat(e.getMessage()).isEqualTo(String.format("There is an exception 'org.assertj.db.navigation.InstantiationError_Test.(org.assertj.db.api.TableAssert,org.assertj.db.type.Row)'%n" + + "\t in the instantiation of the element org.assertj.db.navigation.InstantiationError_Test%n" + + "\t on class org.assertj.db.type.Row with class org.assertj.db.api.TableAssert.%n" + + " It is normally impossible.%n" + + " That means there is a big mistake in the development of AssertJDB.%n" + + " Please write an issue for that if you meet this problem.")); } } @@ -111,12 +110,12 @@ public void should_fail_because_mistake_in_instantiation_of_value() throws Excep tableColumnAssert.value(); fail("An exception must be raised"); } catch (AssertJDBException e) { - Assertions.assertThat(e.getMessage()).isEqualTo(String.format("There is an exception 'org.assertj.db.navigation.InstantiationError_Test.(org.assertj.db.api.TableColumnAssert, org.assertj.db.type.Value)'%n" - + "\t in the instantiation of the element org.assertj.db.navigation.InstantiationError_Test%n" - + "\t on class org.assertj.db.type.Value with class org.assertj.db.api.TableColumnAssert.%n" - + " It is normally impossible.%n" - + " That means there is a big mistake in the development of AssertJDB.%n" - + " Please write an issue for that if you meet this problem.")); + Assertions.assertThat(e.getMessage()).isEqualTo(String.format("There is an exception 'org.assertj.db.navigation.InstantiationError_Test.(org.assertj.db.api.TableColumnAssert,org.assertj.db.type.Value)'%n" + + "\t in the instantiation of the element org.assertj.db.navigation.InstantiationError_Test%n" + + "\t on class org.assertj.db.type.Value with class org.assertj.db.api.TableColumnAssert.%n" + + " It is normally impossible.%n" + + " That means there is a big mistake in the development of AssertJDB.%n" + + " Please write an issue for that if you meet this problem.")); } } @@ -141,12 +140,12 @@ public void should_fail_because_mistake_in_instantiation_of_changes() throws Exc changesAssert.ofCreation(); fail("An exception must be raised"); } catch (AssertJDBException e) { - Assertions.assertThat(e.getMessage()).isEqualTo(String.format("There is an exception 'org.assertj.db.navigation.InstantiationError_Test.(org.assertj.db.api.ChangesAssert, org.assertj.db.type.Changes)'%n" - + "\t in the instantiation of the element org.assertj.db.navigation.InstantiationError_Test%n" - + "\t on class org.assertj.db.type.Changes with class org.assertj.db.api.ChangesAssert.%n" - + " It is normally impossible.%n" - + " That means there is a big mistake in the development of AssertJDB.%n" - + " Please write an issue for that if you meet this problem.")); + Assertions.assertThat(e.getMessage()).isEqualTo(String.format("There is an exception 'org.assertj.db.navigation.InstantiationError_Test.(org.assertj.db.api.ChangesAssert,org.assertj.db.type.Changes)'%n" + + "\t in the instantiation of the element org.assertj.db.navigation.InstantiationError_Test%n" + + "\t on class org.assertj.db.type.Changes with class org.assertj.db.api.ChangesAssert.%n" + + " It is normally impossible.%n" + + " That means there is a big mistake in the development of AssertJDB.%n" + + " Please write an issue for that if you meet this problem.")); } } @@ -171,12 +170,12 @@ public void should_fail_because_mistake_in_instantiation_of_change() throws Exce changesAssert.change(1); fail("An exception must be raised"); } catch (AssertJDBException e) { - Assertions.assertThat(e.getMessage()).isEqualTo(String.format("There is an exception 'org.assertj.db.navigation.InstantiationError_Test.(org.assertj.db.api.ChangesAssert, org.assertj.db.type.Change)'%n" - + "\t in the instantiation of the element org.assertj.db.navigation.InstantiationError_Test%n" - + "\t on class org.assertj.db.type.Change with class org.assertj.db.api.ChangesAssert.%n" - + " It is normally impossible.%n" - + " That means there is a big mistake in the development of AssertJDB.%n" - + " Please write an issue for that if you meet this problem.")); + Assertions.assertThat(e.getMessage()).isEqualTo(String.format("There is an exception 'org.assertj.db.navigation.InstantiationError_Test.(org.assertj.db.api.ChangesAssert,org.assertj.db.type.Change)'%n" + + "\t in the instantiation of the element org.assertj.db.navigation.InstantiationError_Test%n" + + "\t on class org.assertj.db.type.Change with class org.assertj.db.api.ChangesAssert.%n" + + " It is normally impossible.%n" + + " That means there is a big mistake in the development of AssertJDB.%n" + + " Please write an issue for that if you meet this problem.")); } } @@ -201,12 +200,12 @@ public void should_fail_because_mistake_in_instantiation_of_columnchange() throw changeAssert.column(1); fail("An exception must be raised"); } catch (AssertJDBException e) { - Assertions.assertThat(e.getMessage()).isEqualTo(String.format("There is an exception 'org.assertj.db.navigation.InstantiationError_Test.(org.assertj.db.api.ChangeAssert, java.lang.String, org.assertj.db.type.Value, org.assertj.db.type.Value)'%n" - + "\t in the instantiation of the element org.assertj.db.navigation.InstantiationError_Test%n" - + "\t with class org.assertj.db.api.ChangeAssert.%n" - + " It is normally impossible.%n" - + " That means there is a big mistake in the development of AssertJDB.%n" - + " Please write an issue for that if you meet this problem.")); + Assertions.assertThat(e.getMessage()).isEqualTo(String.format("There is an exception 'org.assertj.db.navigation.InstantiationError_Test.(org.assertj.db.api.ChangeAssert,java.lang.String,org.assertj.db.type.Value,org.assertj.db.type.Value)'%n" + + "\t in the instantiation of the element org.assertj.db.navigation.InstantiationError_Test%n" + + "\t with class org.assertj.db.api.ChangeAssert.%n" + + " It is normally impossible.%n" + + " That means there is a big mistake in the development of AssertJDB.%n" + + " Please write an issue for that if you meet this problem.")); } } @@ -231,12 +230,12 @@ public void should_fail_because_mistake_in_instantiation_of_rowAtStartPoint() th changeAssert.rowAtStartPoint(); fail("An exception must be raised"); } catch (AssertJDBException e) { - Assertions.assertThat(e.getMessage()).isEqualTo(String.format("There is an exception 'org.assertj.db.navigation.InstantiationError_Test.(org.assertj.db.api.ChangeAssert, org.assertj.db.type.Row)'%n" - + "\t in the instantiation of the element org.assertj.db.navigation.InstantiationError_Test%n" - + "\t on class org.assertj.db.type.Row with class org.assertj.db.api.ChangeAssert.%n" - + " It is normally impossible.%n" - + " That means there is a big mistake in the development of AssertJDB.%n" - + " Please write an issue for that if you meet this problem.")); + Assertions.assertThat(e.getMessage()).isEqualTo(String.format("There is an exception 'org.assertj.db.navigation.InstantiationError_Test.(org.assertj.db.api.ChangeAssert,org.assertj.db.type.Row)'%n" + + "\t in the instantiation of the element org.assertj.db.navigation.InstantiationError_Test%n" + + "\t on class org.assertj.db.type.Row with class org.assertj.db.api.ChangeAssert.%n" + + " It is normally impossible.%n" + + " That means there is a big mistake in the development of AssertJDB.%n" + + " Please write an issue for that if you meet this problem.")); } } } diff --git a/src/test/java/org/assertj/db/navigation/ReturnToOrigin_Test.java b/src/test/java/org/assertj/db/navigation/ReturnToOrigin_Test.java index 57fbcc1d..863d1bb6 100644 --- a/src/test/java/org/assertj/db/navigation/ReturnToOrigin_Test.java +++ b/src/test/java/org/assertj/db/navigation/ReturnToOrigin_Test.java @@ -8,28 +8,58 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.navigation; +import static org.assertj.db.api.Assertions.assertThat; +import static org.assertj.db.output.Outputs.output; + import org.assertj.core.api.Assertions; -import org.assertj.db.api.*; +import org.assertj.db.api.ChangeAssert; +import org.assertj.db.api.ChangeColumnAssert; +import org.assertj.db.api.ChangeColumnValueAssert; +import org.assertj.db.api.ChangeRowAssert; +import org.assertj.db.api.ChangeRowValueAssert; +import org.assertj.db.api.ChangesAssert; +import org.assertj.db.api.RequestAssert; +import org.assertj.db.api.RequestColumnAssert; +import org.assertj.db.api.RequestColumnValueAssert; +import org.assertj.db.api.RequestRowAssert; +import org.assertj.db.api.RequestRowValueAssert; +import org.assertj.db.api.TableAssert; +import org.assertj.db.api.TableColumnAssert; +import org.assertj.db.api.TableColumnValueAssert; +import org.assertj.db.api.TableRowAssert; +import org.assertj.db.api.TableRowValueAssert; import org.assertj.db.common.AbstractTest; import org.assertj.db.common.NeedReload; -import org.assertj.db.output.*; +import org.assertj.db.output.ChangeColumnOutputter; +import org.assertj.db.output.ChangeColumnValueOutputter; +import org.assertj.db.output.ChangeOutputter; +import org.assertj.db.output.ChangeRowOutputter; +import org.assertj.db.output.ChangeRowValueOutputter; +import org.assertj.db.output.ChangesOutputter; +import org.assertj.db.output.Outputs; +import org.assertj.db.output.RequestColumnOutputter; +import org.assertj.db.output.RequestColumnValueOutputter; +import org.assertj.db.output.RequestOutputter; +import org.assertj.db.output.RequestRowOutputter; +import org.assertj.db.output.RequestRowValueOutputter; +import org.assertj.db.output.TableColumnOutputter; +import org.assertj.db.output.TableColumnValueOutputter; +import org.assertj.db.output.TableOutputter; +import org.assertj.db.output.TableRowOutputter; +import org.assertj.db.output.TableRowValueOutputter; import org.assertj.db.type.Changes; import org.assertj.db.type.Request; import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.db.api.Assertions.assertThat; -import static org.assertj.db.output.Outputs.output; - /** * Tests on the different methods linked on the {@code returnToOrigin()} method. * * @author Régis Pouiller - * */ public class ReturnToOrigin_Test extends AbstractTest { diff --git a/src/test/java/org/assertj/db/navigation/ToChange_ChangeOfCreationOnTable_Integer_Test.java b/src/test/java/org/assertj/db/navigation/ToChange_ChangeOfCreationOnTable_Integer_Test.java index 76e58b42..ed389516 100644 --- a/src/test/java/org/assertj/db/navigation/ToChange_ChangeOfCreationOnTable_Integer_Test.java +++ b/src/test/java/org/assertj/db/navigation/ToChange_ChangeOfCreationOnTable_Integer_Test.java @@ -8,10 +8,19 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.navigation; +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.db.api.Assertions.assertThat; +import static org.assertj.db.output.Outputs.output; +import static org.junit.Assert.fail; + +import java.lang.reflect.Field; +import java.util.List; +import java.util.Map; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeAssert; import org.assertj.db.api.ChangesAssert; @@ -24,21 +33,11 @@ import org.assertj.db.type.Changes; import org.junit.Test; -import java.lang.reflect.Field; -import java.util.List; -import java.util.Map; - -import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.db.api.Assertions.assertThat; -import static org.assertj.db.output.Outputs.output; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.navigation.ToChange} class : * {@link org.assertj.db.navigation.ToChange#changeOfCreationOnTable(String, int)} method. * * @author Régis Pouiller - * */ public class ToChange_ChangeOfCreationOnTable_Integer_Test extends AbstractTest { @@ -62,9 +61,9 @@ public void test_change_of_creation_on_table_with_index_with_assertions() throws fieldChange.setAccessible(true); ChangesAssert changesAssert = assertThat(changes); - PositionWithChanges position = - (PositionWithChanges) fieldPosition.get(changesAssert); - Map> map = (Map>)fieldIndex.get(position); + PositionWithChanges position = + (PositionWithChanges) fieldPosition.get(changesAssert); + Map> map = (Map>) fieldIndex.get(position); assertThat(map).hasSize(0); assertThat(map.get(null)).isNull(); ChangeAssert changeAssert0 = changesAssert.changeOfCreationOnTable("actor", 0); @@ -98,9 +97,9 @@ public void test_change_of_creation_on_table_with_index_with_assertions() throws assertThat(changeAssert0).isSameAs(changeAssertAgain0); ChangesAssert changesAssertBis = assertThat(changes); - PositionWithChanges positionBis = - (PositionWithChanges) fieldPosition.get(changesAssertBis); - map = (Map>)fieldIndex.get(positionBis); + PositionWithChanges positionBis = + (PositionWithChanges) fieldPosition.get(changesAssertBis); + map = (Map>) fieldIndex.get(positionBis); assertThat(map).hasSize(0); assertThat(map.get(null)).isNull(); ChangeAssert changeAssertBis0 = changesAssertBis.changeOfCreationOnTable("actor", 0); @@ -159,9 +158,9 @@ public void test_change_of_creation_on_table_with_index_with_displays() throws E fieldChange.setAccessible(true); ChangesOutputter changesOutputter = output(changes); - PositionWithChanges position = - (PositionWithChanges) fieldPosition.get(changesOutputter); - Map> map = (Map>)fieldIndex.get(position); + PositionWithChanges position = + (PositionWithChanges) fieldPosition.get(changesOutputter); + Map> map = (Map>) fieldIndex.get(position); assertThat(map).hasSize(0); assertThat(map.get(null)).isNull(); ChangeOutputter changeOutputter0 = changesOutputter.changeOfCreationOnTable("actor", 0); @@ -195,9 +194,9 @@ public void test_change_of_creation_on_table_with_index_with_displays() throws E assertThat(changeOutputter0).isSameAs(changeOutputterAgain0); ChangesOutputter changesOutputterBis = output(changes); - PositionWithChanges positionBis = - (PositionWithChanges) fieldPosition.get(changesOutputterBis); - map = (Map>)fieldIndex.get(positionBis); + PositionWithChanges positionBis = + (PositionWithChanges) fieldPosition.get(changesOutputterBis); + map = (Map>) fieldIndex.get(positionBis); assertThat(map).hasSize(0); assertThat(map.get(null)).isNull(); ChangeOutputter changeOutputterBis0 = changesOutputterBis.changeOfCreationOnTable("actor", 0); diff --git a/src/test/java/org/assertj/db/navigation/ToChange_ChangeOfCreationOnTable_Test.java b/src/test/java/org/assertj/db/navigation/ToChange_ChangeOfCreationOnTable_Test.java index 134b98bb..16fbe055 100644 --- a/src/test/java/org/assertj/db/navigation/ToChange_ChangeOfCreationOnTable_Test.java +++ b/src/test/java/org/assertj/db/navigation/ToChange_ChangeOfCreationOnTable_Test.java @@ -8,10 +8,19 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.navigation; +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.db.api.Assertions.assertThat; +import static org.assertj.db.output.Outputs.output; +import static org.junit.Assert.fail; + +import java.lang.reflect.Field; +import java.util.List; +import java.util.Map; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeAssert; import org.assertj.db.api.ChangesAssert; @@ -24,21 +33,11 @@ import org.assertj.db.type.Changes; import org.junit.Test; -import java.lang.reflect.Field; -import java.util.List; -import java.util.Map; - -import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.db.api.Assertions.assertThat; -import static org.assertj.db.output.Outputs.output; -import static org.junit.Assert.fail; - /** * Tests on {@link ToChange} class : * {@link ToChange#changeOfCreationOnTable(String)} method. * * @author Régis Pouiller - * */ public class ToChange_ChangeOfCreationOnTable_Test extends AbstractTest { @@ -62,9 +61,9 @@ public void test_change_of_creation_on_table_with_assertions() throws Exception fieldChange.setAccessible(true); ChangesAssert changesAssert = assertThat(changes); - PositionWithChanges position = - (PositionWithChanges) fieldPosition.get(changesAssert); - Map> map = (Map>)fieldIndex.get(position); + PositionWithChanges position = + (PositionWithChanges) fieldPosition.get(changesAssert); + Map> map = (Map>) fieldIndex.get(position); assertThat(map).hasSize(0); assertThat(map.get(null)).isNull(); ChangeAssert changeAssert0 = changesAssert.changeOfCreationOnTable("actor"); @@ -90,9 +89,9 @@ public void test_change_of_creation_on_table_with_assertions() throws Exception } ChangesAssert changesAssertBis = assertThat(changes); - PositionWithChanges positionBis = - (PositionWithChanges) fieldPosition.get(changesAssertBis); - map = (Map>)fieldIndex.get(positionBis); + PositionWithChanges positionBis = + (PositionWithChanges) fieldPosition.get(changesAssertBis); + map = (Map>) fieldIndex.get(positionBis); assertThat(map).hasSize(0); assertThat(map.get(null)).isNull(); ChangeAssert changeAssertBis0 = changesAssertBis.changeOfCreationOnTable("actor"); @@ -143,9 +142,9 @@ public void test_change_of_creation_on_table_with_displays() throws Exception { fieldChange.setAccessible(true); ChangesOutputter changesDisplay = output(changes); - PositionWithChanges position = - (PositionWithChanges) fieldPosition.get(changesDisplay); - Map> map = (Map>)fieldIndex.get(position); + PositionWithChanges position = + (PositionWithChanges) fieldPosition.get(changesDisplay); + Map> map = (Map>) fieldIndex.get(position); assertThat(map).hasSize(0); assertThat(map.get(null)).isNull(); ChangeOutputter changeDisplay0 = changesDisplay.changeOfCreationOnTable("actor"); @@ -171,9 +170,9 @@ public void test_change_of_creation_on_table_with_displays() throws Exception { } ChangesOutputter changesDisplayBis = output(changes); - PositionWithChanges positionBis = - (PositionWithChanges) fieldPosition.get(changesDisplayBis); - map = (Map>)fieldIndex.get(positionBis); + PositionWithChanges positionBis = + (PositionWithChanges) fieldPosition.get(changesDisplayBis); + map = (Map>) fieldIndex.get(positionBis); assertThat(map).hasSize(0); assertThat(map.get(null)).isNull(); ChangeOutputter changeDisplayBis0 = changesDisplayBis.changeOfCreationOnTable("actor"); diff --git a/src/test/java/org/assertj/db/navigation/ToChange_ChangeOfCreation_Integer_Test.java b/src/test/java/org/assertj/db/navigation/ToChange_ChangeOfCreation_Integer_Test.java index 4c92c3fa..b0bf5fd0 100644 --- a/src/test/java/org/assertj/db/navigation/ToChange_ChangeOfCreation_Integer_Test.java +++ b/src/test/java/org/assertj/db/navigation/ToChange_ChangeOfCreation_Integer_Test.java @@ -8,10 +8,19 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.navigation; +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.db.api.Assertions.assertThat; +import static org.assertj.db.output.Outputs.output; +import static org.junit.Assert.fail; + +import java.lang.reflect.Field; +import java.util.List; +import java.util.Map; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeAssert; import org.assertj.db.api.ChangesAssert; @@ -24,21 +33,11 @@ import org.assertj.db.type.Changes; import org.junit.Test; -import java.lang.reflect.Field; -import java.util.List; -import java.util.Map; - -import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.db.api.Assertions.assertThat; -import static org.assertj.db.output.Outputs.output; -import static org.junit.Assert.fail; - /** * Tests on {@link ToChange} class : * {@link ToChange#changeOfCreation(int)} method. * * @author Régis Pouiller - * */ public class ToChange_ChangeOfCreation_Integer_Test extends AbstractTest { @@ -62,9 +61,9 @@ public void test_change_of_creation_with_index_with_assertions() throws Exceptio fieldChange.setAccessible(true); ChangesAssert changesAssert = assertThat(changes); - PositionWithChanges position = - (PositionWithChanges) fieldPosition.get(changesAssert); - Map> map = (Map>)fieldIndex.get(position); + PositionWithChanges position = + (PositionWithChanges) fieldPosition.get(changesAssert); + Map> map = (Map>) fieldIndex.get(position); assertThat(map).hasSize(0); assertThat(map.get(null)).isNull(); ChangeAssert changeAssert0 = changesAssert.changeOfCreation(0); @@ -98,9 +97,9 @@ public void test_change_of_creation_with_index_with_assertions() throws Exceptio assertThat(changeAssert0).isSameAs(changeAssertAgain0); ChangesAssert changesAssertBis = assertThat(changes); - PositionWithChanges positionBis = - (PositionWithChanges) fieldPosition.get(changesAssertBis); - map = (Map>)fieldIndex.get(positionBis); + PositionWithChanges positionBis = + (PositionWithChanges) fieldPosition.get(changesAssertBis); + map = (Map>) fieldIndex.get(positionBis); assertThat(map).hasSize(0); assertThat(map.get(null)).isNull(); ChangeAssert changeAssertBis0 = changesAssertBis.changeOfCreation(0); @@ -159,9 +158,9 @@ public void test_change_of_creation_with_index_with_displays() throws Exception fieldChange.setAccessible(true); ChangesOutputter changesDisplay = output(changes); - PositionWithChanges position = - (PositionWithChanges) fieldPosition.get(changesDisplay); - Map> map = (Map>)fieldIndex.get(position); + PositionWithChanges position = + (PositionWithChanges) fieldPosition.get(changesDisplay); + Map> map = (Map>) fieldIndex.get(position); assertThat(map).hasSize(0); assertThat(map.get(null)).isNull(); ChangeOutputter changeDisplay0 = changesDisplay.changeOfCreation(0); @@ -195,9 +194,9 @@ public void test_change_of_creation_with_index_with_displays() throws Exception assertThat(changeDisplay0).isSameAs(changeDisplayAgain0); ChangesOutputter changesDisplayBis = output(changes); - PositionWithChanges positionBis = - (PositionWithChanges) fieldPosition.get(changesDisplayBis); - map = (Map>)fieldIndex.get(positionBis); + PositionWithChanges positionBis = + (PositionWithChanges) fieldPosition.get(changesDisplayBis); + map = (Map>) fieldIndex.get(positionBis); assertThat(map).hasSize(0); assertThat(map.get(null)).isNull(); ChangeOutputter changeDisplayBis0 = changesDisplayBis.changeOfCreation(0); diff --git a/src/test/java/org/assertj/db/navigation/ToChange_ChangeOfCreation_Test.java b/src/test/java/org/assertj/db/navigation/ToChange_ChangeOfCreation_Test.java index 756ab0bf..536ecbe5 100644 --- a/src/test/java/org/assertj/db/navigation/ToChange_ChangeOfCreation_Test.java +++ b/src/test/java/org/assertj/db/navigation/ToChange_ChangeOfCreation_Test.java @@ -8,10 +8,19 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.navigation; +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.db.api.Assertions.assertThat; +import static org.assertj.db.output.Outputs.output; +import static org.junit.Assert.fail; + +import java.lang.reflect.Field; +import java.util.List; +import java.util.Map; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeAssert; import org.assertj.db.api.ChangesAssert; @@ -24,21 +33,11 @@ import org.assertj.db.type.Changes; import org.junit.Test; -import java.lang.reflect.Field; -import java.util.List; -import java.util.Map; - -import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.db.api.Assertions.assertThat; -import static org.assertj.db.output.Outputs.output; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.navigation.ToChange} class : * {@link org.assertj.db.navigation.ToChange#changeOfCreation()} method. * * @author Régis Pouiller - * */ public class ToChange_ChangeOfCreation_Test extends AbstractTest { @@ -62,9 +61,9 @@ public void test_change_of_creation_with_assertions() throws Exception { fieldChange.setAccessible(true); ChangesAssert changesAssert = assertThat(changes); - PositionWithChanges position = - (PositionWithChanges) fieldPosition.get(changesAssert); - Map> map = (Map>)fieldIndex.get(position); + PositionWithChanges position = + (PositionWithChanges) fieldPosition.get(changesAssert); + Map> map = (Map>) fieldIndex.get(position); assertThat(map).hasSize(0); assertThat(map.get(null)).isNull(); ChangeAssert changeAssert0 = changesAssert.changeOfCreation(); @@ -90,9 +89,9 @@ public void test_change_of_creation_with_assertions() throws Exception { } ChangesAssert changesAssertBis = assertThat(changes); - PositionWithChanges positionBis = - (PositionWithChanges) fieldPosition.get(changesAssertBis); - map = (Map>)fieldIndex.get(positionBis); + PositionWithChanges positionBis = + (PositionWithChanges) fieldPosition.get(changesAssertBis); + map = (Map>) fieldIndex.get(positionBis); assertThat(map).hasSize(0); assertThat(map.get(null)).isNull(); ChangeAssert changeAssertBis0 = changesAssertBis.changeOfCreation(); @@ -143,9 +142,9 @@ public void test_change_of_creation_with_displays() throws Exception { fieldChange.setAccessible(true); ChangesOutputter changesDisplay = output(changes); - PositionWithChanges position = - (PositionWithChanges) fieldPosition.get(changesDisplay); - Map> map = (Map>)fieldIndex.get(position); + PositionWithChanges position = + (PositionWithChanges) fieldPosition.get(changesDisplay); + Map> map = (Map>) fieldIndex.get(position); assertThat(map).hasSize(0); assertThat(map.get(null)).isNull(); ChangeOutputter changeDisplay0 = changesDisplay.changeOfCreation(); @@ -171,9 +170,9 @@ public void test_change_of_creation_with_displays() throws Exception { } ChangesOutputter changesDisplayBis = output(changes); - PositionWithChanges positionBis = - (PositionWithChanges) fieldPosition.get(changesDisplayBis); - map = (Map>)fieldIndex.get(positionBis); + PositionWithChanges positionBis = + (PositionWithChanges) fieldPosition.get(changesDisplayBis); + map = (Map>) fieldIndex.get(positionBis); assertThat(map).hasSize(0); assertThat(map.get(null)).isNull(); ChangeOutputter changeDisplayBis0 = changesDisplayBis.changeOfCreation(); diff --git a/src/test/java/org/assertj/db/navigation/ToChange_ChangeOfDeletionOnTable_Integer_Test.java b/src/test/java/org/assertj/db/navigation/ToChange_ChangeOfDeletionOnTable_Integer_Test.java index 3b2fbd11..ba86c2ec 100644 --- a/src/test/java/org/assertj/db/navigation/ToChange_ChangeOfDeletionOnTable_Integer_Test.java +++ b/src/test/java/org/assertj/db/navigation/ToChange_ChangeOfDeletionOnTable_Integer_Test.java @@ -8,10 +8,19 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.navigation; +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.db.api.Assertions.assertThat; +import static org.assertj.db.output.Outputs.output; +import static org.junit.Assert.fail; + +import java.lang.reflect.Field; +import java.util.List; +import java.util.Map; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeAssert; import org.assertj.db.api.ChangesAssert; @@ -24,21 +33,11 @@ import org.assertj.db.type.Changes; import org.junit.Test; -import java.lang.reflect.Field; -import java.util.List; -import java.util.Map; - -import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.db.api.Assertions.assertThat; -import static org.assertj.db.output.Outputs.output; -import static org.junit.Assert.fail; - /** * Tests on {@link ToChange} class : * {@link ToChange#changeOfDeletionOnTable(String, int)} method. * * @author Régis Pouiller - * */ public class ToChange_ChangeOfDeletionOnTable_Integer_Test extends AbstractTest { @@ -62,9 +61,9 @@ public void test_change_of_deletion_on_table_with_index_with_assertions() throws fieldChange.setAccessible(true); ChangesAssert changesAssert = assertThat(changes); - PositionWithChanges position = - (PositionWithChanges) fieldPosition.get(changesAssert); - Map> map = (Map>)fieldIndex.get(position); + PositionWithChanges position = + (PositionWithChanges) fieldPosition.get(changesAssert); + Map> map = (Map>) fieldIndex.get(position); assertThat(map).hasSize(0); assertThat(map.get(null)).isNull(); ChangeAssert changeAssert0 = changesAssert.changeOfDeletionOnTable("actor", 0); @@ -93,9 +92,9 @@ public void test_change_of_deletion_on_table_with_index_with_assertions() throws assertThat(changeAssert0).isSameAs(changeAssertAgain0); ChangesAssert changesAssertBis = assertThat(changes); - PositionWithChanges positionBis = - (PositionWithChanges) fieldPosition.get(changesAssertBis); - map = (Map>)fieldIndex.get(positionBis); + PositionWithChanges positionBis = + (PositionWithChanges) fieldPosition.get(changesAssertBis); + map = (Map>) fieldIndex.get(positionBis); assertThat(map).hasSize(0); assertThat(map.get(null)).isNull(); ChangeAssert changeAssertBis0 = changesAssertBis.changeOfDeletionOnTable("actor", 0); @@ -148,9 +147,9 @@ public void test_change_of_deletion_on_table_with_index_with_displays() throws E fieldChange.setAccessible(true); ChangesOutputter changesDisplay = output(changes); - PositionWithChanges position = - (PositionWithChanges) fieldPosition.get(changesDisplay); - Map> map = (Map>)fieldIndex.get(position); + PositionWithChanges position = + (PositionWithChanges) fieldPosition.get(changesDisplay); + Map> map = (Map>) fieldIndex.get(position); assertThat(map).hasSize(0); assertThat(map.get(null)).isNull(); ChangeOutputter changeDisplay0 = changesDisplay.changeOfDeletionOnTable("actor", 0); @@ -179,9 +178,9 @@ public void test_change_of_deletion_on_table_with_index_with_displays() throws E assertThat(changeDisplay0).isSameAs(changeDisplayAgain0); ChangesOutputter changesDisplayBis = output(changes); - PositionWithChanges positionBis = - (PositionWithChanges) fieldPosition.get(changesDisplayBis); - map = (Map>)fieldIndex.get(positionBis); + PositionWithChanges positionBis = + (PositionWithChanges) fieldPosition.get(changesDisplayBis); + map = (Map>) fieldIndex.get(positionBis); assertThat(map).hasSize(0); assertThat(map.get(null)).isNull(); ChangeOutputter changeDisplayBis0 = changesDisplayBis.changeOfDeletionOnTable("actor", 0); diff --git a/src/test/java/org/assertj/db/navigation/ToChange_ChangeOfDeletionOnTable_Test.java b/src/test/java/org/assertj/db/navigation/ToChange_ChangeOfDeletionOnTable_Test.java index 940eae68..ef8f07d2 100644 --- a/src/test/java/org/assertj/db/navigation/ToChange_ChangeOfDeletionOnTable_Test.java +++ b/src/test/java/org/assertj/db/navigation/ToChange_ChangeOfDeletionOnTable_Test.java @@ -8,10 +8,19 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.navigation; +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.db.api.Assertions.assertThat; +import static org.assertj.db.output.Outputs.output; +import static org.junit.Assert.fail; + +import java.lang.reflect.Field; +import java.util.List; +import java.util.Map; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeAssert; import org.assertj.db.api.ChangesAssert; @@ -24,21 +33,11 @@ import org.assertj.db.type.Changes; import org.junit.Test; -import java.lang.reflect.Field; -import java.util.List; -import java.util.Map; - -import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.db.api.Assertions.assertThat; -import static org.assertj.db.output.Outputs.output; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.navigation.ToChange} class : * {@link org.assertj.db.navigation.ToChange#changeOfDeletionOnTable(String)} method. * * @author Régis Pouiller - * */ public class ToChange_ChangeOfDeletionOnTable_Test extends AbstractTest { @@ -62,9 +61,9 @@ public void test_change_of_deletion_on_table_with_assertions() throws Exception fieldChange.setAccessible(true); ChangesAssert changesAssert = assertThat(changes); - PositionWithChanges position = - (PositionWithChanges) fieldPosition.get(changesAssert); - Map> map = (Map>)fieldIndex.get(position); + PositionWithChanges position = + (PositionWithChanges) fieldPosition.get(changesAssert); + Map> map = (Map>) fieldIndex.get(position); assertThat(map).hasSize(0); assertThat(map.get(null)).isNull(); ChangeAssert changeAssert0 = changesAssert.changeOfDeletionOnTable("actor"); @@ -85,9 +84,9 @@ public void test_change_of_deletion_on_table_with_assertions() throws Exception } ChangesAssert changesAssertBis = assertThat(changes); - PositionWithChanges positionBis = - (PositionWithChanges) fieldPosition.get(changesAssertBis); - map = (Map>)fieldIndex.get(positionBis); + PositionWithChanges positionBis = + (PositionWithChanges) fieldPosition.get(changesAssertBis); + map = (Map>) fieldIndex.get(positionBis); assertThat(map).hasSize(0); assertThat(map.get(null)).isNull(); ChangeAssert changeAssertBis0 = changesAssertBis.changeOfDeletionOnTable("actor"); @@ -132,9 +131,9 @@ public void test_change_of_deletion_on_table_with_displays() throws Exception { fieldChange.setAccessible(true); ChangesOutputter changesDisplay = output(changes); - PositionWithChanges position = - (PositionWithChanges) fieldPosition.get(changesDisplay); - Map> map = (Map>)fieldIndex.get(position); + PositionWithChanges position = + (PositionWithChanges) fieldPosition.get(changesDisplay); + Map> map = (Map>) fieldIndex.get(position); assertThat(map).hasSize(0); assertThat(map.get(null)).isNull(); ChangeOutputter changeDisplay0 = changesDisplay.changeOfDeletionOnTable("actor"); @@ -155,9 +154,9 @@ public void test_change_of_deletion_on_table_with_displays() throws Exception { } ChangesOutputter changesDisplayBis = output(changes); - PositionWithChanges positionBis = - (PositionWithChanges) fieldPosition.get(changesDisplayBis); - map = (Map>)fieldIndex.get(positionBis); + PositionWithChanges positionBis = + (PositionWithChanges) fieldPosition.get(changesDisplayBis); + map = (Map>) fieldIndex.get(positionBis); assertThat(map).hasSize(0); assertThat(map.get(null)).isNull(); ChangeOutputter changeDisplayBis0 = changesDisplayBis.changeOfDeletionOnTable("actor"); diff --git a/src/test/java/org/assertj/db/navigation/ToChange_ChangeOfDeletion_Integer_Test.java b/src/test/java/org/assertj/db/navigation/ToChange_ChangeOfDeletion_Integer_Test.java index 4d92a6b9..4472e644 100644 --- a/src/test/java/org/assertj/db/navigation/ToChange_ChangeOfDeletion_Integer_Test.java +++ b/src/test/java/org/assertj/db/navigation/ToChange_ChangeOfDeletion_Integer_Test.java @@ -8,10 +8,19 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.navigation; +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.db.api.Assertions.assertThat; +import static org.assertj.db.output.Outputs.output; +import static org.junit.Assert.fail; + +import java.lang.reflect.Field; +import java.util.List; +import java.util.Map; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeAssert; import org.assertj.db.api.ChangesAssert; @@ -24,21 +33,11 @@ import org.assertj.db.type.Changes; import org.junit.Test; -import java.lang.reflect.Field; -import java.util.List; -import java.util.Map; - -import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.db.api.Assertions.assertThat; -import static org.assertj.db.output.Outputs.output; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.navigation.ToChange} class : * {@link org.assertj.db.navigation.ToChange#changeOfDeletion(int)} method. * * @author Régis Pouiller - * */ public class ToChange_ChangeOfDeletion_Integer_Test extends AbstractTest { @@ -62,9 +61,9 @@ public void test_change_of_deletion_with_index_with_assertions() throws Exceptio fieldChange.setAccessible(true); ChangesAssert changesAssert = assertThat(changes); - PositionWithChanges position = - (PositionWithChanges) fieldPosition.get(changesAssert); - Map> map = (Map>)fieldIndex.get(position); + PositionWithChanges position = + (PositionWithChanges) fieldPosition.get(changesAssert); + Map> map = (Map>) fieldIndex.get(position); assertThat(map).hasSize(0); assertThat(map.get(null)).isNull(); ChangeAssert changeAssert0 = changesAssert.changeOfDeletion(0); @@ -93,9 +92,9 @@ public void test_change_of_deletion_with_index_with_assertions() throws Exceptio assertThat(changeAssert0).isSameAs(changeAssertAgain0); ChangesAssert changesAssertBis = assertThat(changes); - PositionWithChanges positionBis = - (PositionWithChanges) fieldPosition.get(changesAssertBis); - map = (Map>)fieldIndex.get(positionBis); + PositionWithChanges positionBis = + (PositionWithChanges) fieldPosition.get(changesAssertBis); + map = (Map>) fieldIndex.get(positionBis); assertThat(map).hasSize(0); assertThat(map.get(null)).isNull(); ChangeAssert changeAssertBis0 = changesAssertBis.changeOfDeletion(0); @@ -148,9 +147,9 @@ public void test_change_of_deletion_with_index_with_displays() throws Exception fieldChange.setAccessible(true); ChangesOutputter changesOutputter = output(changes); - PositionWithChanges position = - (PositionWithChanges) fieldPosition.get(changesOutputter); - Map> map = (Map>)fieldIndex.get(position); + PositionWithChanges position = + (PositionWithChanges) fieldPosition.get(changesOutputter); + Map> map = (Map>) fieldIndex.get(position); assertThat(map).hasSize(0); assertThat(map.get(null)).isNull(); ChangeOutputter changeOutputter0 = changesOutputter.changeOfDeletion(0); @@ -179,9 +178,9 @@ public void test_change_of_deletion_with_index_with_displays() throws Exception assertThat(changeOutputter0).isSameAs(changeOutputterAgain0); ChangesOutputter changesOutputterBis = output(changes); - PositionWithChanges positionBis = - (PositionWithChanges) fieldPosition.get(changesOutputterBis); - map = (Map>)fieldIndex.get(positionBis); + PositionWithChanges positionBis = + (PositionWithChanges) fieldPosition.get(changesOutputterBis); + map = (Map>) fieldIndex.get(positionBis); assertThat(map).hasSize(0); assertThat(map.get(null)).isNull(); ChangeOutputter changeOutputterBis0 = changesOutputterBis.changeOfDeletion(0); diff --git a/src/test/java/org/assertj/db/navigation/ToChange_ChangeOfDeletion_Test.java b/src/test/java/org/assertj/db/navigation/ToChange_ChangeOfDeletion_Test.java index d6d913f3..24e785a1 100644 --- a/src/test/java/org/assertj/db/navigation/ToChange_ChangeOfDeletion_Test.java +++ b/src/test/java/org/assertj/db/navigation/ToChange_ChangeOfDeletion_Test.java @@ -8,10 +8,19 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.navigation; +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.db.api.Assertions.assertThat; +import static org.assertj.db.output.Outputs.output; +import static org.junit.Assert.fail; + +import java.lang.reflect.Field; +import java.util.List; +import java.util.Map; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeAssert; import org.assertj.db.api.ChangesAssert; @@ -24,21 +33,11 @@ import org.assertj.db.type.Changes; import org.junit.Test; -import java.lang.reflect.Field; -import java.util.List; -import java.util.Map; - -import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.db.api.Assertions.assertThat; -import static org.assertj.db.output.Outputs.output; -import static org.junit.Assert.fail; - /** * Tests on {@link ToChange} class : * {@link ToChange#changeOfDeletion()} method. * * @author Régis Pouiller - * */ public class ToChange_ChangeOfDeletion_Test extends AbstractTest { @@ -62,9 +61,9 @@ public void test_change_of_deletion_with_assertions() throws Exception { fieldChange.setAccessible(true); ChangesAssert changesAssert = assertThat(changes); - PositionWithChanges position = - (PositionWithChanges) fieldPosition.get(changesAssert); - Map> map = (Map>)fieldIndex.get(position); + PositionWithChanges position = + (PositionWithChanges) fieldPosition.get(changesAssert); + Map> map = (Map>) fieldIndex.get(position); assertThat(map).hasSize(0); assertThat(map.get(null)).isNull(); ChangeAssert changeAssert0 = changesAssert.changeOfDeletion(); @@ -85,9 +84,9 @@ public void test_change_of_deletion_with_assertions() throws Exception { } ChangesAssert changesAssertBis = assertThat(changes); - PositionWithChanges positionBis = - (PositionWithChanges) fieldPosition.get(changesAssertBis); - map = (Map>)fieldIndex.get(positionBis); + PositionWithChanges positionBis = + (PositionWithChanges) fieldPosition.get(changesAssertBis); + map = (Map>) fieldIndex.get(positionBis); assertThat(map).hasSize(0); assertThat(map.get(null)).isNull(); ChangeAssert changeAssertBis0 = changesAssertBis.changeOfDeletion(); @@ -132,9 +131,9 @@ public void test_change_of_deletion_with_displays() throws Exception { fieldChange.setAccessible(true); ChangesOutputter changesOutputter = output(changes); - PositionWithChanges position = - (PositionWithChanges) fieldPosition.get(changesOutputter); - Map> map = (Map>)fieldIndex.get(position); + PositionWithChanges position = + (PositionWithChanges) fieldPosition.get(changesOutputter); + Map> map = (Map>) fieldIndex.get(position); assertThat(map).hasSize(0); assertThat(map.get(null)).isNull(); ChangeOutputter changeOutputter0 = changesOutputter.changeOfDeletion(); @@ -155,9 +154,9 @@ public void test_change_of_deletion_with_displays() throws Exception { } ChangesOutputter changesOutputterBis = output(changes); - PositionWithChanges positionBis = - (PositionWithChanges) fieldPosition.get(changesOutputterBis); - map = (Map>)fieldIndex.get(positionBis); + PositionWithChanges positionBis = + (PositionWithChanges) fieldPosition.get(changesOutputterBis); + map = (Map>) fieldIndex.get(positionBis); assertThat(map).hasSize(0); assertThat(map.get(null)).isNull(); ChangeOutputter changeOutputterBis0 = changesOutputterBis.changeOfDeletion(); diff --git a/src/test/java/org/assertj/db/navigation/ToChange_ChangeOfModificationOnTable_Integer_Test.java b/src/test/java/org/assertj/db/navigation/ToChange_ChangeOfModificationOnTable_Integer_Test.java index fe666e10..528721c7 100644 --- a/src/test/java/org/assertj/db/navigation/ToChange_ChangeOfModificationOnTable_Integer_Test.java +++ b/src/test/java/org/assertj/db/navigation/ToChange_ChangeOfModificationOnTable_Integer_Test.java @@ -8,10 +8,19 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.navigation; +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.db.api.Assertions.assertThat; +import static org.assertj.db.output.Outputs.output; +import static org.junit.Assert.fail; + +import java.lang.reflect.Field; +import java.util.List; +import java.util.Map; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeAssert; import org.assertj.db.api.ChangesAssert; @@ -24,21 +33,11 @@ import org.assertj.db.type.Changes; import org.junit.Test; -import java.lang.reflect.Field; -import java.util.List; -import java.util.Map; - -import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.db.api.Assertions.assertThat; -import static org.assertj.db.output.Outputs.output; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.navigation.ToChange} class : * {@link org.assertj.db.navigation.ToChange#changeOfModificationOnTable(String, int)} method. * * @author Régis Pouiller - * */ public class ToChange_ChangeOfModificationOnTable_Integer_Test extends AbstractTest { @@ -62,9 +61,9 @@ public void test_change_of_modification_on_table_with_index_with_assertions() th fieldChange.setAccessible(true); ChangesAssert changesAssert = assertThat(changes); - PositionWithChanges position = - (PositionWithChanges) fieldPosition.get(changesAssert); - Map> map = (Map>)fieldIndex.get(position); + PositionWithChanges position = + (PositionWithChanges) fieldPosition.get(changesAssert); + Map> map = (Map>) fieldIndex.get(position); assertThat(map).hasSize(0); assertThat(map.get(null)).isNull(); ChangeAssert changeAssert0 = changesAssert.changeOfModificationOnTable("actor", 0); @@ -98,9 +97,9 @@ public void test_change_of_modification_on_table_with_index_with_assertions() th assertThat(changeAssert0).isSameAs(changeAssertAgain0); ChangesAssert changesAssertBis = assertThat(changes); - PositionWithChanges positionBis = - (PositionWithChanges) fieldPosition.get(changesAssertBis); - map = (Map>)fieldIndex.get(positionBis); + PositionWithChanges positionBis = + (PositionWithChanges) fieldPosition.get(changesAssertBis); + map = (Map>) fieldIndex.get(positionBis); assertThat(map).hasSize(0); assertThat(map.get(null)).isNull(); ChangeAssert changeAssertBis0 = changesAssertBis.changeOfModificationOnTable("actor", 0); @@ -159,9 +158,9 @@ public void test_change_of_modification_on_table_with_index_with_displays() thro fieldChange.setAccessible(true); ChangesOutputter changesDisplay = output(changes); - PositionWithChanges position = - (PositionWithChanges) fieldPosition.get(changesDisplay); - Map> map = (Map>)fieldIndex.get(position); + PositionWithChanges position = + (PositionWithChanges) fieldPosition.get(changesDisplay); + Map> map = (Map>) fieldIndex.get(position); assertThat(map).hasSize(0); assertThat(map.get(null)).isNull(); ChangeOutputter changeDisplay0 = changesDisplay.changeOfModificationOnTable("actor", 0); @@ -195,9 +194,9 @@ public void test_change_of_modification_on_table_with_index_with_displays() thro assertThat(changeDisplay0).isSameAs(changeDisplayAgain0); ChangesOutputter changesDisplayBis = output(changes); - PositionWithChanges positionBis = - (PositionWithChanges) fieldPosition.get(changesDisplayBis); - map = (Map>)fieldIndex.get(positionBis); + PositionWithChanges positionBis = + (PositionWithChanges) fieldPosition.get(changesDisplayBis); + map = (Map>) fieldIndex.get(positionBis); assertThat(map).hasSize(0); assertThat(map.get(null)).isNull(); ChangeOutputter changeDisplayBis0 = changesDisplayBis.changeOfModificationOnTable("actor", 0); diff --git a/src/test/java/org/assertj/db/navigation/ToChange_ChangeOfModificationOnTable_Test.java b/src/test/java/org/assertj/db/navigation/ToChange_ChangeOfModificationOnTable_Test.java index 22d599f0..df93151a 100644 --- a/src/test/java/org/assertj/db/navigation/ToChange_ChangeOfModificationOnTable_Test.java +++ b/src/test/java/org/assertj/db/navigation/ToChange_ChangeOfModificationOnTable_Test.java @@ -8,10 +8,19 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.navigation; +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.db.api.Assertions.assertThat; +import static org.assertj.db.output.Outputs.output; +import static org.junit.Assert.fail; + +import java.lang.reflect.Field; +import java.util.List; +import java.util.Map; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeAssert; import org.assertj.db.api.ChangesAssert; @@ -24,21 +33,11 @@ import org.assertj.db.type.Changes; import org.junit.Test; -import java.lang.reflect.Field; -import java.util.List; -import java.util.Map; - -import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.db.api.Assertions.assertThat; -import static org.assertj.db.output.Outputs.output; -import static org.junit.Assert.fail; - /** * Tests on {@link ToChange} class : * {@link ToChange#changeOfModificationOnTable(String)} method. * * @author Régis Pouiller - * */ public class ToChange_ChangeOfModificationOnTable_Test extends AbstractTest { @@ -62,9 +61,9 @@ public void test_change_of_modification_on_table_with_assertions() throws Except fieldChange.setAccessible(true); ChangesAssert changesAssert = assertThat(changes); - PositionWithChanges position = - (PositionWithChanges) fieldPosition.get(changesAssert); - Map> map = (Map>)fieldIndex.get(position); + PositionWithChanges position = + (PositionWithChanges) fieldPosition.get(changesAssert); + Map> map = (Map>) fieldIndex.get(position); assertThat(map).hasSize(0); assertThat(map.get(null)).isNull(); ChangeAssert changeAssert0 = changesAssert.changeOfModificationOnTable("actor"); @@ -90,9 +89,9 @@ public void test_change_of_modification_on_table_with_assertions() throws Except } ChangesAssert changesAssertBis = assertThat(changes); - PositionWithChanges positionBis = - (PositionWithChanges) fieldPosition.get(changesAssertBis); - map = (Map>)fieldIndex.get(positionBis); + PositionWithChanges positionBis = + (PositionWithChanges) fieldPosition.get(changesAssertBis); + map = (Map>) fieldIndex.get(positionBis); assertThat(map).hasSize(0); assertThat(map.get(null)).isNull(); ChangeAssert changeAssertBis0 = changesAssertBis.changeOfModificationOnTable("actor"); @@ -143,9 +142,9 @@ public void test_change_of_modification_on_table_with_displays() throws Exceptio fieldChange.setAccessible(true); ChangesOutputter changesOutputter = output(changes); - PositionWithChanges position = - (PositionWithChanges) fieldPosition.get(changesOutputter); - Map> map = (Map>)fieldIndex.get(position); + PositionWithChanges position = + (PositionWithChanges) fieldPosition.get(changesOutputter); + Map> map = (Map>) fieldIndex.get(position); assertThat(map).hasSize(0); assertThat(map.get(null)).isNull(); ChangeOutputter changeOutputter0 = changesOutputter.changeOfModificationOnTable("actor"); @@ -171,9 +170,9 @@ public void test_change_of_modification_on_table_with_displays() throws Exceptio } ChangesOutputter changesOutputterBis = output(changes); - PositionWithChanges positionBis = - (PositionWithChanges) fieldPosition.get(changesOutputterBis); - map = (Map>)fieldIndex.get(positionBis); + PositionWithChanges positionBis = + (PositionWithChanges) fieldPosition.get(changesOutputterBis); + map = (Map>) fieldIndex.get(positionBis); assertThat(map).hasSize(0); assertThat(map.get(null)).isNull(); ChangeOutputter changeOutputterBis0 = changesOutputterBis.changeOfModificationOnTable("actor"); diff --git a/src/test/java/org/assertj/db/navigation/ToChange_ChangeOfModification_Integer_Test.java b/src/test/java/org/assertj/db/navigation/ToChange_ChangeOfModification_Integer_Test.java index 235477aa..0b0e8dcf 100644 --- a/src/test/java/org/assertj/db/navigation/ToChange_ChangeOfModification_Integer_Test.java +++ b/src/test/java/org/assertj/db/navigation/ToChange_ChangeOfModification_Integer_Test.java @@ -8,10 +8,19 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.navigation; +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.db.api.Assertions.assertThat; +import static org.assertj.db.output.Outputs.output; +import static org.junit.Assert.fail; + +import java.lang.reflect.Field; +import java.util.List; +import java.util.Map; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeAssert; import org.assertj.db.api.ChangesAssert; @@ -24,21 +33,11 @@ import org.assertj.db.type.Changes; import org.junit.Test; -import java.lang.reflect.Field; -import java.util.List; -import java.util.Map; - -import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.db.api.Assertions.assertThat; -import static org.assertj.db.output.Outputs.output; -import static org.junit.Assert.fail; - /** * Tests on {@link ToChange} class : * {@link ToChange#changeOfModification(int)} method. * * @author Régis Pouiller - * */ public class ToChange_ChangeOfModification_Integer_Test extends AbstractTest { @@ -62,9 +61,9 @@ public void test_change_of_modification_with_index_with_assertions() throws Exce fieldChange.setAccessible(true); ChangesAssert changesAssert = assertThat(changes); - PositionWithChanges position = - (PositionWithChanges) fieldPosition.get(changesAssert); - Map> map = (Map>)fieldIndex.get(position); + PositionWithChanges position = + (PositionWithChanges) fieldPosition.get(changesAssert); + Map> map = (Map>) fieldIndex.get(position); assertThat(map).hasSize(0); assertThat(map.get(null)).isNull(); ChangeAssert changeAssert0 = changesAssert.changeOfModification(0); @@ -98,9 +97,9 @@ public void test_change_of_modification_with_index_with_assertions() throws Exce assertThat(changeAssert0).isSameAs(changeAssertAgain0); ChangesAssert changesAssertBis = assertThat(changes); - PositionWithChanges positionBis = - (PositionWithChanges) fieldPosition.get(changesAssertBis); - map = (Map>)fieldIndex.get(positionBis); + PositionWithChanges positionBis = + (PositionWithChanges) fieldPosition.get(changesAssertBis); + map = (Map>) fieldIndex.get(positionBis); assertThat(map).hasSize(0); assertThat(map.get(null)).isNull(); ChangeAssert changeAssertBis0 = changesAssertBis.changeOfModification(0); @@ -159,9 +158,9 @@ public void test_change_of_modification_with_index_with_displays() throws Except fieldChange.setAccessible(true); ChangesOutputter changesDisplay = output(changes); - PositionWithChanges position = - (PositionWithChanges) fieldPosition.get(changesDisplay); - Map> map = (Map>)fieldIndex.get(position); + PositionWithChanges position = + (PositionWithChanges) fieldPosition.get(changesDisplay); + Map> map = (Map>) fieldIndex.get(position); assertThat(map).hasSize(0); assertThat(map.get(null)).isNull(); ChangeOutputter changeDisplay0 = changesDisplay.changeOfModification(0); @@ -195,9 +194,9 @@ public void test_change_of_modification_with_index_with_displays() throws Except assertThat(changeDisplay0).isSameAs(changeDisplayAgain0); ChangesOutputter changesDisplayBis = output(changes); - PositionWithChanges positionBis = - (PositionWithChanges) fieldPosition.get(changesDisplayBis); - map = (Map>)fieldIndex.get(positionBis); + PositionWithChanges positionBis = + (PositionWithChanges) fieldPosition.get(changesDisplayBis); + map = (Map>) fieldIndex.get(positionBis); assertThat(map).hasSize(0); assertThat(map.get(null)).isNull(); ChangeOutputter changeDisplayBis0 = changesDisplayBis.changeOfModification(0); diff --git a/src/test/java/org/assertj/db/navigation/ToChange_ChangeOfModification_Test.java b/src/test/java/org/assertj/db/navigation/ToChange_ChangeOfModification_Test.java index 6c314d64..a82b1dd7 100644 --- a/src/test/java/org/assertj/db/navigation/ToChange_ChangeOfModification_Test.java +++ b/src/test/java/org/assertj/db/navigation/ToChange_ChangeOfModification_Test.java @@ -8,10 +8,19 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.navigation; +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.db.api.Assertions.assertThat; +import static org.assertj.db.output.Outputs.output; +import static org.junit.Assert.fail; + +import java.lang.reflect.Field; +import java.util.List; +import java.util.Map; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeAssert; import org.assertj.db.api.ChangesAssert; @@ -24,21 +33,11 @@ import org.assertj.db.type.Changes; import org.junit.Test; -import java.lang.reflect.Field; -import java.util.List; -import java.util.Map; - -import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.db.api.Assertions.assertThat; -import static org.assertj.db.output.Outputs.output; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.navigation.ToChange} class : * {@link org.assertj.db.navigation.ToChange#changeOfModification()} method. * * @author Régis Pouiller - * */ public class ToChange_ChangeOfModification_Test extends AbstractTest { @@ -62,9 +61,9 @@ public void test_change_of_modification_with_assertions() throws Exception { fieldChange.setAccessible(true); ChangesAssert changesAssert = assertThat(changes); - PositionWithChanges position = - (PositionWithChanges) fieldPosition.get(changesAssert); - Map> map = (Map>)fieldIndex.get(position); + PositionWithChanges position = + (PositionWithChanges) fieldPosition.get(changesAssert); + Map> map = (Map>) fieldIndex.get(position); assertThat(map).hasSize(0); assertThat(map.get(null)).isNull(); ChangeAssert changeAssert0 = changesAssert.changeOfModification(); @@ -90,9 +89,9 @@ public void test_change_of_modification_with_assertions() throws Exception { } ChangesAssert changesAssertBis = assertThat(changes); - PositionWithChanges positionBis = - (PositionWithChanges) fieldPosition.get(changesAssertBis); - map = (Map>)fieldIndex.get(positionBis); + PositionWithChanges positionBis = + (PositionWithChanges) fieldPosition.get(changesAssertBis); + map = (Map>) fieldIndex.get(positionBis); assertThat(map).hasSize(0); assertThat(map.get(null)).isNull(); ChangeAssert changeAssertBis0 = changesAssertBis.changeOfModification(); @@ -143,9 +142,9 @@ public void test_change_of_modification_with_displays() throws Exception { fieldChange.setAccessible(true); ChangesOutputter changesOutputter = output(changes); - PositionWithChanges position = - (PositionWithChanges) fieldPosition.get(changesOutputter); - Map> map = (Map>)fieldIndex.get(position); + PositionWithChanges position = + (PositionWithChanges) fieldPosition.get(changesOutputter); + Map> map = (Map>) fieldIndex.get(position); assertThat(map).hasSize(0); assertThat(map.get(null)).isNull(); ChangeOutputter changeOutputter0 = changesOutputter.changeOfModification(); @@ -171,9 +170,9 @@ public void test_change_of_modification_with_displays() throws Exception { } ChangesOutputter changesOutputterBis = output(changes); - PositionWithChanges positionBis = - (PositionWithChanges) fieldPosition.get(changesOutputterBis); - map = (Map>)fieldIndex.get(positionBis); + PositionWithChanges positionBis = + (PositionWithChanges) fieldPosition.get(changesOutputterBis); + map = (Map>) fieldIndex.get(positionBis); assertThat(map).hasSize(0); assertThat(map.get(null)).isNull(); ChangeOutputter changeOutputterBis0 = changesOutputterBis.changeOfModification(); diff --git a/src/test/java/org/assertj/db/navigation/ToChange_ChangeOnTableWithPks_Test.java b/src/test/java/org/assertj/db/navigation/ToChange_ChangeOnTableWithPks_Test.java index b9cf32ad..5e10fe96 100644 --- a/src/test/java/org/assertj/db/navigation/ToChange_ChangeOnTableWithPks_Test.java +++ b/src/test/java/org/assertj/db/navigation/ToChange_ChangeOnTableWithPks_Test.java @@ -8,10 +8,18 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.navigation; +import static org.assertj.db.api.Assertions.assertThat; +import static org.assertj.db.output.Outputs.output; +import static org.junit.Assert.fail; + +import java.lang.reflect.Field; +import java.util.List; +import java.util.Map; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeAssert; import org.assertj.db.api.ChangesAssert; @@ -24,20 +32,11 @@ import org.assertj.db.type.Changes; import org.junit.Test; -import java.lang.reflect.Field; -import java.util.List; -import java.util.Map; - -import static org.assertj.db.api.Assertions.assertThat; -import static org.assertj.db.output.Outputs.output; -import static org.junit.Assert.fail; - /** * Tests on {@link ToChange} class : * {@link ToChange#changeOnTableWithPks(String, Object...)} method. * * @author Régis Pouiller - * */ public class ToChange_ChangeOnTableWithPks_Test extends AbstractTest { @@ -61,9 +60,9 @@ public void test_change_on_table_with_pks_with_assertions() throws Exception { fieldChange.setAccessible(true); ChangesAssert changesAssert = assertThat(changes); - PositionWithChanges position = - (PositionWithChanges) fieldPosition.get(changesAssert); - Map> map = (Map>)fieldIndex.get(position); + PositionWithChanges position = + (PositionWithChanges) fieldPosition.get(changesAssert); + Map> map = (Map>) fieldIndex.get(position); Assertions.assertThat(map).hasSize(0); Assertions.assertThat(map.get(null)).isNull(); ChangeAssert changeAssert0 = changesAssert.changeOnTableWithPks("actor", 1); @@ -86,9 +85,9 @@ public void test_change_on_table_with_pks_with_assertions() throws Exception { } ChangesAssert changesAssertBis = assertThat(changes); - PositionWithChanges positionBis = - (PositionWithChanges) fieldPosition.get(changesAssertBis); - map = (Map>)fieldIndex.get(positionBis); + PositionWithChanges positionBis = + (PositionWithChanges) fieldPosition.get(changesAssertBis); + map = (Map>) fieldIndex.get(positionBis); Assertions.assertThat(map).hasSize(0); Assertions.assertThat(map.get(null)).isNull(); ChangeAssert changeAssertBis0 = changesAssertBis.changeOnTableWithPks("actor", 1); @@ -142,9 +141,9 @@ public void test_change_on_table_with_pks_with_displays() throws Exception { fieldChange.setAccessible(true); ChangesOutputter changesOutputter = output(changes); - PositionWithChanges position = - (PositionWithChanges) fieldPosition.get(changesOutputter); - Map> map = (Map>)fieldIndex.get(position); + PositionWithChanges position = + (PositionWithChanges) fieldPosition.get(changesOutputter); + Map> map = (Map>) fieldIndex.get(position); Assertions.assertThat(map).hasSize(0); Assertions.assertThat(map.get(null)).isNull(); ChangeOutputter changeOutputter0 = changesOutputter.changeOnTableWithPks("actor", 1); @@ -167,9 +166,9 @@ public void test_change_on_table_with_pks_with_displays() throws Exception { } ChangesOutputter changesOutputterBis = output(changes); - PositionWithChanges positionBis = - (PositionWithChanges) fieldPosition.get(changesOutputterBis); - map = (Map>)fieldIndex.get(positionBis); + PositionWithChanges positionBis = + (PositionWithChanges) fieldPosition.get(changesOutputterBis); + map = (Map>) fieldIndex.get(positionBis); Assertions.assertThat(map).hasSize(0); Assertions.assertThat(map.get(null)).isNull(); ChangeOutputter changeOutputterBis0 = changesOutputterBis.changeOnTableWithPks("actor", 1); diff --git a/src/test/java/org/assertj/db/navigation/ToChange_ChangeOnTable_Integer_Test.java b/src/test/java/org/assertj/db/navigation/ToChange_ChangeOnTable_Integer_Test.java index ed9f60ee..054f6594 100644 --- a/src/test/java/org/assertj/db/navigation/ToChange_ChangeOnTable_Integer_Test.java +++ b/src/test/java/org/assertj/db/navigation/ToChange_ChangeOnTable_Integer_Test.java @@ -8,10 +8,19 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.navigation; +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.db.api.Assertions.assertThat; +import static org.assertj.db.output.Outputs.output; +import static org.junit.Assert.fail; + +import java.lang.reflect.Field; +import java.util.List; +import java.util.Map; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeAssert; import org.assertj.db.api.ChangesAssert; @@ -24,21 +33,11 @@ import org.assertj.db.type.Changes; import org.junit.Test; -import java.lang.reflect.Field; -import java.util.List; -import java.util.Map; - -import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.db.api.Assertions.assertThat; -import static org.assertj.db.output.Outputs.output; -import static org.junit.Assert.fail; - /** * Tests on {@link ToChange} class : * {@link ToChange#changeOnTable(String, int)} method. * * @author Régis Pouiller - * */ public class ToChange_ChangeOnTable_Integer_Test extends AbstractTest { @@ -62,9 +61,9 @@ public void test_change_on_table_with_index_with_assertions() throws Exception { fieldChange.setAccessible(true); ChangesAssert changesAssert = assertThat(changes); - PositionWithChanges position = - (PositionWithChanges) fieldPosition.get(changesAssert); - Map> map = (Map>)fieldIndex.get(position); + PositionWithChanges position = + (PositionWithChanges) fieldPosition.get(changesAssert); + Map> map = (Map>) fieldIndex.get(position); assertThat(map).hasSize(0); assertThat(map.get(null)).isNull(); ChangeAssert changeAssert0 = changesAssert.changeOnTable("actor", 0); @@ -95,9 +94,9 @@ public void test_change_on_table_with_index_with_assertions() throws Exception { assertThat(changeAssert0).isSameAs(changeAssertAgain0); ChangesAssert changesAssertBis = assertThat(changes); - PositionWithChanges positionBis = - (PositionWithChanges) fieldPosition.get(changesAssertBis); - map = (Map>)fieldIndex.get(positionBis); + PositionWithChanges positionBis = + (PositionWithChanges) fieldPosition.get(changesAssertBis); + map = (Map>) fieldIndex.get(positionBis); assertThat(map).hasSize(0); assertThat(map.get(null)).isNull(); ChangeAssert changeAssertBis0 = changesAssertBis.changeOnTable("actor", 0); @@ -153,9 +152,9 @@ public void test_change_on_table_with_index_with_displays() throws Exception { fieldChange.setAccessible(true); ChangesOutputter changesDisplay = output(changes); - PositionWithChanges position = - (PositionWithChanges) fieldPosition.get(changesDisplay); - Map> map = (Map>)fieldIndex.get(position); + PositionWithChanges position = + (PositionWithChanges) fieldPosition.get(changesDisplay); + Map> map = (Map>) fieldIndex.get(position); assertThat(map).hasSize(0); assertThat(map.get(null)).isNull(); ChangeOutputter changeDisplay0 = changesDisplay.changeOnTable("actor", 0); @@ -186,9 +185,9 @@ public void test_change_on_table_with_index_with_displays() throws Exception { assertThat(changeDisplay0).isSameAs(changeDisplayAgain0); ChangesOutputter changesDisplayBis = output(changes); - PositionWithChanges positionBis = - (PositionWithChanges) fieldPosition.get(changesDisplayBis); - map = (Map>)fieldIndex.get(positionBis); + PositionWithChanges positionBis = + (PositionWithChanges) fieldPosition.get(changesDisplayBis); + map = (Map>) fieldIndex.get(positionBis); assertThat(map).hasSize(0); assertThat(map.get(null)).isNull(); ChangeOutputter changeDisplayBis0 = changesDisplayBis.changeOnTable("actor", 0); diff --git a/src/test/java/org/assertj/db/navigation/ToChange_ChangeOnTable_Test.java b/src/test/java/org/assertj/db/navigation/ToChange_ChangeOnTable_Test.java index ced9d523..7b1a4a04 100644 --- a/src/test/java/org/assertj/db/navigation/ToChange_ChangeOnTable_Test.java +++ b/src/test/java/org/assertj/db/navigation/ToChange_ChangeOnTable_Test.java @@ -8,10 +8,19 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.navigation; +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.db.api.Assertions.assertThat; +import static org.assertj.db.output.Outputs.output; +import static org.junit.Assert.fail; + +import java.lang.reflect.Field; +import java.util.List; +import java.util.Map; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeAssert; import org.assertj.db.api.ChangesAssert; @@ -24,21 +33,11 @@ import org.assertj.db.type.Changes; import org.junit.Test; -import java.lang.reflect.Field; -import java.util.List; -import java.util.Map; - -import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.db.api.Assertions.assertThat; -import static org.assertj.db.output.Outputs.output; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.navigation.ToChange} class : * {@link org.assertj.db.navigation.ToChange#changeOnTable(String)} method. * * @author Régis Pouiller - * */ public class ToChange_ChangeOnTable_Test extends AbstractTest { @@ -62,9 +61,9 @@ public void test_change_on_table_with_assertions() throws Exception { fieldChange.setAccessible(true); ChangesAssert changesAssert = assertThat(changes); - PositionWithChanges position = - (PositionWithChanges) fieldPosition.get(changesAssert); - Map> map = (Map>)fieldIndex.get(position); + PositionWithChanges position = + (PositionWithChanges) fieldPosition.get(changesAssert); + Map> map = (Map>) fieldIndex.get(position); assertThat(map).hasSize(0); assertThat(map.get(null)).isNull(); ChangeAssert changeAssert0 = changesAssert.changeOnTable("actor"); @@ -87,9 +86,9 @@ public void test_change_on_table_with_assertions() throws Exception { } ChangesAssert changesAssertBis = assertThat(changes); - PositionWithChanges positionBis = - (PositionWithChanges) fieldPosition.get(changesAssertBis); - map = (Map>)fieldIndex.get(positionBis); + PositionWithChanges positionBis = + (PositionWithChanges) fieldPosition.get(changesAssertBis); + map = (Map>) fieldIndex.get(positionBis); assertThat(map).hasSize(0); assertThat(map.get(null)).isNull(); ChangeAssert changeAssertBis0 = changesAssertBis.changeOnTable("actor"); @@ -137,9 +136,9 @@ public void test_change_on_table_with_displays() throws Exception { fieldChange.setAccessible(true); ChangesOutputter changesOutputter = output(changes); - PositionWithChanges position = - (PositionWithChanges) fieldPosition.get(changesOutputter); - Map> map = (Map>)fieldIndex.get(position); + PositionWithChanges position = + (PositionWithChanges) fieldPosition.get(changesOutputter); + Map> map = (Map>) fieldIndex.get(position); assertThat(map).hasSize(0); assertThat(map.get(null)).isNull(); ChangeOutputter changeOutputter0 = changesOutputter.changeOnTable("actor"); @@ -162,9 +161,9 @@ public void test_change_on_table_with_displays() throws Exception { } ChangesOutputter changesOutputterBis = output(changes); - PositionWithChanges positionBis = - (PositionWithChanges) fieldPosition.get(changesOutputterBis); - map = (Map>)fieldIndex.get(positionBis); + PositionWithChanges positionBis = + (PositionWithChanges) fieldPosition.get(changesOutputterBis); + map = (Map>) fieldIndex.get(positionBis); assertThat(map).hasSize(0); assertThat(map.get(null)).isNull(); ChangeOutputter changeOutputterBis0 = changesOutputterBis.changeOnTable("actor"); diff --git a/src/test/java/org/assertj/db/navigation/ToChange_Change_Integer_Test.java b/src/test/java/org/assertj/db/navigation/ToChange_Change_Integer_Test.java index e4e4ba84..0a303075 100644 --- a/src/test/java/org/assertj/db/navigation/ToChange_Change_Integer_Test.java +++ b/src/test/java/org/assertj/db/navigation/ToChange_Change_Integer_Test.java @@ -8,10 +8,19 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.navigation; +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.db.api.Assertions.assertThat; +import static org.assertj.db.output.Outputs.output; +import static org.junit.Assert.fail; + +import java.lang.reflect.Field; +import java.util.List; +import java.util.Map; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeAssert; import org.assertj.db.api.ChangesAssert; @@ -24,21 +33,11 @@ import org.assertj.db.type.Changes; import org.junit.Test; -import java.lang.reflect.Field; -import java.util.List; -import java.util.Map; - -import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.db.api.Assertions.assertThat; -import static org.assertj.db.output.Outputs.output; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.navigation.ToChange} class : * {@link org.assertj.db.navigation.ToChange#change(int)} method. * * @author Régis Pouiller - * */ public class ToChange_Change_Integer_Test extends AbstractTest { @@ -63,9 +62,9 @@ public void test_change_with_index_with_assertions() throws Exception { fieldChange.setAccessible(true); ChangesAssert changesAssert = assertThat(changes); - PositionWithChanges position = - (PositionWithChanges) fieldPosition.get(changesAssert); - Map> map = (Map>)fieldIndex.get(position); + PositionWithChanges position = + (PositionWithChanges) fieldPosition.get(changesAssert); + Map> map = (Map>) fieldIndex.get(position); assertThat(map).hasSize(0); assertThat(map.get(null)).isNull(); ChangeAssert changeAssert0 = changesAssert.change(0); @@ -116,9 +115,9 @@ public void test_change_with_index_with_assertions() throws Exception { assertThat(changeAssert0).isSameAs(changeAssertAgain0); ChangesAssert changesAssertBis = assertThat(changes); - PositionWithChanges positionBis = - (PositionWithChanges) fieldPosition.get(changesAssertBis); - map = (Map>)fieldIndex.get(positionBis); + PositionWithChanges positionBis = + (PositionWithChanges) fieldPosition.get(changesAssertBis); + map = (Map>) fieldIndex.get(positionBis); assertThat(map).hasSize(0); assertThat(map.get(null)).isNull(); ChangeAssert changeAssertBis0 = changesAssertBis.change(0); @@ -200,9 +199,9 @@ public void test_change_with_index_with_displays() throws Exception { fieldChange.setAccessible(true); ChangesOutputter changesOutputter = output(changes); - PositionWithChanges position = - (PositionWithChanges) fieldPosition.get(changesOutputter); - Map> map = (Map>)fieldIndex.get(position); + PositionWithChanges position = + (PositionWithChanges) fieldPosition.get(changesOutputter); + Map> map = (Map>) fieldIndex.get(position); assertThat(map).hasSize(0); assertThat(map.get(null)).isNull(); ChangeOutputter changeOutputter0 = changesOutputter.change(0); @@ -253,9 +252,9 @@ public void test_change_with_index_with_displays() throws Exception { assertThat(changeOutputter0).isSameAs(changeOutputterAgain0); ChangesOutputter changesOutputterBis = output(changes); - PositionWithChanges positionBis = - (PositionWithChanges) fieldPosition.get(changesOutputterBis); - map = (Map>)fieldIndex.get(positionBis); + PositionWithChanges positionBis = + (PositionWithChanges) fieldPosition.get(changesOutputterBis); + map = (Map>) fieldIndex.get(positionBis); assertThat(map).hasSize(0); assertThat(map.get(null)).isNull(); ChangeOutputter changeOutputterBis0 = changesOutputterBis.change(0); diff --git a/src/test/java/org/assertj/db/navigation/ToChange_Change_Test.java b/src/test/java/org/assertj/db/navigation/ToChange_Change_Test.java index 467d86f3..825a7b2c 100644 --- a/src/test/java/org/assertj/db/navigation/ToChange_Change_Test.java +++ b/src/test/java/org/assertj/db/navigation/ToChange_Change_Test.java @@ -8,10 +8,19 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.navigation; +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.db.api.Assertions.assertThat; +import static org.assertj.db.output.Outputs.output; +import static org.junit.Assert.fail; + +import java.lang.reflect.Field; +import java.util.List; +import java.util.Map; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeAssert; import org.assertj.db.api.ChangesAssert; @@ -24,21 +33,11 @@ import org.assertj.db.type.Changes; import org.junit.Test; -import java.lang.reflect.Field; -import java.util.List; -import java.util.Map; - -import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.db.api.Assertions.assertThat; -import static org.assertj.db.output.Outputs.output; -import static org.junit.Assert.fail; - /** * Tests on {@link ToChange} class : * {@link ToChange#change()} method. * * @author Régis Pouiller - * */ public class ToChange_Change_Test extends AbstractTest { @@ -62,9 +61,9 @@ public void test_change_with_assertions() throws Exception { fieldChange.setAccessible(true); ChangesAssert changesAssert = assertThat(changes); - PositionWithChanges position = - (PositionWithChanges) fieldPosition.get(changesAssert); - Map> map = (Map>)fieldIndex.get(position); + PositionWithChanges position = + (PositionWithChanges) fieldPosition.get(changesAssert); + Map> map = (Map>) fieldIndex.get(position); assertThat(map).hasSize(0); assertThat(map.get(null)).isNull(); ChangeAssert changeAssert0 = changesAssert.change(); @@ -107,9 +106,9 @@ public void test_change_with_assertions() throws Exception { } ChangesAssert changesAssertBis = assertThat(changes); - PositionWithChanges positionBis = - (PositionWithChanges) fieldPosition.get(changesAssertBis); - map = (Map>)fieldIndex.get(positionBis); + PositionWithChanges positionBis = + (PositionWithChanges) fieldPosition.get(changesAssertBis); + map = (Map>) fieldIndex.get(positionBis); assertThat(map).hasSize(0); assertThat(map.get(null)).isNull(); ChangeAssert changeAssertBis0 = changesAssertBis.change(); @@ -182,9 +181,9 @@ public void test_change_with_displays() throws Exception { fieldChange.setAccessible(true); ChangesOutputter changesOutputter = output(changes); - PositionWithChanges position = - (PositionWithChanges) fieldPosition.get(changesOutputter); - Map> map = (Map>)fieldIndex.get(position); + PositionWithChanges position = + (PositionWithChanges) fieldPosition.get(changesOutputter); + Map> map = (Map>) fieldIndex.get(position); assertThat(map).hasSize(0); assertThat(map.get(null)).isNull(); ChangeOutputter changeOutputter0 = changesOutputter.change(); @@ -227,9 +226,9 @@ public void test_change_with_displays() throws Exception { } ChangesOutputter changesOutputterBis = output(changes); - PositionWithChanges positionBis = - (PositionWithChanges) fieldPosition.get(changesOutputterBis); - map = (Map>)fieldIndex.get(positionBis); + PositionWithChanges positionBis = + (PositionWithChanges) fieldPosition.get(changesOutputterBis); + map = (Map>) fieldIndex.get(positionBis); assertThat(map).hasSize(0); assertThat(map.get(null)).isNull(); ChangeOutputter changeOutputterBis0 = changesOutputterBis.change(); diff --git a/src/test/java/org/assertj/db/navigation/ToChange_Test.java b/src/test/java/org/assertj/db/navigation/ToChange_Test.java index d391b4c8..a2e79c6d 100644 --- a/src/test/java/org/assertj/db/navigation/ToChange_Test.java +++ b/src/test/java/org/assertj/db/navigation/ToChange_Test.java @@ -8,10 +8,15 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.navigation; +import static org.assertj.db.api.Assertions.assertThat; +import static org.assertj.db.output.Outputs.output; + +import java.lang.reflect.Field; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeAssert; import org.assertj.db.api.ChangesAssert; @@ -22,16 +27,10 @@ import org.assertj.db.type.Changes; import org.junit.Test; -import java.lang.reflect.Field; - -import static org.assertj.db.api.Assertions.assertThat; -import static org.assertj.db.output.Outputs.output; - /** * Tests on {@link ToChange} interface. * * @author Régis Pouiller - * */ public class ToChange_Test extends AbstractTest { @@ -87,7 +86,7 @@ public void test_to_change_navigation_with_assertions() throws Exception { ChangeAssert changeAssertModificationOnTable0 = changesAssert.changeOfModificationOnTable("actor"); ChangeAssert changeAssertModificationOnTable1 = changesAssertModification.changeOfModificationOnTable( - "interpretation"); + "interpretation"); ChangeAssert changeAssertModificationOnTable0Bis = changesAssertModification.changeOfModificationOnTable("actor", 0); ChangeAssert changeAssertModificationOnTable1Bis = changesAssert.changeOfModificationOnTable("interpretation", 0); @@ -171,7 +170,7 @@ public void test_to_change_navigation_with_displays() throws Exception { ChangeOutputter changeDisplayModificationOnTable0 = changesDisplay.changeOfModificationOnTable("actor"); ChangeOutputter changeDisplayModificationOnTable1 = changesDisplayModification.changeOfModificationOnTable( - "interpretation"); + "interpretation"); ChangeOutputter changeDisplayModificationOnTable0Bis = changesDisplayModification.changeOfModificationOnTable("actor", 0); ChangeOutputter changeDisplayModificationOnTable1Bis = changesDisplay.changeOfModificationOnTable("interpretation", 0); diff --git a/src/test/java/org/assertj/db/navigation/ToChanges_Test.java b/src/test/java/org/assertj/db/navigation/ToChanges_Test.java index dfbd4acc..83e37055 100644 --- a/src/test/java/org/assertj/db/navigation/ToChanges_Test.java +++ b/src/test/java/org/assertj/db/navigation/ToChanges_Test.java @@ -8,10 +8,16 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.navigation; +import static org.assertj.db.api.Assertions.assertThat; +import static org.assertj.db.output.Outputs.output; + +import java.lang.reflect.Field; +import java.util.List; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeAssert; import org.assertj.db.api.ChangesAssert; @@ -23,17 +29,10 @@ import org.assertj.db.type.Changes; import org.junit.Test; -import java.lang.reflect.Field; -import java.util.List; - -import static org.assertj.db.api.Assertions.assertThat; -import static org.assertj.db.output.Outputs.output; - /** * Tests on {@link org.assertj.db.navigation.ToChanges} interface. * * @author Régis Pouiller - * */ public class ToChanges_Test extends AbstractTest { @@ -107,7 +106,7 @@ public void test_to_changes_navigation_with_assertions() throws Exception { Assertions.assertThat(changesAllList).containsExactlyElementsOf(changesList); Assertions.assertThat(changesCreationList).containsExactly(changesList.get(0), changesList.get(1), - changesList.get(2)); + changesList.get(2)); Assertions.assertThat(changesModificationList).containsExactly(changesList.get(3), changesList.get(4), changesList.get(5)); Assertions.assertThat(changesDeletionList).containsExactly(changesList.get(6), changesList.get(7)); Assertions.assertThat(changesCreationOnTableList).containsExactly(changesList.get(0)); @@ -186,7 +185,7 @@ public void test_to_changes_navigation_with_displays() throws Exception { Assertions.assertThat(changesAllList).containsExactlyElementsOf(changesList); Assertions.assertThat(changesCreationList).containsExactly(changesList.get(0), changesList.get(1), - changesList.get(2)); + changesList.get(2)); Assertions.assertThat(changesModificationList).containsExactly(changesList.get(3), changesList.get(4), changesList.get(5)); Assertions.assertThat(changesDeletionList).containsExactly(changesList.get(6), changesList.get(7)); Assertions.assertThat(changesCreationOnTableList).containsExactly(changesList.get(0)); diff --git a/src/test/java/org/assertj/db/navigation/ToColumnFromChange_ColumnAmongTheModifiedOnes_Integer_Test.java b/src/test/java/org/assertj/db/navigation/ToColumnFromChange_ColumnAmongTheModifiedOnes_Integer_Test.java index 244ed33a..7ec87724 100644 --- a/src/test/java/org/assertj/db/navigation/ToColumnFromChange_ColumnAmongTheModifiedOnes_Integer_Test.java +++ b/src/test/java/org/assertj/db/navigation/ToColumnFromChange_ColumnAmongTheModifiedOnes_Integer_Test.java @@ -8,10 +8,19 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.navigation; +import static org.assertj.db.api.Assertions.assertThat; +import static org.assertj.db.output.Outputs.output; +import static org.junit.Assert.fail; + +import java.lang.reflect.Field; +import java.math.BigDecimal; +import java.sql.Date; +import java.util.UUID; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeAssert; import org.assertj.db.api.ChangeColumnAssert; @@ -26,21 +35,11 @@ import org.assertj.db.type.Value; import org.junit.Test; -import java.lang.reflect.Field; -import java.math.BigDecimal; -import java.sql.Date; -import java.util.UUID; - -import static org.assertj.db.api.Assertions.assertThat; -import static org.assertj.db.output.Outputs.output; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.navigation.ToColumnFromChange} class : * {@link org.assertj.db.navigation.ToColumnFromChange#columnAmongTheModifiedOnes()} method. * * @author Régis Pouiller - * */ public class ToColumnFromChange_ColumnAmongTheModifiedOnes_Integer_Test extends AbstractTest { @@ -67,8 +66,8 @@ public void test_column_among_the_modified_ones_with_index_with_assertions() thr ChangesAssert changesAssert = assertThat(changes); ChangeAssert changeAssert = changesAssert.change(6); - PositionWithColumnsChange position = - (PositionWithColumnsChange) fieldPosition.get(changeAssert); + PositionWithColumnsChange position = + (PositionWithColumnsChange) fieldPosition.get(changeAssert); Assertions.assertThat(fieldIndex.get(position)).isEqualTo(0); ChangeColumnAssert changeColumnAssert0 = changeAssert.columnAmongTheModifiedOnes(0); Assertions.assertThat(fieldIndex.get(position)).isEqualTo(1); @@ -97,8 +96,8 @@ public void test_column_among_the_modified_ones_with_index_with_assertions() thr ChangesAssert changesAssertBis = assertThat(changes); ChangeAssert changeAssertBis = changesAssertBis.change(6); - PositionWithColumnsChange positionBis = - (PositionWithColumnsChange) fieldPosition.get(changeAssertBis); + PositionWithColumnsChange positionBis = + (PositionWithColumnsChange) fieldPosition.get(changeAssertBis); Assertions.assertThat(fieldIndex.get(positionBis)).isEqualTo(0); ChangeColumnAssert changeColumnAssertBis0 = changeAssertBis.columnAmongTheModifiedOnes(0); Assertions.assertThat(fieldIndex.get(positionBis)).isEqualTo(1); @@ -126,35 +125,35 @@ public void test_column_among_the_modified_ones_with_index_with_assertions() thr Assertions.assertThat(changeColumnAssertBis0).isSameAs(changeColumnAssertBisAgain0); Assertions.assertThat(fieldColumnName.get(changeColumnAssert0)).isEqualTo(fieldColumnName.get(changeColumnAssertBis0)).isEqualTo( - "ID"); + "ID"); Assertions.assertThat(fieldColumnName.get(changeColumnAssert1)).isEqualTo(fieldColumnName.get(changeColumnAssertBis1)).isEqualTo( - "NAME"); + "NAME"); Assertions.assertThat(fieldColumnName.get(changeColumnAssert2)).isEqualTo(fieldColumnName.get(changeColumnAssertBis2)).isEqualTo( - "FIRSTNAME"); + "FIRSTNAME"); Assertions.assertThat(fieldColumnName.get(changeColumnAssert3)).isEqualTo( - fieldColumnName.get(changeColumnAssertBis3)).isEqualTo( - "BIRTH"); + fieldColumnName.get(changeColumnAssertBis3)).isEqualTo( + "BIRTH"); Assertions.assertThat(fieldColumnName.get(changeColumnAssert4)).isEqualTo( - fieldColumnName.get(changeColumnAssertBis4)).isEqualTo( - "ACTOR_IMDB"); + fieldColumnName.get(changeColumnAssertBis4)).isEqualTo( + "ACTOR_IMDB"); Assertions.assertThat(((Value) fieldValueAtStartPoint.get(changeColumnAssert0)).getValue()).isEqualTo( - ((Value) fieldValueAtStartPoint.get(changeColumnAssertBis0)).getValue()).isEqualTo( - new BigDecimal("3")); + ((Value) fieldValueAtStartPoint.get(changeColumnAssertBis0)).getValue()).isEqualTo( + new BigDecimal("3")); Assertions.assertThat(((Value) fieldValueAtStartPoint.get(changeColumnAssert1)).getValue()). - isEqualTo(((Value) fieldValueAtStartPoint.get(changeColumnAssertBis1)).getValue()). - isEqualTo("Worthington"); + isEqualTo(((Value) fieldValueAtStartPoint.get(changeColumnAssertBis1)).getValue()). + isEqualTo("Worthington"); Assertions.assertThat(((Value) fieldValueAtStartPoint.get(changeColumnAssert2)).getValue()). - isEqualTo(((Value) fieldValueAtStartPoint.get(changeColumnAssertBis2)).getValue()). - isEqualTo("Sam"); + isEqualTo(((Value) fieldValueAtStartPoint.get(changeColumnAssertBis2)).getValue()). + isEqualTo("Sam"); Assertions.assertThat(((Value) fieldValueAtStartPoint.get(changeColumnAssert3)).getValue()). - isEqualTo(((Value) fieldValueAtStartPoint.get(changeColumnAssertBis3)).getValue()). - isEqualTo( - Date.valueOf("1976-08-02")); + isEqualTo(((Value) fieldValueAtStartPoint.get(changeColumnAssertBis3)).getValue()). + isEqualTo( + Date.valueOf("1976-08-02")); Assertions.assertThat(((Value) fieldValueAtStartPoint.get(changeColumnAssert4)).getValue()). - isEqualTo(((Value) fieldValueAtStartPoint.get(changeColumnAssertBis4)).getValue()). - isEqualTo( - UUID.fromString("D735221B-5DE5-4112-AA1E-49090CB75ADA")); + isEqualTo(((Value) fieldValueAtStartPoint.get(changeColumnAssertBis4)).getValue()). + isEqualTo( + UUID.fromString("D735221B-5DE5-4112-AA1E-49090CB75ADA")); Assertions.assertThat(((Value) fieldValueAtEndPoint.get(changeColumnAssert0)).getValue()).isNull(); @@ -177,7 +176,7 @@ public void test_column_among_the_modified_ones_with_index_with_assertions() thr } Assertions.assertThat(((Value) fieldValueAtStartPoint.get(changeColumnAssert)).getValue()).isEqualTo("Sigourney"); Assertions.assertThat(((Value) fieldValueAtEndPoint.get(changeColumnAssert)).getValue()).isEqualTo( - "Susan Alexandra"); + "Susan Alexandra"); } /** @@ -203,8 +202,8 @@ public void test_column_among_the_modified_ones_with_index_with_displays() throw ChangesOutputter changesOutputter = output(changes); ChangeOutputter changeOutputter = changesOutputter.change(6); - PositionWithColumnsChange position = - (PositionWithColumnsChange) fieldPosition.get(changeOutputter); + PositionWithColumnsChange position = + (PositionWithColumnsChange) fieldPosition.get(changeOutputter); Assertions.assertThat(fieldIndex.get(position)).isEqualTo(0); ChangeColumnOutputter changeColumnOutputter0 = changeOutputter.columnAmongTheModifiedOnes(0); Assertions.assertThat(fieldIndex.get(position)).isEqualTo(1); @@ -233,8 +232,8 @@ public void test_column_among_the_modified_ones_with_index_with_displays() throw ChangesOutputter changesOutputterBis = output(changes); ChangeOutputter changeOutputterBis = changesOutputterBis.change(6); - PositionWithColumnsChange positionBis = - (PositionWithColumnsChange) fieldPosition.get(changeOutputterBis); + PositionWithColumnsChange positionBis = + (PositionWithColumnsChange) fieldPosition.get(changeOutputterBis); Assertions.assertThat(fieldIndex.get(positionBis)).isEqualTo(0); ChangeColumnOutputter changeColumnOutputterBis0 = changeOutputterBis.columnAmongTheModifiedOnes(0); Assertions.assertThat(fieldIndex.get(positionBis)).isEqualTo(1); @@ -262,35 +261,35 @@ public void test_column_among_the_modified_ones_with_index_with_displays() throw Assertions.assertThat(changeColumnOutputterBis0).isSameAs(changeColumnOutputterBisAgain0); Assertions.assertThat(fieldColumnName.get(changeColumnOutputter0)).isEqualTo(fieldColumnName.get(changeColumnOutputterBis0)).isEqualTo( - "ID"); + "ID"); Assertions.assertThat(fieldColumnName.get(changeColumnOutputter1)).isEqualTo(fieldColumnName.get(changeColumnOutputterBis1)).isEqualTo( - "NAME"); + "NAME"); Assertions.assertThat(fieldColumnName.get(changeColumnOutputter2)).isEqualTo(fieldColumnName.get(changeColumnOutputterBis2)).isEqualTo( - "FIRSTNAME"); + "FIRSTNAME"); Assertions.assertThat(fieldColumnName.get(changeColumnOutputter3)).isEqualTo( - fieldColumnName.get(changeColumnOutputterBis3)).isEqualTo( - "BIRTH"); + fieldColumnName.get(changeColumnOutputterBis3)).isEqualTo( + "BIRTH"); Assertions.assertThat(fieldColumnName.get(changeColumnOutputter4)).isEqualTo( - fieldColumnName.get(changeColumnOutputterBis4)).isEqualTo( - "ACTOR_IMDB"); + fieldColumnName.get(changeColumnOutputterBis4)).isEqualTo( + "ACTOR_IMDB"); Assertions.assertThat(((Value) fieldValueAtStartPoint.get(changeColumnOutputter0)).getValue()).isEqualTo( - ((Value) fieldValueAtStartPoint.get(changeColumnOutputterBis0)).getValue()).isEqualTo( - new BigDecimal("3")); + ((Value) fieldValueAtStartPoint.get(changeColumnOutputterBis0)).getValue()).isEqualTo( + new BigDecimal("3")); Assertions.assertThat(((Value) fieldValueAtStartPoint.get(changeColumnOutputter1)).getValue()). - isEqualTo(((Value) fieldValueAtStartPoint.get(changeColumnOutputterBis1)).getValue()). - isEqualTo("Worthington"); + isEqualTo(((Value) fieldValueAtStartPoint.get(changeColumnOutputterBis1)).getValue()). + isEqualTo("Worthington"); Assertions.assertThat(((Value) fieldValueAtStartPoint.get(changeColumnOutputter2)).getValue()). - isEqualTo(((Value) fieldValueAtStartPoint.get(changeColumnOutputterBis2)).getValue()). - isEqualTo("Sam"); + isEqualTo(((Value) fieldValueAtStartPoint.get(changeColumnOutputterBis2)).getValue()). + isEqualTo("Sam"); Assertions.assertThat(((Value) fieldValueAtStartPoint.get(changeColumnOutputter3)).getValue()). - isEqualTo(((Value) fieldValueAtStartPoint.get(changeColumnOutputterBis3)).getValue()). - isEqualTo( - Date.valueOf("1976-08-02")); + isEqualTo(((Value) fieldValueAtStartPoint.get(changeColumnOutputterBis3)).getValue()). + isEqualTo( + Date.valueOf("1976-08-02")); Assertions.assertThat(((Value) fieldValueAtStartPoint.get(changeColumnOutputter4)).getValue()). - isEqualTo(((Value) fieldValueAtStartPoint.get(changeColumnOutputterBis4)).getValue()). - isEqualTo( - UUID.fromString("D735221B-5DE5-4112-AA1E-49090CB75ADA")); + isEqualTo(((Value) fieldValueAtStartPoint.get(changeColumnOutputterBis4)).getValue()). + isEqualTo( + UUID.fromString("D735221B-5DE5-4112-AA1E-49090CB75ADA")); Assertions.assertThat(((Value) fieldValueAtEndPoint.get(changeColumnOutputter0)).getValue()).isNull(); @@ -313,6 +312,6 @@ public void test_column_among_the_modified_ones_with_index_with_displays() throw } Assertions.assertThat(((Value) fieldValueAtStartPoint.get(changeColumnOutputter)).getValue()).isEqualTo("Sigourney"); Assertions.assertThat(((Value) fieldValueAtEndPoint.get(changeColumnOutputter)).getValue()).isEqualTo( - "Susan Alexandra"); + "Susan Alexandra"); } } diff --git a/src/test/java/org/assertj/db/navigation/ToColumnFromChange_ColumnAmongTheModifiedOnes_String_Test.java b/src/test/java/org/assertj/db/navigation/ToColumnFromChange_ColumnAmongTheModifiedOnes_String_Test.java index aeeb1184..5e49c2c2 100644 --- a/src/test/java/org/assertj/db/navigation/ToColumnFromChange_ColumnAmongTheModifiedOnes_String_Test.java +++ b/src/test/java/org/assertj/db/navigation/ToColumnFromChange_ColumnAmongTheModifiedOnes_String_Test.java @@ -8,10 +8,18 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.navigation; +import static org.assertj.db.api.Assertions.assertThat; +import static org.assertj.db.output.Outputs.output; +import static org.junit.Assert.fail; + +import java.lang.reflect.Field; +import java.math.BigDecimal; +import java.sql.Date; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeAssert; import org.assertj.db.api.ChangeColumnAssert; @@ -26,20 +34,11 @@ import org.assertj.db.type.Value; import org.junit.Test; -import java.lang.reflect.Field; -import java.math.BigDecimal; -import java.sql.Date; - -import static org.assertj.db.api.Assertions.assertThat; -import static org.assertj.db.output.Outputs.output; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.navigation.ToColumnFromChange} class : * {@link org.assertj.db.navigation.ToColumnFromChange#columnAmongTheModifiedOnes()} method. * * @author Régis Pouiller - * */ public class ToColumnFromChange_ColumnAmongTheModifiedOnes_String_Test extends AbstractTest { @@ -66,8 +65,8 @@ public void test_column_among_the_modified_ones_with_column_name_with_assertions ChangesAssert changesAssert = assertThat(changes); ChangeAssert changeAssert = changesAssert.change(); - PositionWithColumnsChange position = - (PositionWithColumnsChange) fieldPosition.get(changeAssert); + PositionWithColumnsChange position = + (PositionWithColumnsChange) fieldPosition.get(changeAssert); Assertions.assertThat(fieldIndex.get(position)).isEqualTo(0); ChangeColumnAssert changeColumnAssert0 = changeAssert.columnAmongTheModifiedOnes("ID"); Assertions.assertThat(fieldIndex.get(position)).isEqualTo(1); @@ -82,8 +81,8 @@ public void test_column_among_the_modified_ones_with_column_name_with_assertions fail("An exception must be raised"); } catch (AssertJDBException e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("Column does not exist among the modified columns%n" - + "in <[ID, NAME, FIRSTNAME, BIRTH, ACTOR_IMDB]>%n" - + "with comparison IGNORE - Ignore the case")); + + "in <[ID, NAME, FIRSTNAME, BIRTH, ACTOR_IMDB]>%n" + + "with comparison IGNORE - Ignore the case")); } try { changeAssert.columnAmongTheModifiedOnes(null); @@ -94,8 +93,8 @@ public void test_column_among_the_modified_ones_with_column_name_with_assertions ChangesAssert changesAssertBis = assertThat(changes); ChangeAssert changeAssertBis = changesAssertBis.change(); - PositionWithColumnsChange positionBis = - (PositionWithColumnsChange) fieldPosition.get(changeAssertBis); + PositionWithColumnsChange positionBis = + (PositionWithColumnsChange) fieldPosition.get(changeAssertBis); Assertions.assertThat(fieldIndex.get(positionBis)).isEqualTo(0); ChangeColumnAssert changeColumnAssertBis0 = changeAssertBis.columnAmongTheModifiedOnes("ID"); Assertions.assertThat(fieldIndex.get(positionBis)).isEqualTo(1); @@ -110,8 +109,8 @@ public void test_column_among_the_modified_ones_with_column_name_with_assertions fail("An exception must be raised"); } catch (AssertJDBException e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("Column does not exist among the modified columns%n" - + "in <[ID, NAME, FIRSTNAME, BIRTH, ACTOR_IMDB]>%n" - + "with comparison IGNORE - Ignore the case")); + + "in <[ID, NAME, FIRSTNAME, BIRTH, ACTOR_IMDB]>%n" + + "with comparison IGNORE - Ignore the case")); } try { changeColumnAssertBis3.columnAmongTheModifiedOnes(null); @@ -121,13 +120,13 @@ public void test_column_among_the_modified_ones_with_column_name_with_assertions } Assertions.assertThat(fieldColumnName.get(changeColumnAssert0)).isEqualTo(fieldColumnName.get(changeColumnAssertBis0)).isEqualTo( - "ID"); + "ID"); Assertions.assertThat(fieldColumnName.get(changeColumnAssert1)).isEqualTo(fieldColumnName.get(changeColumnAssertBis1)).isEqualTo( - "NAME"); + "NAME"); Assertions.assertThat(fieldColumnName.get(changeColumnAssert2)).isEqualTo(fieldColumnName.get(changeColumnAssertBis2)).isEqualTo( - "FIRSTNAME"); + "FIRSTNAME"); Assertions.assertThat(fieldColumnName.get(changeColumnAssert3)).isEqualTo(fieldColumnName.get(changeColumnAssertBis3)).isEqualTo( - "BIRTH"); + "BIRTH"); Assertions.assertThat(((Value) fieldValueAtStartPoint.get(changeColumnAssert0)).getValue()).isNull(); Assertions.assertThat(((Value) fieldValueAtStartPoint.get(changeColumnAssert1)).getValue()).isNull(); @@ -139,18 +138,18 @@ public void test_column_among_the_modified_ones_with_column_name_with_assertions Assertions.assertThat(((Value) fieldValueAtStartPoint.get(changeColumnAssertBis3)).getValue()).isNull(); Assertions.assertThat(((Value) fieldValueAtEndPoint.get(changeColumnAssert0)).getValue()).isEqualTo( - ((Value) fieldValueAtEndPoint.get(changeColumnAssertBis0)).getValue()).isEqualTo( - new BigDecimal("4")); + ((Value) fieldValueAtEndPoint.get(changeColumnAssertBis0)).getValue()).isEqualTo( + new BigDecimal("4")); Assertions.assertThat(((Value) fieldValueAtEndPoint.get(changeColumnAssert1)).getValue()). - isEqualTo(((Value) fieldValueAtEndPoint.get(changeColumnAssertBis1)).getValue()). - isEqualTo("Murray"); + isEqualTo(((Value) fieldValueAtEndPoint.get(changeColumnAssertBis1)).getValue()). + isEqualTo("Murray"); Assertions.assertThat(((Value) fieldValueAtEndPoint.get(changeColumnAssert2)).getValue()). - isEqualTo(((Value) fieldValueAtEndPoint.get(changeColumnAssertBis2)).getValue()). - isEqualTo("Bill"); + isEqualTo(((Value) fieldValueAtEndPoint.get(changeColumnAssertBis2)).getValue()). + isEqualTo("Bill"); Assertions.assertThat(((Value) fieldValueAtEndPoint.get(changeColumnAssert3)).getValue()). - isEqualTo(((Value) fieldValueAtEndPoint.get(changeColumnAssertBis3)).getValue()). - isEqualTo( - Date.valueOf("1950-09-21")); + isEqualTo(((Value) fieldValueAtEndPoint.get(changeColumnAssertBis3)).getValue()). + isEqualTo( + Date.valueOf("1950-09-21")); ChangeColumnAssert changeColumnAssert = assertThat(changes).change(3).columnAmongTheModifiedOnes("firstname"); try { @@ -158,12 +157,12 @@ public void test_column_among_the_modified_ones_with_column_name_with_assertions fail("An exception must be raised"); } catch (AssertJDBException e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("Column does not exist among the modified columns%n" - + "in <[FIRSTNAME]>%n" - + "with comparison IGNORE - Ignore the case")); + + "in <[FIRSTNAME]>%n" + + "with comparison IGNORE - Ignore the case")); } Assertions.assertThat(((Value) fieldValueAtStartPoint.get(changeColumnAssert)).getValue()).isEqualTo("Sigourney"); Assertions.assertThat(((Value) fieldValueAtEndPoint.get(changeColumnAssert)).getValue()).isEqualTo( - "Susan Alexandra"); + "Susan Alexandra"); } /** @@ -189,8 +188,8 @@ public void test_column_among_the_modified_ones_with_column_name_with_displays() ChangesOutputter changesDisplay = output(changes); ChangeOutputter changeDisplay = changesDisplay.change(); - PositionWithColumnsChange position = - (PositionWithColumnsChange) fieldPosition.get(changeDisplay); + PositionWithColumnsChange position = + (PositionWithColumnsChange) fieldPosition.get(changeDisplay); Assertions.assertThat(fieldIndex.get(position)).isEqualTo(0); ChangeColumnOutputter changeColumnDisplay0 = changeDisplay.columnAmongTheModifiedOnes("ID"); Assertions.assertThat(fieldIndex.get(position)).isEqualTo(1); @@ -205,8 +204,8 @@ public void test_column_among_the_modified_ones_with_column_name_with_displays() fail("An exception must be raised"); } catch (AssertJDBException e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("Column does not exist among the modified columns%n" - + "in <[ID, NAME, FIRSTNAME, BIRTH, ACTOR_IMDB]>%n" - + "with comparison IGNORE - Ignore the case")); + + "in <[ID, NAME, FIRSTNAME, BIRTH, ACTOR_IMDB]>%n" + + "with comparison IGNORE - Ignore the case")); } try { changeDisplay.columnAmongTheModifiedOnes(null); @@ -217,8 +216,8 @@ public void test_column_among_the_modified_ones_with_column_name_with_displays() ChangesOutputter changesDisplayBis = output(changes); ChangeOutputter changeDisplayBis = changesDisplayBis.change(); - PositionWithColumnsChange positionBis = - (PositionWithColumnsChange) fieldPosition.get(changeDisplayBis); + PositionWithColumnsChange positionBis = + (PositionWithColumnsChange) fieldPosition.get(changeDisplayBis); Assertions.assertThat(fieldIndex.get(positionBis)).isEqualTo(0); ChangeColumnOutputter changeColumnDisplayBis0 = changeDisplayBis.columnAmongTheModifiedOnes("ID"); Assertions.assertThat(fieldIndex.get(positionBis)).isEqualTo(1); @@ -233,8 +232,8 @@ public void test_column_among_the_modified_ones_with_column_name_with_displays() fail("An exception must be raised"); } catch (AssertJDBException e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("Column does not exist among the modified columns%n" - + "in <[ID, NAME, FIRSTNAME, BIRTH, ACTOR_IMDB]>%n" - + "with comparison IGNORE - Ignore the case")); + + "in <[ID, NAME, FIRSTNAME, BIRTH, ACTOR_IMDB]>%n" + + "with comparison IGNORE - Ignore the case")); } try { changeColumnDisplayBis3.columnAmongTheModifiedOnes(null); @@ -244,13 +243,13 @@ public void test_column_among_the_modified_ones_with_column_name_with_displays() } Assertions.assertThat(fieldColumnName.get(changeColumnDisplay0)).isEqualTo(fieldColumnName.get(changeColumnDisplayBis0)).isEqualTo( - "ID"); + "ID"); Assertions.assertThat(fieldColumnName.get(changeColumnDisplay1)).isEqualTo(fieldColumnName.get(changeColumnDisplayBis1)).isEqualTo( - "NAME"); + "NAME"); Assertions.assertThat(fieldColumnName.get(changeColumnDisplay2)).isEqualTo(fieldColumnName.get(changeColumnDisplayBis2)).isEqualTo( - "FIRSTNAME"); + "FIRSTNAME"); Assertions.assertThat(fieldColumnName.get(changeColumnDisplay3)).isEqualTo(fieldColumnName.get(changeColumnDisplayBis3)).isEqualTo( - "BIRTH"); + "BIRTH"); Assertions.assertThat(((Value) fieldValueAtStartPoint.get(changeColumnDisplay0)).getValue()).isNull(); Assertions.assertThat(((Value) fieldValueAtStartPoint.get(changeColumnDisplay1)).getValue()).isNull(); @@ -262,18 +261,18 @@ public void test_column_among_the_modified_ones_with_column_name_with_displays() Assertions.assertThat(((Value) fieldValueAtStartPoint.get(changeColumnDisplayBis3)).getValue()).isNull(); Assertions.assertThat(((Value) fieldValueAtEndPoint.get(changeColumnDisplay0)).getValue()).isEqualTo( - ((Value) fieldValueAtEndPoint.get(changeColumnDisplayBis0)).getValue()).isEqualTo( - new BigDecimal("4")); + ((Value) fieldValueAtEndPoint.get(changeColumnDisplayBis0)).getValue()).isEqualTo( + new BigDecimal("4")); Assertions.assertThat(((Value) fieldValueAtEndPoint.get(changeColumnDisplay1)).getValue()). - isEqualTo(((Value) fieldValueAtEndPoint.get(changeColumnDisplayBis1)).getValue()). - isEqualTo("Murray"); + isEqualTo(((Value) fieldValueAtEndPoint.get(changeColumnDisplayBis1)).getValue()). + isEqualTo("Murray"); Assertions.assertThat(((Value) fieldValueAtEndPoint.get(changeColumnDisplay2)).getValue()). - isEqualTo(((Value) fieldValueAtEndPoint.get(changeColumnDisplayBis2)).getValue()). - isEqualTo("Bill"); + isEqualTo(((Value) fieldValueAtEndPoint.get(changeColumnDisplayBis2)).getValue()). + isEqualTo("Bill"); Assertions.assertThat(((Value) fieldValueAtEndPoint.get(changeColumnDisplay3)).getValue()). - isEqualTo(((Value) fieldValueAtEndPoint.get(changeColumnDisplayBis3)).getValue()). - isEqualTo( - Date.valueOf("1950-09-21")); + isEqualTo(((Value) fieldValueAtEndPoint.get(changeColumnDisplayBis3)).getValue()). + isEqualTo( + Date.valueOf("1950-09-21")); ChangeColumnOutputter changeColumnDisplay = output(changes).change(3).columnAmongTheModifiedOnes("firstname"); try { @@ -281,11 +280,11 @@ public void test_column_among_the_modified_ones_with_column_name_with_displays() fail("An exception must be raised"); } catch (AssertJDBException e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("Column does not exist among the modified columns%n" - + "in <[FIRSTNAME]>%n" - + "with comparison IGNORE - Ignore the case")); + + "in <[FIRSTNAME]>%n" + + "with comparison IGNORE - Ignore the case")); } Assertions.assertThat(((Value) fieldValueAtStartPoint.get(changeColumnDisplay)).getValue()).isEqualTo("Sigourney"); Assertions.assertThat(((Value) fieldValueAtEndPoint.get(changeColumnDisplay)).getValue()).isEqualTo( - "Susan Alexandra"); + "Susan Alexandra"); } } diff --git a/src/test/java/org/assertj/db/navigation/ToColumnFromChange_ColumnAmongTheModifiedOnes_Test.java b/src/test/java/org/assertj/db/navigation/ToColumnFromChange_ColumnAmongTheModifiedOnes_Test.java index 4551ed1f..dbeda675 100644 --- a/src/test/java/org/assertj/db/navigation/ToColumnFromChange_ColumnAmongTheModifiedOnes_Test.java +++ b/src/test/java/org/assertj/db/navigation/ToColumnFromChange_ColumnAmongTheModifiedOnes_Test.java @@ -8,10 +8,19 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.navigation; +import static org.assertj.db.api.Assertions.assertThat; +import static org.assertj.db.output.Outputs.output; +import static org.junit.Assert.fail; + +import java.lang.reflect.Field; +import java.math.BigDecimal; +import java.sql.Date; +import java.util.UUID; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeAssert; import org.assertj.db.api.ChangeColumnAssert; @@ -26,21 +35,11 @@ import org.assertj.db.type.Value; import org.junit.Test; -import java.lang.reflect.Field; -import java.math.BigDecimal; -import java.sql.Date; -import java.util.UUID; - -import static org.assertj.db.api.Assertions.assertThat; -import static org.assertj.db.output.Outputs.output; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.navigation.ToColumnFromChange} class : * {@link org.assertj.db.navigation.ToColumnFromChange#columnAmongTheModifiedOnes()} method. * * @author Régis Pouiller - * */ public class ToColumnFromChange_ColumnAmongTheModifiedOnes_Test extends AbstractTest { @@ -67,8 +66,8 @@ public void test_column_among_the_modified_ones_with_assertions() throws Excepti ChangesAssert changesAssert = assertThat(changes); ChangeAssert changeAssert = changesAssert.change(); - PositionWithColumnsChange position = - (PositionWithColumnsChange) fieldPosition.get(changeAssert); + PositionWithColumnsChange position = + (PositionWithColumnsChange) fieldPosition.get(changeAssert); Assertions.assertThat(fieldIndex.get(position)).isEqualTo(0); ChangeColumnAssert changeColumnAssert0 = changeAssert.columnAmongTheModifiedOnes(); Assertions.assertThat(fieldIndex.get(position)).isEqualTo(1); @@ -89,8 +88,8 @@ public void test_column_among_the_modified_ones_with_assertions() throws Excepti ChangesAssert changesAssertBis = assertThat(changes); ChangeAssert changeAssertBis = changesAssertBis.change(); - PositionWithColumnsChange positionBis = - (PositionWithColumnsChange) fieldPosition.get(changeAssertBis); + PositionWithColumnsChange positionBis = + (PositionWithColumnsChange) fieldPosition.get(changeAssertBis); Assertions.assertThat(fieldIndex.get(positionBis)).isEqualTo(0); ChangeColumnAssert changeColumnAssertBis0 = changeAssertBis.columnAmongTheModifiedOnes(); Assertions.assertThat(fieldIndex.get(positionBis)).isEqualTo(1); @@ -110,15 +109,15 @@ public void test_column_among_the_modified_ones_with_assertions() throws Excepti } Assertions.assertThat(fieldColumnName.get(changeColumnAssert0)).isEqualTo(fieldColumnName.get(changeColumnAssertBis0)).isEqualTo( - "ID"); + "ID"); Assertions.assertThat(fieldColumnName.get(changeColumnAssert1)).isEqualTo(fieldColumnName.get(changeColumnAssertBis1)).isEqualTo( - "NAME"); + "NAME"); Assertions.assertThat(fieldColumnName.get(changeColumnAssert2)).isEqualTo(fieldColumnName.get(changeColumnAssertBis2)).isEqualTo( - "FIRSTNAME"); + "FIRSTNAME"); Assertions.assertThat(fieldColumnName.get(changeColumnAssert3)).isEqualTo(fieldColumnName.get(changeColumnAssertBis3)).isEqualTo( - "BIRTH"); + "BIRTH"); Assertions.assertThat(fieldColumnName.get(changeColumnAssert4)).isEqualTo(fieldColumnName.get(changeColumnAssertBis4)).isEqualTo( - "ACTOR_IMDB"); + "ACTOR_IMDB"); Assertions.assertThat(((Value) fieldValueAtStartPoint.get(changeColumnAssert0)).getValue()).isNull(); Assertions.assertThat(((Value) fieldValueAtStartPoint.get(changeColumnAssert1)).getValue()).isNull(); @@ -132,21 +131,21 @@ public void test_column_among_the_modified_ones_with_assertions() throws Excepti Assertions.assertThat(((Value) fieldValueAtStartPoint.get(changeColumnAssertBis4)).getValue()).isNull(); Assertions.assertThat(((Value) fieldValueAtEndPoint.get(changeColumnAssert0)).getValue()).isEqualTo( - ((Value) fieldValueAtEndPoint.get(changeColumnAssertBis0)).getValue()).isEqualTo( - new BigDecimal("4")); + ((Value) fieldValueAtEndPoint.get(changeColumnAssertBis0)).getValue()).isEqualTo( + new BigDecimal("4")); Assertions.assertThat(((Value) fieldValueAtEndPoint.get(changeColumnAssert1)).getValue()). - isEqualTo(((Value) fieldValueAtEndPoint.get(changeColumnAssertBis1)).getValue()).isEqualTo( - "Murray"); + isEqualTo(((Value) fieldValueAtEndPoint.get(changeColumnAssertBis1)).getValue()).isEqualTo( + "Murray"); Assertions.assertThat(((Value) fieldValueAtEndPoint.get(changeColumnAssert2)).getValue()). - isEqualTo(((Value) fieldValueAtEndPoint.get(changeColumnAssertBis2)).getValue()).isEqualTo( - "Bill"); + isEqualTo(((Value) fieldValueAtEndPoint.get(changeColumnAssertBis2)).getValue()).isEqualTo( + "Bill"); Assertions.assertThat(((Value) fieldValueAtEndPoint.get(changeColumnAssert3)).getValue()). - isEqualTo(((Value) fieldValueAtEndPoint.get(changeColumnAssertBis3)).getValue()).isEqualTo( - Date.valueOf("1950-09-21")); + isEqualTo(((Value) fieldValueAtEndPoint.get(changeColumnAssertBis3)).getValue()).isEqualTo( + Date.valueOf("1950-09-21")); Assertions.assertThat(((Value) fieldValueAtEndPoint.get(changeColumnAssert4)).getValue()). - isEqualTo(((Value) fieldValueAtEndPoint.get(changeColumnAssertBis4)).getValue()). - isEqualTo( - UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")); + isEqualTo(((Value) fieldValueAtEndPoint.get(changeColumnAssertBis4)).getValue()). + isEqualTo( + UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")); ChangeColumnAssert changeColumnAssert = assertThat(changes).change(3).columnAmongTheModifiedOnes(); try { @@ -157,7 +156,7 @@ public void test_column_among_the_modified_ones_with_assertions() throws Excepti } Assertions.assertThat(((Value) fieldValueAtStartPoint.get(changeColumnAssert)).getValue()).isEqualTo("Sigourney"); Assertions.assertThat(((Value) fieldValueAtEndPoint.get(changeColumnAssert)).getValue()).isEqualTo( - "Susan Alexandra"); + "Susan Alexandra"); } /** @@ -183,8 +182,8 @@ public void test_column_among_the_modified_ones_with_displays() throws Exception ChangesOutputter changesOutputter = output(changes); ChangeOutputter changeOutputter = changesOutputter.change(); - PositionWithColumnsChange position = - (PositionWithColumnsChange) fieldPosition.get(changeOutputter); + PositionWithColumnsChange position = + (PositionWithColumnsChange) fieldPosition.get(changeOutputter); Assertions.assertThat(fieldIndex.get(position)).isEqualTo(0); ChangeColumnOutputter changeColumnOutputter0 = changeOutputter.columnAmongTheModifiedOnes(); Assertions.assertThat(fieldIndex.get(position)).isEqualTo(1); @@ -205,8 +204,8 @@ public void test_column_among_the_modified_ones_with_displays() throws Exception ChangesOutputter changesOutputterBis = output(changes); ChangeOutputter changeOutputterBis = changesOutputterBis.change(); - PositionWithColumnsChange positionBis = - (PositionWithColumnsChange) fieldPosition.get(changeOutputterBis); + PositionWithColumnsChange positionBis = + (PositionWithColumnsChange) fieldPosition.get(changeOutputterBis); Assertions.assertThat(fieldIndex.get(positionBis)).isEqualTo(0); ChangeColumnOutputter changeColumnOutputterBis0 = changeOutputterBis.columnAmongTheModifiedOnes(); Assertions.assertThat(fieldIndex.get(positionBis)).isEqualTo(1); @@ -226,15 +225,15 @@ public void test_column_among_the_modified_ones_with_displays() throws Exception } Assertions.assertThat(fieldColumnName.get(changeColumnOutputter0)).isEqualTo(fieldColumnName.get(changeColumnOutputterBis0)).isEqualTo( - "ID"); + "ID"); Assertions.assertThat(fieldColumnName.get(changeColumnOutputter1)).isEqualTo(fieldColumnName.get(changeColumnOutputterBis1)).isEqualTo( - "NAME"); + "NAME"); Assertions.assertThat(fieldColumnName.get(changeColumnOutputter2)).isEqualTo(fieldColumnName.get(changeColumnOutputterBis2)).isEqualTo( - "FIRSTNAME"); + "FIRSTNAME"); Assertions.assertThat(fieldColumnName.get(changeColumnOutputter3)).isEqualTo(fieldColumnName.get(changeColumnOutputterBis3)).isEqualTo( - "BIRTH"); + "BIRTH"); Assertions.assertThat(fieldColumnName.get(changeColumnOutputter4)).isEqualTo(fieldColumnName.get(changeColumnOutputterBis4)).isEqualTo( - "ACTOR_IMDB"); + "ACTOR_IMDB"); Assertions.assertThat(((Value) fieldValueAtStartPoint.get(changeColumnOutputter0)).getValue()).isNull(); Assertions.assertThat(((Value) fieldValueAtStartPoint.get(changeColumnOutputter1)).getValue()).isNull(); @@ -248,21 +247,21 @@ public void test_column_among_the_modified_ones_with_displays() throws Exception Assertions.assertThat(((Value) fieldValueAtStartPoint.get(changeColumnOutputterBis4)).getValue()).isNull(); Assertions.assertThat(((Value) fieldValueAtEndPoint.get(changeColumnOutputter0)).getValue()).isEqualTo( - ((Value) fieldValueAtEndPoint.get(changeColumnOutputterBis0)).getValue()).isEqualTo( - new BigDecimal("4")); + ((Value) fieldValueAtEndPoint.get(changeColumnOutputterBis0)).getValue()).isEqualTo( + new BigDecimal("4")); Assertions.assertThat(((Value) fieldValueAtEndPoint.get(changeColumnOutputter1)).getValue()). - isEqualTo(((Value) fieldValueAtEndPoint.get(changeColumnOutputterBis1)).getValue()).isEqualTo( - "Murray"); + isEqualTo(((Value) fieldValueAtEndPoint.get(changeColumnOutputterBis1)).getValue()).isEqualTo( + "Murray"); Assertions.assertThat(((Value) fieldValueAtEndPoint.get(changeColumnOutputter2)).getValue()). - isEqualTo(((Value) fieldValueAtEndPoint.get(changeColumnOutputterBis2)).getValue()).isEqualTo( - "Bill"); + isEqualTo(((Value) fieldValueAtEndPoint.get(changeColumnOutputterBis2)).getValue()).isEqualTo( + "Bill"); Assertions.assertThat(((Value) fieldValueAtEndPoint.get(changeColumnOutputter3)).getValue()). - isEqualTo(((Value) fieldValueAtEndPoint.get(changeColumnOutputterBis3)).getValue()).isEqualTo( - Date.valueOf("1950-09-21")); + isEqualTo(((Value) fieldValueAtEndPoint.get(changeColumnOutputterBis3)).getValue()).isEqualTo( + Date.valueOf("1950-09-21")); Assertions.assertThat(((Value) fieldValueAtEndPoint.get(changeColumnOutputter4)).getValue()). - isEqualTo(((Value) fieldValueAtEndPoint.get(changeColumnOutputterBis4)).getValue()). - isEqualTo( - UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")); + isEqualTo(((Value) fieldValueAtEndPoint.get(changeColumnOutputterBis4)).getValue()). + isEqualTo( + UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")); ChangeColumnOutputter changeColumnOutputter = output(changes).change(3).columnAmongTheModifiedOnes(); try { @@ -273,6 +272,6 @@ public void test_column_among_the_modified_ones_with_displays() throws Exception } Assertions.assertThat(((Value) fieldValueAtStartPoint.get(changeColumnOutputter)).getValue()).isEqualTo("Sigourney"); Assertions.assertThat(((Value) fieldValueAtEndPoint.get(changeColumnOutputter)).getValue()).isEqualTo( - "Susan Alexandra"); + "Susan Alexandra"); } } diff --git a/src/test/java/org/assertj/db/navigation/ToColumn_Column_Integer_Test.java b/src/test/java/org/assertj/db/navigation/ToColumn_Column_Integer_Test.java index ea1c600b..4f1d4150 100644 --- a/src/test/java/org/assertj/db/navigation/ToColumn_Column_Integer_Test.java +++ b/src/test/java/org/assertj/db/navigation/ToColumn_Column_Integer_Test.java @@ -8,34 +8,54 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.navigation; -import org.assertj.core.api.Assertions; -import org.assertj.db.api.*; -import org.assertj.db.common.AbstractTest; -import org.assertj.db.common.NeedReload; -import org.assertj.db.exception.AssertJDBException; -import org.assertj.db.output.*; -import org.assertj.db.type.*; -import org.junit.Test; +import static org.assertj.db.api.Assertions.assertThat; +import static org.assertj.db.output.Outputs.output; +import static org.junit.Assert.fail; import java.lang.reflect.Field; import java.math.BigDecimal; import java.sql.Date; import java.util.UUID; -import static org.assertj.db.api.Assertions.assertThat; -import static org.assertj.db.output.Outputs.output; -import static org.junit.Assert.fail; +import org.assertj.core.api.Assertions; +import org.assertj.db.api.AbstractColumnAssert; +import org.assertj.db.api.AbstractDbAssert; +import org.assertj.db.api.ChangeAssert; +import org.assertj.db.api.ChangeColumnAssert; +import org.assertj.db.api.ChangesAssert; +import org.assertj.db.api.RequestAssert; +import org.assertj.db.api.RequestColumnAssert; +import org.assertj.db.api.TableAssert; +import org.assertj.db.api.TableColumnAssert; +import org.assertj.db.common.AbstractTest; +import org.assertj.db.common.NeedReload; +import org.assertj.db.exception.AssertJDBException; +import org.assertj.db.output.AbstractColumnOutputter; +import org.assertj.db.output.AbstractDbOutputter; +import org.assertj.db.output.ChangeColumnOutputter; +import org.assertj.db.output.ChangeOutputter; +import org.assertj.db.output.ChangesOutputter; +import org.assertj.db.output.Outputs; +import org.assertj.db.output.RequestColumnOutputter; +import org.assertj.db.output.RequestOutputter; +import org.assertj.db.output.TableColumnOutputter; +import org.assertj.db.output.TableOutputter; +import org.assertj.db.type.Changes; +import org.assertj.db.type.Column; +import org.assertj.db.type.Request; +import org.assertj.db.type.Table; +import org.assertj.db.type.Value; +import org.junit.Test; /** * Tests on {@link org.assertj.db.navigation.ToColumn} class : * {@link org.assertj.db.navigation.ToColumn#column(int)} method. * * @author Régis Pouiller - * */ public class ToColumn_Column_Integer_Test extends AbstractTest { @@ -62,8 +82,8 @@ public void test_column_with_index_from_change_with_assertions() throws Exceptio ChangesAssert changesAssert = assertThat(changes); ChangeAssert changeAssert = changesAssert.change(6); - PositionWithColumnsChange position = - (PositionWithColumnsChange) fieldPosition.get(changeAssert); + PositionWithColumnsChange position = + (PositionWithColumnsChange) fieldPosition.get(changeAssert); Assertions.assertThat(fieldIndex.get(position)).isEqualTo(0); ChangeColumnAssert changeColumnAssert0 = changeAssert.column(0); Assertions.assertThat(fieldIndex.get(position)).isEqualTo(1); @@ -92,8 +112,8 @@ public void test_column_with_index_from_change_with_assertions() throws Exceptio ChangesAssert changesAssertBis = assertThat(changes); ChangeAssert changeAssertBis = changesAssertBis.change(6); - PositionWithColumnsChange positionBis = - (PositionWithColumnsChange) fieldPosition.get(changeAssertBis); + PositionWithColumnsChange positionBis = + (PositionWithColumnsChange) fieldPosition.get(changeAssertBis); Assertions.assertThat(fieldIndex.get(positionBis)).isEqualTo(0); ChangeColumnAssert changeColumnAssertBis0 = changeAssertBis.column(0); Assertions.assertThat(fieldIndex.get(positionBis)).isEqualTo(1); @@ -121,33 +141,33 @@ public void test_column_with_index_from_change_with_assertions() throws Exceptio Assertions.assertThat(changeColumnAssertBis0).isSameAs(changeColumnAssertBisAgain0); Assertions.assertThat(fieldColumnName.get(changeColumnAssert0)).isEqualTo(fieldColumnName.get(changeColumnAssertBis0)).isEqualTo( - "ID"); + "ID"); Assertions.assertThat(fieldColumnName.get(changeColumnAssert1)).isEqualTo(fieldColumnName.get(changeColumnAssertBis1)).isEqualTo( - "NAME"); + "NAME"); Assertions.assertThat(fieldColumnName.get(changeColumnAssert2)).isEqualTo(fieldColumnName.get(changeColumnAssertBis2)).isEqualTo( - "FIRSTNAME"); + "FIRSTNAME"); Assertions.assertThat(fieldColumnName.get(changeColumnAssert3)).isEqualTo( - fieldColumnName.get(changeColumnAssertBis3)).isEqualTo( - "BIRTH"); + fieldColumnName.get(changeColumnAssertBis3)).isEqualTo( + "BIRTH"); Assertions.assertThat(fieldColumnName.get(changeColumnAssert4)).isEqualTo( - fieldColumnName.get(changeColumnAssertBis4)).isEqualTo( - "ACTOR_IMDB"); + fieldColumnName.get(changeColumnAssertBis4)).isEqualTo( + "ACTOR_IMDB"); Assertions.assertThat(((Value) fieldValueAtStartPoint.get(changeColumnAssert0)).getValue()) - .isEqualTo(((Value) fieldValueAtStartPoint.get(changeColumnAssertBis0)).getValue()) - .isEqualTo(new BigDecimal("3")); + .isEqualTo(((Value) fieldValueAtStartPoint.get(changeColumnAssertBis0)).getValue()) + .isEqualTo(new BigDecimal("3")); Assertions.assertThat(((Value) fieldValueAtStartPoint.get(changeColumnAssert1)).getValue()) - .isEqualTo(((Value) fieldValueAtStartPoint.get(changeColumnAssertBis1)).getValue()) - .isEqualTo("Worthington"); + .isEqualTo(((Value) fieldValueAtStartPoint.get(changeColumnAssertBis1)).getValue()) + .isEqualTo("Worthington"); Assertions.assertThat(((Value) fieldValueAtStartPoint.get(changeColumnAssert2)).getValue()) - .isEqualTo(((Value) fieldValueAtStartPoint.get(changeColumnAssertBis2)).getValue()) - .isEqualTo("Sam"); + .isEqualTo(((Value) fieldValueAtStartPoint.get(changeColumnAssertBis2)).getValue()) + .isEqualTo("Sam"); Assertions.assertThat(((Value) fieldValueAtStartPoint.get(changeColumnAssert3)).getValue()) - .isEqualTo(((Value) fieldValueAtStartPoint.get(changeColumnAssertBis3)).getValue()) - .isEqualTo(Date.valueOf("1976-08-02")); + .isEqualTo(((Value) fieldValueAtStartPoint.get(changeColumnAssertBis3)).getValue()) + .isEqualTo(Date.valueOf("1976-08-02")); Assertions.assertThat(((Value) fieldValueAtStartPoint.get(changeColumnAssert4)).getValue()) - .isEqualTo(((Value) fieldValueAtStartPoint.get(changeColumnAssertBis4)).getValue()) - .isEqualTo(UUID.fromString("D735221B-5DE5-4112-AA1E-49090CB75ADA")); + .isEqualTo(((Value) fieldValueAtStartPoint.get(changeColumnAssertBis4)).getValue()) + .isEqualTo(UUID.fromString("D735221B-5DE5-4112-AA1E-49090CB75ADA")); Assertions.assertThat(((Value) fieldValueAtEndPoint.get(changeColumnAssert0)).getValue()).isNull(); Assertions.assertThat(((Value) fieldValueAtEndPoint.get(changeColumnAssert1)).getValue()).isNull(); @@ -175,8 +195,8 @@ public void test_column_with_index_from_table_with_assertions() throws Exception Table table = new Table(source, "actor"); TableAssert tableAssert = assertThat(table); - Position position = - (Position) fieldPosition.get(tableAssert); + Position position = + (Position) fieldPosition.get(tableAssert); Assertions.assertThat(fieldIndex.get(position)).isEqualTo(0); TableColumnAssert tableColumnAssert0 = tableAssert.column(0); Assertions.assertThat(fieldIndex.get(position)).isEqualTo(1); @@ -362,16 +382,16 @@ public void test_column_with_index_from_request_with_assertions() throws Excepti Assertions.assertThat(columnId2.getValuesList().get(2).getValue()).isEqualTo(columnIdBis2.getValuesList().get(2).getValue()).isEqualTo("Sam"); Assertions.assertThat(columnId3.getValuesList().get(0).getValue()).isEqualTo(columnIdBis3.getValuesList().get(0).getValue()).isEqualTo(Date.valueOf("1949-10-08")); Assertions.assertThat(columnId3.getValuesList().get(1).getValue()).isEqualTo(columnIdBis3.getValuesList().get(1).getValue()).isEqualTo( - Date.valueOf("1974-10-28")); + Date.valueOf("1974-10-28")); Assertions.assertThat(columnId3.getValuesList().get(2).getValue()).isEqualTo(columnIdBis3.getValuesList().get(2).getValue()).isEqualTo( - Date.valueOf("1976-08-02")); + Date.valueOf("1976-08-02")); Assertions.assertThat( - columnId4.getValuesList().get(0).getValue()).isEqualTo(columnIdBis4.getValuesList().get(0).getValue()).isEqualTo( - UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")); + columnId4.getValuesList().get(0).getValue()).isEqualTo(columnIdBis4.getValuesList().get(0).getValue()).isEqualTo( + UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")); Assertions.assertThat(columnId4.getValuesList().get(1).getValue()).isEqualTo(columnIdBis4.getValuesList().get(1).getValue()).isEqualTo( - UUID.fromString("16319617-AE95-4087-9264-D3D21BF611B6")); + UUID.fromString("16319617-AE95-4087-9264-D3D21BF611B6")); Assertions.assertThat(columnId4.getValuesList().get(2).getValue()).isEqualTo(columnIdBis4.getValuesList().get(2).getValue()).isEqualTo( - UUID.fromString("D735221B-5DE5-4112-AA1E-49090CB75ADA")); + UUID.fromString("D735221B-5DE5-4112-AA1E-49090CB75ADA")); } /** @@ -397,8 +417,8 @@ public void test_column_with_index_from_change_with_displays() throws Exception ChangesOutputter changesOutputter = output(changes); ChangeOutputter changeOutputter = changesOutputter.change(6); - PositionWithColumnsChange position = - (PositionWithColumnsChange) fieldPosition.get(changeOutputter); + PositionWithColumnsChange position = + (PositionWithColumnsChange) fieldPosition.get(changeOutputter); Assertions.assertThat(fieldIndex.get(position)).isEqualTo(0); ChangeColumnOutputter changeColumnOutputter0 = changeOutputter.column(0); Assertions.assertThat(fieldIndex.get(position)).isEqualTo(1); @@ -427,8 +447,8 @@ public void test_column_with_index_from_change_with_displays() throws Exception ChangesOutputter changesOutputterBis = output(changes); ChangeOutputter changeOutputterBis = changesOutputterBis.change(6); - PositionWithColumnsChange positionBis = - (PositionWithColumnsChange) fieldPosition.get(changeOutputterBis); + PositionWithColumnsChange positionBis = + (PositionWithColumnsChange) fieldPosition.get(changeOutputterBis); Assertions.assertThat(fieldIndex.get(positionBis)).isEqualTo(0); ChangeColumnOutputter changeColumnOutputterBis0 = changeOutputterBis.column(0); Assertions.assertThat(fieldIndex.get(positionBis)).isEqualTo(1); @@ -456,33 +476,33 @@ public void test_column_with_index_from_change_with_displays() throws Exception Assertions.assertThat(changeColumnOutputterBis0).isSameAs(changeColumnOutputterBisAgain0); Assertions.assertThat(fieldColumnName.get(changeColumnOutputter0)).isEqualTo(fieldColumnName.get(changeColumnOutputterBis0)).isEqualTo( - "ID"); + "ID"); Assertions.assertThat(fieldColumnName.get(changeColumnOutputter1)).isEqualTo(fieldColumnName.get(changeColumnOutputterBis1)).isEqualTo( - "NAME"); + "NAME"); Assertions.assertThat(fieldColumnName.get(changeColumnOutputter2)).isEqualTo(fieldColumnName.get(changeColumnOutputterBis2)).isEqualTo( - "FIRSTNAME"); + "FIRSTNAME"); Assertions.assertThat(fieldColumnName.get(changeColumnOutputter3)).isEqualTo( - fieldColumnName.get(changeColumnOutputterBis3)).isEqualTo( - "BIRTH"); + fieldColumnName.get(changeColumnOutputterBis3)).isEqualTo( + "BIRTH"); Assertions.assertThat(fieldColumnName.get(changeColumnOutputter4)).isEqualTo( - fieldColumnName.get(changeColumnOutputterBis4)).isEqualTo( - "ACTOR_IMDB"); + fieldColumnName.get(changeColumnOutputterBis4)).isEqualTo( + "ACTOR_IMDB"); Assertions.assertThat(((Value) fieldValueAtStartPoint.get(changeColumnOutputter0)).getValue()) - .isEqualTo(((Value) fieldValueAtStartPoint.get(changeColumnOutputterBis0)).getValue()) - .isEqualTo(new BigDecimal("3")); + .isEqualTo(((Value) fieldValueAtStartPoint.get(changeColumnOutputterBis0)).getValue()) + .isEqualTo(new BigDecimal("3")); Assertions.assertThat(((Value) fieldValueAtStartPoint.get(changeColumnOutputter1)).getValue()) - .isEqualTo(((Value) fieldValueAtStartPoint.get(changeColumnOutputterBis1)).getValue()) - .isEqualTo("Worthington"); + .isEqualTo(((Value) fieldValueAtStartPoint.get(changeColumnOutputterBis1)).getValue()) + .isEqualTo("Worthington"); Assertions.assertThat(((Value) fieldValueAtStartPoint.get(changeColumnOutputter2)).getValue()) - .isEqualTo(((Value) fieldValueAtStartPoint.get(changeColumnOutputterBis2)).getValue()) - .isEqualTo("Sam"); + .isEqualTo(((Value) fieldValueAtStartPoint.get(changeColumnOutputterBis2)).getValue()) + .isEqualTo("Sam"); Assertions.assertThat(((Value) fieldValueAtStartPoint.get(changeColumnOutputter3)).getValue()) - .isEqualTo(((Value) fieldValueAtStartPoint.get(changeColumnOutputterBis3)).getValue()) - .isEqualTo(Date.valueOf("1976-08-02")); + .isEqualTo(((Value) fieldValueAtStartPoint.get(changeColumnOutputterBis3)).getValue()) + .isEqualTo(Date.valueOf("1976-08-02")); Assertions.assertThat(((Value) fieldValueAtStartPoint.get(changeColumnOutputter4)).getValue()) - .isEqualTo(((Value) fieldValueAtStartPoint.get(changeColumnOutputterBis4)).getValue()) - .isEqualTo(UUID.fromString("D735221B-5DE5-4112-AA1E-49090CB75ADA")); + .isEqualTo(((Value) fieldValueAtStartPoint.get(changeColumnOutputterBis4)).getValue()) + .isEqualTo(UUID.fromString("D735221B-5DE5-4112-AA1E-49090CB75ADA")); Assertions.assertThat(((Value) fieldValueAtEndPoint.get(changeColumnOutputter0)).getValue()).isNull(); Assertions.assertThat(((Value) fieldValueAtEndPoint.get(changeColumnOutputter1)).getValue()).isNull(); @@ -696,15 +716,15 @@ public void test_column_with_index_from_request_with_displays() throws Exception Assertions.assertThat(columnId2.getValuesList().get(2).getValue()).isEqualTo(columnIdBis2.getValuesList().get(2).getValue()).isEqualTo("Sam"); Assertions.assertThat(columnId3.getValuesList().get(0).getValue()).isEqualTo(columnIdBis3.getValuesList().get(0).getValue()).isEqualTo(Date.valueOf("1949-10-08")); Assertions.assertThat(columnId3.getValuesList().get(1).getValue()).isEqualTo(columnIdBis3.getValuesList().get(1).getValue()).isEqualTo( - Date.valueOf("1974-10-28")); + Date.valueOf("1974-10-28")); Assertions.assertThat(columnId3.getValuesList().get(2).getValue()).isEqualTo(columnIdBis3.getValuesList().get(2).getValue()).isEqualTo( - Date.valueOf("1976-08-02")); + Date.valueOf("1976-08-02")); Assertions.assertThat( - columnId4.getValuesList().get(0).getValue()).isEqualTo(columnIdBis4.getValuesList().get(0).getValue()).isEqualTo( - UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")); + columnId4.getValuesList().get(0).getValue()).isEqualTo(columnIdBis4.getValuesList().get(0).getValue()).isEqualTo( + UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")); Assertions.assertThat(columnId4.getValuesList().get(1).getValue()).isEqualTo(columnIdBis4.getValuesList().get(1).getValue()).isEqualTo( - UUID.fromString("16319617-AE95-4087-9264-D3D21BF611B6")); + UUID.fromString("16319617-AE95-4087-9264-D3D21BF611B6")); Assertions.assertThat(columnId4.getValuesList().get(2).getValue()).isEqualTo(columnIdBis4.getValuesList().get(2).getValue()).isEqualTo( - UUID.fromString("D735221B-5DE5-4112-AA1E-49090CB75ADA")); + UUID.fromString("D735221B-5DE5-4112-AA1E-49090CB75ADA")); } } diff --git a/src/test/java/org/assertj/db/navigation/ToColumn_Column_String_Test.java b/src/test/java/org/assertj/db/navigation/ToColumn_Column_String_Test.java index 11981a37..c5e85acb 100644 --- a/src/test/java/org/assertj/db/navigation/ToColumn_Column_String_Test.java +++ b/src/test/java/org/assertj/db/navigation/ToColumn_Column_String_Test.java @@ -8,33 +8,53 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.navigation; -import org.assertj.core.api.Assertions; -import org.assertj.db.api.*; -import org.assertj.db.common.AbstractTest; -import org.assertj.db.common.NeedReload; -import org.assertj.db.exception.AssertJDBException; -import org.assertj.db.output.*; -import org.assertj.db.type.*; -import org.junit.Test; +import static org.assertj.db.api.Assertions.assertThat; +import static org.assertj.db.output.Outputs.output; +import static org.junit.Assert.fail; import java.lang.reflect.Field; import java.math.BigDecimal; import java.sql.Date; -import static org.assertj.db.api.Assertions.assertThat; -import static org.assertj.db.output.Outputs.output; -import static org.junit.Assert.fail; +import org.assertj.core.api.Assertions; +import org.assertj.db.api.AbstractColumnAssert; +import org.assertj.db.api.AbstractDbAssert; +import org.assertj.db.api.ChangeAssert; +import org.assertj.db.api.ChangeColumnAssert; +import org.assertj.db.api.ChangesAssert; +import org.assertj.db.api.RequestAssert; +import org.assertj.db.api.RequestColumnAssert; +import org.assertj.db.api.TableAssert; +import org.assertj.db.api.TableColumnAssert; +import org.assertj.db.common.AbstractTest; +import org.assertj.db.common.NeedReload; +import org.assertj.db.exception.AssertJDBException; +import org.assertj.db.output.AbstractColumnOutputter; +import org.assertj.db.output.AbstractDbOutputter; +import org.assertj.db.output.ChangeColumnOutputter; +import org.assertj.db.output.ChangeOutputter; +import org.assertj.db.output.ChangesOutputter; +import org.assertj.db.output.Outputs; +import org.assertj.db.output.RequestColumnOutputter; +import org.assertj.db.output.RequestOutputter; +import org.assertj.db.output.TableColumnOutputter; +import org.assertj.db.output.TableOutputter; +import org.assertj.db.type.Changes; +import org.assertj.db.type.Column; +import org.assertj.db.type.Request; +import org.assertj.db.type.Table; +import org.assertj.db.type.Value; +import org.junit.Test; /** * Tests on {@link org.assertj.db.navigation.ToColumn} class : * {@link org.assertj.db.navigation.ToColumn#column(String)} method. * * @author Régis Pouiller - * */ public class ToColumn_Column_String_Test extends AbstractTest { @@ -61,8 +81,8 @@ public void test_column_with_column_name_from_change_with_assertions() throws Ex ChangesAssert changesAssert = assertThat(changes); ChangeAssert changeAssert = changesAssert.change(); - PositionWithColumnsChange position = - (PositionWithColumnsChange) fieldPosition.get(changeAssert); + PositionWithColumnsChange position = + (PositionWithColumnsChange) fieldPosition.get(changeAssert); Assertions.assertThat(fieldIndex.get(position)).isEqualTo(0); ChangeColumnAssert changeColumnAssert0 = changeAssert.column("ID"); Assertions.assertThat(fieldIndex.get(position)).isEqualTo(1); @@ -77,8 +97,8 @@ public void test_column_with_column_name_from_change_with_assertions() throws Ex fail("An exception must be raised"); } catch (AssertJDBException e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("Column does not exist%n" - + "in <[ID, NAME, FIRSTNAME, BIRTH, ACTOR_IMDB]>%n" - + "with comparison IGNORE - Ignore the case")); + + "in <[ID, NAME, FIRSTNAME, BIRTH, ACTOR_IMDB]>%n" + + "with comparison IGNORE - Ignore the case")); } try { changeAssert.column(null); @@ -89,8 +109,8 @@ public void test_column_with_column_name_from_change_with_assertions() throws Ex ChangesAssert changesAssertBis = assertThat(changes); ChangeAssert changeAssertBis = changesAssertBis.change(); - PositionWithColumnsChange positionBis = - (PositionWithColumnsChange) fieldPosition.get(changeAssertBis); + PositionWithColumnsChange positionBis = + (PositionWithColumnsChange) fieldPosition.get(changeAssertBis); Assertions.assertThat(fieldIndex.get(positionBis)).isEqualTo(0); ChangeColumnAssert changeColumnAssertBis0 = changeAssertBis.column("ID"); Assertions.assertThat(fieldIndex.get(positionBis)).isEqualTo(1); @@ -105,8 +125,8 @@ public void test_column_with_column_name_from_change_with_assertions() throws Ex fail("An exception must be raised"); } catch (AssertJDBException e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("Column does not exist%n" - + "in <[ID, NAME, FIRSTNAME, BIRTH, ACTOR_IMDB]>%n" - + "with comparison IGNORE - Ignore the case")); + + "in <[ID, NAME, FIRSTNAME, BIRTH, ACTOR_IMDB]>%n" + + "with comparison IGNORE - Ignore the case")); } try { changeColumnAssertBis3.column(null); @@ -116,13 +136,13 @@ public void test_column_with_column_name_from_change_with_assertions() throws Ex } Assertions.assertThat(fieldColumnName.get(changeColumnAssert0)).isEqualTo(fieldColumnName.get(changeColumnAssertBis0)).isEqualTo( - "ID"); + "ID"); Assertions.assertThat(fieldColumnName.get(changeColumnAssert1)).isEqualTo(fieldColumnName.get(changeColumnAssertBis1)).isEqualTo( - "NAME"); + "NAME"); Assertions.assertThat(fieldColumnName.get(changeColumnAssert2)).isEqualTo(fieldColumnName.get(changeColumnAssertBis2)).isEqualTo( - "FIRSTNAME"); + "FIRSTNAME"); Assertions.assertThat(fieldColumnName.get(changeColumnAssert3)).isEqualTo(fieldColumnName.get(changeColumnAssertBis3)).isEqualTo( - "BIRTH"); + "BIRTH"); Assertions.assertThat(((Value) fieldValueAtStartPoint.get(changeColumnAssert0)).getValue()).isNull(); Assertions.assertThat(((Value) fieldValueAtStartPoint.get(changeColumnAssert1)).getValue()).isNull(); @@ -134,17 +154,17 @@ public void test_column_with_column_name_from_change_with_assertions() throws Ex Assertions.assertThat(((Value) fieldValueAtStartPoint.get(changeColumnAssertBis3)).getValue()).isNull(); Assertions.assertThat(((Value) fieldValueAtEndPoint.get(changeColumnAssert0)).getValue()) - .isEqualTo(((Value) fieldValueAtEndPoint.get(changeColumnAssertBis0)).getValue()) - .isEqualTo(new BigDecimal("4")); + .isEqualTo(((Value) fieldValueAtEndPoint.get(changeColumnAssertBis0)).getValue()) + .isEqualTo(new BigDecimal("4")); Assertions.assertThat(((Value) fieldValueAtEndPoint.get(changeColumnAssert1)).getValue()) - .isEqualTo(((Value) fieldValueAtEndPoint.get(changeColumnAssertBis1)).getValue()) - .isEqualTo("Murray"); + .isEqualTo(((Value) fieldValueAtEndPoint.get(changeColumnAssertBis1)).getValue()) + .isEqualTo("Murray"); Assertions.assertThat(((Value) fieldValueAtEndPoint.get(changeColumnAssert2)).getValue()) - .isEqualTo(((Value) fieldValueAtEndPoint.get(changeColumnAssertBis2)).getValue()) - .isEqualTo("Bill"); + .isEqualTo(((Value) fieldValueAtEndPoint.get(changeColumnAssertBis2)).getValue()) + .isEqualTo("Bill"); Assertions.assertThat(((Value) fieldValueAtEndPoint.get(changeColumnAssert3)).getValue()) - .isEqualTo(((Value) fieldValueAtEndPoint.get(changeColumnAssertBis3)).getValue()) - .isEqualTo(Date.valueOf("1950-09-21")); + .isEqualTo(((Value) fieldValueAtEndPoint.get(changeColumnAssertBis3)).getValue()) + .isEqualTo(Date.valueOf("1950-09-21")); } /** @@ -176,8 +196,8 @@ public void test_column_with_column_name_from_table_with_assertions() throws Exc fail("An exception must be raised"); } catch (AssertJDBException e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("Column does not exist%n" - + "in <[ID, NAME, FIRSTNAME, BIRTH, ACTOR_IMDB]>%n" - + "with comparison IGNORE - Ignore the case")); + + "in <[ID, NAME, FIRSTNAME, BIRTH, ACTOR_IMDB]>%n" + + "with comparison IGNORE - Ignore the case")); } try { tableAssert.column(null); @@ -202,8 +222,8 @@ public void test_column_with_column_name_from_table_with_assertions() throws Exc fail("An exception must be raised"); } catch (AssertJDBException e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("Column does not exist%n" - + "in <[ID, NAME, FIRSTNAME, BIRTH, ACTOR_IMDB]>%n" - + "with comparison IGNORE - Ignore the case")); + + "in <[ID, NAME, FIRSTNAME, BIRTH, ACTOR_IMDB]>%n" + + "with comparison IGNORE - Ignore the case")); } try { tableColumnAssertBis3.column(null); @@ -227,11 +247,11 @@ public void test_column_with_column_name_from_table_with_assertions() throws Exc Assertions.assertThat(columnId3.getName()).isEqualTo(columnIdBis3.getName()).isEqualTo("BIRTH"); Assertions.assertThat(columnId0.getValuesList().get(0).getValue()).isEqualTo(columnIdBis0.getValuesList().get(0).getValue()).isEqualTo( - new BigDecimal("1")); + new BigDecimal("1")); Assertions.assertThat(columnId0.getValuesList().get(1).getValue()).isEqualTo(columnIdBis0.getValuesList().get(1).getValue()).isEqualTo( - new BigDecimal("2")); + new BigDecimal("2")); Assertions.assertThat(columnId0.getValuesList().get(2).getValue()).isEqualTo(columnIdBis0.getValuesList().get(2).getValue()).isEqualTo( - new BigDecimal("3")); + new BigDecimal("3")); Assertions.assertThat(columnId1.getValuesList().get(0).getValue()).isEqualTo(columnIdBis1.getValuesList().get(0).getValue()).isEqualTo("Weaver"); Assertions.assertThat(columnId1.getValuesList().get(1).getValue()).isEqualTo(columnIdBis1.getValuesList().get(1).getValue()).isEqualTo("Phoenix"); Assertions.assertThat(columnId1.getValuesList().get(2).getValue()).isEqualTo(columnIdBis1.getValuesList().get(2).getValue()).isEqualTo("Worthington"); @@ -272,8 +292,8 @@ public void test_column_with_column_name_from_request_with_assertions() throws E fail("An exception must be raised"); } catch (AssertJDBException e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("Column does not exist%n" - + "in <[ID, NAME, FIRSTNAME, BIRTH, ACTOR_IMDB]>%n" - + "with comparison IGNORE - Ignore the case")); + + "in <[ID, NAME, FIRSTNAME, BIRTH, ACTOR_IMDB]>%n" + + "with comparison IGNORE - Ignore the case")); } try { requestAssert.column(null); @@ -298,8 +318,8 @@ public void test_column_with_column_name_from_request_with_assertions() throws E fail("An exception must be raised"); } catch (AssertJDBException e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("Column does not exist%n" - + "in <[ID, NAME, FIRSTNAME, BIRTH, ACTOR_IMDB]>%n" - + "with comparison IGNORE - Ignore the case")); + + "in <[ID, NAME, FIRSTNAME, BIRTH, ACTOR_IMDB]>%n" + + "with comparison IGNORE - Ignore the case")); } try { requestColumnAssertBis3.column(null); @@ -323,11 +343,11 @@ public void test_column_with_column_name_from_request_with_assertions() throws E Assertions.assertThat(columnId3.getName()).isEqualTo(columnIdBis3.getName()).isEqualTo("BIRTH"); Assertions.assertThat(columnId0.getValuesList().get(0).getValue()).isEqualTo(columnIdBis0.getValuesList().get(0).getValue()).isEqualTo( - new BigDecimal("1")); + new BigDecimal("1")); Assertions.assertThat(columnId0.getValuesList().get(1).getValue()).isEqualTo(columnIdBis0.getValuesList().get(1).getValue()).isEqualTo( - new BigDecimal("2")); + new BigDecimal("2")); Assertions.assertThat(columnId0.getValuesList().get(2).getValue()).isEqualTo(columnIdBis0.getValuesList().get(2).getValue()).isEqualTo( - new BigDecimal("3")); + new BigDecimal("3")); Assertions.assertThat(columnId1.getValuesList().get(0).getValue()).isEqualTo(columnIdBis1.getValuesList().get(0).getValue()).isEqualTo("Weaver"); Assertions.assertThat(columnId1.getValuesList().get(1).getValue()).isEqualTo(columnIdBis1.getValuesList().get(1).getValue()).isEqualTo("Phoenix"); Assertions.assertThat(columnId1.getValuesList().get(2).getValue()).isEqualTo(columnIdBis1.getValuesList().get(2).getValue()).isEqualTo("Worthington"); @@ -362,8 +382,8 @@ public void test_column_with_column_name_from_change_with_displays() throws Exce ChangesOutputter changesOutputter = output(changes); ChangeOutputter changeOutputter = changesOutputter.change(); - PositionWithColumnsChange position = - (PositionWithColumnsChange) fieldPosition.get(changeOutputter); + PositionWithColumnsChange position = + (PositionWithColumnsChange) fieldPosition.get(changeOutputter); Assertions.assertThat(fieldIndex.get(position)).isEqualTo(0); ChangeColumnOutputter changeColumnOutputter0 = changeOutputter.column("ID"); Assertions.assertThat(fieldIndex.get(position)).isEqualTo(1); @@ -378,8 +398,8 @@ public void test_column_with_column_name_from_change_with_displays() throws Exce fail("An exception must be raised"); } catch (AssertJDBException e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("Column does not exist%n" - + "in <[ID, NAME, FIRSTNAME, BIRTH, ACTOR_IMDB]>%n" - + "with comparison IGNORE - Ignore the case")); + + "in <[ID, NAME, FIRSTNAME, BIRTH, ACTOR_IMDB]>%n" + + "with comparison IGNORE - Ignore the case")); } try { changeOutputter.column(null); @@ -390,8 +410,8 @@ public void test_column_with_column_name_from_change_with_displays() throws Exce ChangesOutputter changesOutputterBis = output(changes); ChangeOutputter changeOutputterBis = changesOutputterBis.change(); - PositionWithColumnsChange positionBis = - (PositionWithColumnsChange) fieldPosition.get(changeOutputterBis); + PositionWithColumnsChange positionBis = + (PositionWithColumnsChange) fieldPosition.get(changeOutputterBis); Assertions.assertThat(fieldIndex.get(positionBis)).isEqualTo(0); ChangeColumnOutputter changeColumnOutputterBis0 = changeOutputterBis.column("ID"); Assertions.assertThat(fieldIndex.get(positionBis)).isEqualTo(1); @@ -406,8 +426,8 @@ public void test_column_with_column_name_from_change_with_displays() throws Exce fail("An exception must be raised"); } catch (AssertJDBException e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("Column does not exist%n" - + "in <[ID, NAME, FIRSTNAME, BIRTH, ACTOR_IMDB]>%n" - + "with comparison IGNORE - Ignore the case")); + + "in <[ID, NAME, FIRSTNAME, BIRTH, ACTOR_IMDB]>%n" + + "with comparison IGNORE - Ignore the case")); } try { changeColumnOutputterBis3.column(null); @@ -417,13 +437,13 @@ public void test_column_with_column_name_from_change_with_displays() throws Exce } Assertions.assertThat(fieldColumnName.get(changeColumnOutputter0)).isEqualTo(fieldColumnName.get(changeColumnOutputterBis0)).isEqualTo( - "ID"); + "ID"); Assertions.assertThat(fieldColumnName.get(changeColumnOutputter1)).isEqualTo(fieldColumnName.get(changeColumnOutputterBis1)).isEqualTo( - "NAME"); + "NAME"); Assertions.assertThat(fieldColumnName.get(changeColumnOutputter2)).isEqualTo(fieldColumnName.get(changeColumnOutputterBis2)).isEqualTo( - "FIRSTNAME"); + "FIRSTNAME"); Assertions.assertThat(fieldColumnName.get(changeColumnOutputter3)).isEqualTo(fieldColumnName.get(changeColumnOutputterBis3)).isEqualTo( - "BIRTH"); + "BIRTH"); Assertions.assertThat(((Value) fieldValueAtStartPoint.get(changeColumnOutputter0)).getValue()).isNull(); Assertions.assertThat(((Value) fieldValueAtStartPoint.get(changeColumnOutputter1)).getValue()).isNull(); @@ -435,17 +455,17 @@ public void test_column_with_column_name_from_change_with_displays() throws Exce Assertions.assertThat(((Value) fieldValueAtStartPoint.get(changeColumnOutputterBis3)).getValue()).isNull(); Assertions.assertThat(((Value) fieldValueAtEndPoint.get(changeColumnOutputter0)).getValue()) - .isEqualTo(((Value) fieldValueAtEndPoint.get(changeColumnOutputterBis0)).getValue()) - .isEqualTo(new BigDecimal("4")); + .isEqualTo(((Value) fieldValueAtEndPoint.get(changeColumnOutputterBis0)).getValue()) + .isEqualTo(new BigDecimal("4")); Assertions.assertThat(((Value) fieldValueAtEndPoint.get(changeColumnOutputter1)).getValue()) - .isEqualTo(((Value) fieldValueAtEndPoint.get(changeColumnOutputterBis1)).getValue()) - .isEqualTo("Murray"); + .isEqualTo(((Value) fieldValueAtEndPoint.get(changeColumnOutputterBis1)).getValue()) + .isEqualTo("Murray"); Assertions.assertThat(((Value) fieldValueAtEndPoint.get(changeColumnOutputter2)).getValue()) - .isEqualTo(((Value) fieldValueAtEndPoint.get(changeColumnOutputterBis2)).getValue()) - .isEqualTo("Bill"); + .isEqualTo(((Value) fieldValueAtEndPoint.get(changeColumnOutputterBis2)).getValue()) + .isEqualTo("Bill"); Assertions.assertThat(((Value) fieldValueAtEndPoint.get(changeColumnOutputter3)).getValue()) - .isEqualTo(((Value) fieldValueAtEndPoint.get(changeColumnOutputterBis3)).getValue()) - .isEqualTo(Date.valueOf("1950-09-21")); + .isEqualTo(((Value) fieldValueAtEndPoint.get(changeColumnOutputterBis3)).getValue()) + .isEqualTo(Date.valueOf("1950-09-21")); } /** @@ -462,8 +482,8 @@ public void test_column_with_column_name_from_table_with_displays() throws Excep Table table = new Table(source, "actor"); TableOutputter tableOutputter = Outputs.output(table); - Position position = - (Position) fieldPosition.get(tableOutputter); + Position position = + (Position) fieldPosition.get(tableOutputter); Assertions.assertThat(fieldIndex.get(position)).isEqualTo(0); TableColumnOutputter tableColumnOutputter0 = tableOutputter.column("ID"); Assertions.assertThat(fieldIndex.get(position)).isEqualTo(1); @@ -478,8 +498,8 @@ public void test_column_with_column_name_from_table_with_displays() throws Excep fail("An exception must be raised"); } catch (AssertJDBException e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("Column does not exist%n" - + "in <[ID, NAME, FIRSTNAME, BIRTH, ACTOR_IMDB]>%n" - + "with comparison IGNORE - Ignore the case")); + + "in <[ID, NAME, FIRSTNAME, BIRTH, ACTOR_IMDB]>%n" + + "with comparison IGNORE - Ignore the case")); } try { tableOutputter.column(null); @@ -489,8 +509,8 @@ public void test_column_with_column_name_from_table_with_displays() throws Excep } TableOutputter tableOutputterBis = Outputs.output(table); - Position positionBis = - (Position) fieldPosition.get(tableOutputterBis); + Position positionBis = + (Position) fieldPosition.get(tableOutputterBis); Assertions.assertThat(fieldIndex.get(positionBis)).isEqualTo(0); TableColumnOutputter tableColumnOutputterBis0 = tableOutputterBis.column("ID"); Assertions.assertThat(fieldIndex.get(positionBis)).isEqualTo(1); @@ -505,8 +525,8 @@ public void test_column_with_column_name_from_table_with_displays() throws Excep fail("An exception must be raised"); } catch (AssertJDBException e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("Column does not exist%n" - + "in <[ID, NAME, FIRSTNAME, BIRTH, ACTOR_IMDB]>%n" - + "with comparison IGNORE - Ignore the case")); + + "in <[ID, NAME, FIRSTNAME, BIRTH, ACTOR_IMDB]>%n" + + "with comparison IGNORE - Ignore the case")); } try { tableColumnOutputterBis3.column(null); @@ -530,11 +550,11 @@ public void test_column_with_column_name_from_table_with_displays() throws Excep Assertions.assertThat(columnId3.getName()).isEqualTo(columnIdBis3.getName()).isEqualTo("BIRTH"); Assertions.assertThat(columnId0.getValuesList().get(0).getValue()).isEqualTo(columnIdBis0.getValuesList().get(0).getValue()).isEqualTo( - new BigDecimal("1")); + new BigDecimal("1")); Assertions.assertThat(columnId0.getValuesList().get(1).getValue()).isEqualTo(columnIdBis0.getValuesList().get(1).getValue()).isEqualTo( - new BigDecimal("2")); + new BigDecimal("2")); Assertions.assertThat(columnId0.getValuesList().get(2).getValue()).isEqualTo(columnIdBis0.getValuesList().get(2).getValue()).isEqualTo( - new BigDecimal("3")); + new BigDecimal("3")); Assertions.assertThat(columnId1.getValuesList().get(0).getValue()).isEqualTo(columnIdBis1.getValuesList().get(0).getValue()).isEqualTo("Weaver"); Assertions.assertThat(columnId1.getValuesList().get(1).getValue()).isEqualTo(columnIdBis1.getValuesList().get(1).getValue()).isEqualTo("Phoenix"); Assertions.assertThat(columnId1.getValuesList().get(2).getValue()).isEqualTo(columnIdBis1.getValuesList().get(2).getValue()).isEqualTo("Worthington"); @@ -560,8 +580,8 @@ public void test_column_with_column_name_from_request_with_displays() throws Exc Request request = new Request(source, "select * from actor"); RequestOutputter requestOutputter = Outputs.output(request); - Position position = - (Position) fieldPosition.get(requestOutputter); + Position position = + (Position) fieldPosition.get(requestOutputter); Assertions.assertThat(fieldIndex.get(position)).isEqualTo(0); RequestColumnOutputter requestColumnOutputter0 = requestOutputter.column("ID"); Assertions.assertThat(fieldIndex.get(position)).isEqualTo(1); @@ -576,8 +596,8 @@ public void test_column_with_column_name_from_request_with_displays() throws Exc fail("An exception must be raised"); } catch (AssertJDBException e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("Column does not exist%n" - + "in <[ID, NAME, FIRSTNAME, BIRTH, ACTOR_IMDB]>%n" - + "with comparison IGNORE - Ignore the case")); + + "in <[ID, NAME, FIRSTNAME, BIRTH, ACTOR_IMDB]>%n" + + "with comparison IGNORE - Ignore the case")); } try { requestOutputter.column(null); @@ -587,8 +607,8 @@ public void test_column_with_column_name_from_request_with_displays() throws Exc } RequestOutputter requestOutputterBis = Outputs.output(request); - Position positionBis = - (Position) fieldPosition.get(requestOutputterBis); + Position positionBis = + (Position) fieldPosition.get(requestOutputterBis); Assertions.assertThat(fieldIndex.get(positionBis)).isEqualTo(0); RequestColumnOutputter requestColumnOutputterBis0 = requestOutputterBis.column("ID"); Assertions.assertThat(fieldIndex.get(positionBis)).isEqualTo(1); @@ -603,8 +623,8 @@ public void test_column_with_column_name_from_request_with_displays() throws Exc fail("An exception must be raised"); } catch (AssertJDBException e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("Column does not exist%n" - + "in <[ID, NAME, FIRSTNAME, BIRTH, ACTOR_IMDB]>%n" - + "with comparison IGNORE - Ignore the case")); + + "in <[ID, NAME, FIRSTNAME, BIRTH, ACTOR_IMDB]>%n" + + "with comparison IGNORE - Ignore the case")); } try { requestColumnOutputterBis3.column(null); @@ -628,11 +648,11 @@ public void test_column_with_column_name_from_request_with_displays() throws Exc Assertions.assertThat(columnId3.getName()).isEqualTo(columnIdBis3.getName()).isEqualTo("BIRTH"); Assertions.assertThat(columnId0.getValuesList().get(0).getValue()).isEqualTo(columnIdBis0.getValuesList().get(0).getValue()).isEqualTo( - new BigDecimal("1")); + new BigDecimal("1")); Assertions.assertThat(columnId0.getValuesList().get(1).getValue()).isEqualTo(columnIdBis0.getValuesList().get(1).getValue()).isEqualTo( - new BigDecimal("2")); + new BigDecimal("2")); Assertions.assertThat(columnId0.getValuesList().get(2).getValue()).isEqualTo(columnIdBis0.getValuesList().get(2).getValue()).isEqualTo( - new BigDecimal("3")); + new BigDecimal("3")); Assertions.assertThat(columnId1.getValuesList().get(0).getValue()).isEqualTo(columnIdBis1.getValuesList().get(0).getValue()).isEqualTo("Weaver"); Assertions.assertThat(columnId1.getValuesList().get(1).getValue()).isEqualTo(columnIdBis1.getValuesList().get(1).getValue()).isEqualTo("Phoenix"); Assertions.assertThat(columnId1.getValuesList().get(2).getValue()).isEqualTo(columnIdBis1.getValuesList().get(2).getValue()).isEqualTo("Worthington"); diff --git a/src/test/java/org/assertj/db/navigation/ToColumn_Column_Test.java b/src/test/java/org/assertj/db/navigation/ToColumn_Column_Test.java index 8fdf3072..c949f594 100644 --- a/src/test/java/org/assertj/db/navigation/ToColumn_Column_Test.java +++ b/src/test/java/org/assertj/db/navigation/ToColumn_Column_Test.java @@ -8,34 +8,54 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.navigation; -import org.assertj.db.api.*; -import org.assertj.db.common.AbstractTest; -import org.assertj.db.common.NeedReload; -import org.assertj.db.exception.AssertJDBException; -import org.assertj.db.output.*; -import org.assertj.db.type.*; -import org.junit.Test; +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.db.api.Assertions.assertThat; +import static org.assertj.db.output.Outputs.output; +import static org.junit.Assert.fail; import java.lang.reflect.Field; import java.math.BigDecimal; import java.sql.Date; import java.util.UUID; -import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.db.api.Assertions.assertThat; -import static org.assertj.db.output.Outputs.output; -import static org.junit.Assert.fail; +import org.assertj.db.api.AbstractColumnAssert; +import org.assertj.db.api.AbstractDbAssert; +import org.assertj.db.api.ChangeAssert; +import org.assertj.db.api.ChangeColumnAssert; +import org.assertj.db.api.ChangesAssert; +import org.assertj.db.api.RequestAssert; +import org.assertj.db.api.RequestColumnAssert; +import org.assertj.db.api.TableAssert; +import org.assertj.db.api.TableColumnAssert; +import org.assertj.db.common.AbstractTest; +import org.assertj.db.common.NeedReload; +import org.assertj.db.exception.AssertJDBException; +import org.assertj.db.output.AbstractColumnOutputter; +import org.assertj.db.output.AbstractDbOutputter; +import org.assertj.db.output.ChangeColumnOutputter; +import org.assertj.db.output.ChangeOutputter; +import org.assertj.db.output.ChangesOutputter; +import org.assertj.db.output.Outputs; +import org.assertj.db.output.RequestColumnOutputter; +import org.assertj.db.output.RequestOutputter; +import org.assertj.db.output.TableColumnOutputter; +import org.assertj.db.output.TableOutputter; +import org.assertj.db.type.Changes; +import org.assertj.db.type.Column; +import org.assertj.db.type.Request; +import org.assertj.db.type.Table; +import org.assertj.db.type.Value; +import org.junit.Test; /** * Tests on {@link org.assertj.db.navigation.ToColumn} class : * {@link org.assertj.db.navigation.ToColumn#column()} method. * * @author Régis Pouiller - * */ public class ToColumn_Column_Test extends AbstractTest { @@ -62,8 +82,8 @@ public void test_column_from_change_with_assertions() throws Exception { ChangesAssert changesAssert = assertThat(changes); ChangeAssert changeAssert = changesAssert.change(); - PositionWithColumnsChange position = - (PositionWithColumnsChange) fieldPosition.get(changeAssert); + PositionWithColumnsChange position = + (PositionWithColumnsChange) fieldPosition.get(changeAssert); assertThat(fieldIndex.get(position)).isEqualTo(0); ChangeColumnAssert changeColumnAssert0 = changeAssert.column(); assertThat(fieldIndex.get(position)).isEqualTo(1); @@ -84,8 +104,8 @@ public void test_column_from_change_with_assertions() throws Exception { ChangesAssert changesAssertBis = assertThat(changes); ChangeAssert changeAssertBis = changesAssertBis.change(); - PositionWithColumnsChange positionBis = - (PositionWithColumnsChange) fieldPosition.get(changeAssertBis); + PositionWithColumnsChange positionBis = + (PositionWithColumnsChange) fieldPosition.get(changeAssertBis); assertThat(fieldIndex.get(positionBis)).isEqualTo(0); ChangeColumnAssert changeColumnAssertBis0 = changeAssertBis.column(); assertThat(fieldIndex.get(positionBis)).isEqualTo(1); @@ -105,15 +125,15 @@ public void test_column_from_change_with_assertions() throws Exception { } assertThat(fieldColumnName.get(changeColumnAssert0)).isEqualTo(fieldColumnName.get(changeColumnAssertBis0)).isEqualTo( - "ID"); + "ID"); assertThat(fieldColumnName.get(changeColumnAssert1)).isEqualTo(fieldColumnName.get(changeColumnAssertBis1)).isEqualTo( - "NAME"); + "NAME"); assertThat(fieldColumnName.get(changeColumnAssert2)).isEqualTo(fieldColumnName.get(changeColumnAssertBis2)).isEqualTo( - "FIRSTNAME"); + "FIRSTNAME"); assertThat(fieldColumnName.get(changeColumnAssert3)).isEqualTo(fieldColumnName.get(changeColumnAssertBis3)).isEqualTo( - "BIRTH"); + "BIRTH"); assertThat(fieldColumnName.get(changeColumnAssert4)).isEqualTo(fieldColumnName.get(changeColumnAssertBis4)).isEqualTo( - "ACTOR_IMDB"); + "ACTOR_IMDB"); assertThat(((Value) fieldValueAtStartPoint.get(changeColumnAssert0)).getValue()).isNull(); assertThat(((Value) fieldValueAtStartPoint.get(changeColumnAssert1)).getValue()).isNull(); @@ -127,17 +147,17 @@ public void test_column_from_change_with_assertions() throws Exception { assertThat(((Value) fieldValueAtStartPoint.get(changeColumnAssertBis4)).getValue()).isNull(); assertThat(((Value) fieldValueAtEndPoint.get(changeColumnAssert0)).getValue()).isEqualTo( - ((Value) fieldValueAtEndPoint.get(changeColumnAssertBis0)).getValue()).isEqualTo(new BigDecimal("4")); + ((Value) fieldValueAtEndPoint.get(changeColumnAssertBis0)).getValue()).isEqualTo(new BigDecimal("4")); assertThat(((Value) fieldValueAtEndPoint.get(changeColumnAssert1)).getValue()).isEqualTo( - ((Value) fieldValueAtEndPoint.get(changeColumnAssertBis1)).getValue()).isEqualTo("Murray"); + ((Value) fieldValueAtEndPoint.get(changeColumnAssertBis1)).getValue()).isEqualTo("Murray"); assertThat(((Value) fieldValueAtEndPoint.get(changeColumnAssert2)).getValue()).isEqualTo( - ((Value) fieldValueAtEndPoint.get(changeColumnAssertBis2)).getValue()).isEqualTo("Bill"); + ((Value) fieldValueAtEndPoint.get(changeColumnAssertBis2)).getValue()).isEqualTo("Bill"); assertThat(((Value) fieldValueAtEndPoint.get(changeColumnAssert3)).getValue()).isEqualTo( - ((Value) fieldValueAtEndPoint.get(changeColumnAssertBis3)).getValue()).isEqualTo( - Date.valueOf("1950-09-21")); + ((Value) fieldValueAtEndPoint.get(changeColumnAssertBis3)).getValue()).isEqualTo( + Date.valueOf("1950-09-21")); assertThat(((Value) fieldValueAtEndPoint.get(changeColumnAssert4)).getValue()).isEqualTo( - ((Value) fieldValueAtEndPoint.get(changeColumnAssertBis4)).getValue()).isEqualTo( - UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")); + ((Value) fieldValueAtEndPoint.get(changeColumnAssertBis4)).getValue()).isEqualTo( + UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")); } /** @@ -311,9 +331,9 @@ public void test_column_from_request_with_assertions() throws Exception { assertThat(columnId3.getValuesList().get(2).getValue()).isEqualTo(columnIdBis3.getValuesList().get(2).getValue()).isEqualTo(Date.valueOf("1976-08-02")); assertThat(columnId4.getValuesList().get(0).getValue()).isEqualTo(columnIdBis4.getValuesList().get(0).getValue()).isEqualTo(UUID.fromString("30b443ae-c0c9-4790-9bec-ce1380808435")); assertThat(columnId4.getValuesList().get(1).getValue()).isEqualTo(columnIdBis4.getValuesList().get(1).getValue()).isEqualTo( - UUID.fromString("16319617-ae95-4087-9264-d3d21bf611b6")); + UUID.fromString("16319617-ae95-4087-9264-d3d21bf611b6")); assertThat(columnId4.getValuesList().get(2).getValue()).isEqualTo(columnIdBis4.getValuesList().get(2).getValue()).isEqualTo( - UUID.fromString("d735221b-5de5-4112-aa1e-49090cb75ada")); + UUID.fromString("d735221b-5de5-4112-aa1e-49090cb75ada")); } /** @@ -339,8 +359,8 @@ public void test_column_from_change_with_displays() throws Exception { ChangesOutputter changesOutputter = output(changes); ChangeOutputter changeOutputter = changesOutputter.change(); - PositionWithColumnsChange position = - (PositionWithColumnsChange) fieldPosition.get(changeOutputter); + PositionWithColumnsChange position = + (PositionWithColumnsChange) fieldPosition.get(changeOutputter); assertThat(fieldIndex.get(position)).isEqualTo(0); ChangeColumnOutputter changeColumnOutputter0 = changeOutputter.column(); assertThat(fieldIndex.get(position)).isEqualTo(1); @@ -361,8 +381,8 @@ public void test_column_from_change_with_displays() throws Exception { ChangesOutputter changesOutputterBis = output(changes); ChangeOutputter changeOutputterBis = changesOutputterBis.change(); - PositionWithColumnsChange positionBis = - (PositionWithColumnsChange) fieldPosition.get(changeOutputterBis); + PositionWithColumnsChange positionBis = + (PositionWithColumnsChange) fieldPosition.get(changeOutputterBis); assertThat(fieldIndex.get(positionBis)).isEqualTo(0); ChangeColumnOutputter changeColumnOutputterBis0 = changeOutputterBis.column(); assertThat(fieldIndex.get(positionBis)).isEqualTo(1); @@ -382,15 +402,15 @@ public void test_column_from_change_with_displays() throws Exception { } assertThat(fieldColumnName.get(changeColumnOutputter0)).isEqualTo(fieldColumnName.get(changeColumnOutputterBis0)).isEqualTo( - "ID"); + "ID"); assertThat(fieldColumnName.get(changeColumnOutputter1)).isEqualTo(fieldColumnName.get(changeColumnOutputterBis1)).isEqualTo( - "NAME"); + "NAME"); assertThat(fieldColumnName.get(changeColumnOutputter2)).isEqualTo(fieldColumnName.get(changeColumnOutputterBis2)).isEqualTo( - "FIRSTNAME"); + "FIRSTNAME"); assertThat(fieldColumnName.get(changeColumnOutputter3)).isEqualTo(fieldColumnName.get(changeColumnOutputterBis3)).isEqualTo( - "BIRTH"); + "BIRTH"); assertThat(fieldColumnName.get(changeColumnOutputter4)).isEqualTo(fieldColumnName.get(changeColumnOutputterBis4)).isEqualTo( - "ACTOR_IMDB"); + "ACTOR_IMDB"); assertThat(((Value) fieldValueAtStartPoint.get(changeColumnOutputter0)).getValue()).isNull(); assertThat(((Value) fieldValueAtStartPoint.get(changeColumnOutputter1)).getValue()).isNull(); @@ -404,17 +424,17 @@ public void test_column_from_change_with_displays() throws Exception { assertThat(((Value) fieldValueAtStartPoint.get(changeColumnOutputterBis4)).getValue()).isNull(); assertThat(((Value) fieldValueAtEndPoint.get(changeColumnOutputter0)).getValue()).isEqualTo( - ((Value) fieldValueAtEndPoint.get(changeColumnOutputterBis0)).getValue()).isEqualTo(new BigDecimal("4")); + ((Value) fieldValueAtEndPoint.get(changeColumnOutputterBis0)).getValue()).isEqualTo(new BigDecimal("4")); assertThat(((Value) fieldValueAtEndPoint.get(changeColumnOutputter1)).getValue()).isEqualTo( - ((Value) fieldValueAtEndPoint.get(changeColumnOutputterBis1)).getValue()).isEqualTo("Murray"); + ((Value) fieldValueAtEndPoint.get(changeColumnOutputterBis1)).getValue()).isEqualTo("Murray"); assertThat(((Value) fieldValueAtEndPoint.get(changeColumnOutputter2)).getValue()).isEqualTo( - ((Value) fieldValueAtEndPoint.get(changeColumnOutputterBis2)).getValue()).isEqualTo("Bill"); + ((Value) fieldValueAtEndPoint.get(changeColumnOutputterBis2)).getValue()).isEqualTo("Bill"); assertThat(((Value) fieldValueAtEndPoint.get(changeColumnOutputter3)).getValue()).isEqualTo( - ((Value) fieldValueAtEndPoint.get(changeColumnOutputterBis3)).getValue()).isEqualTo( - Date.valueOf("1950-09-21")); + ((Value) fieldValueAtEndPoint.get(changeColumnOutputterBis3)).getValue()).isEqualTo( + Date.valueOf("1950-09-21")); assertThat(((Value) fieldValueAtEndPoint.get(changeColumnOutputter4)).getValue()).isEqualTo( - ((Value) fieldValueAtEndPoint.get(changeColumnOutputterBis4)).getValue()).isEqualTo( - UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")); + ((Value) fieldValueAtEndPoint.get(changeColumnOutputterBis4)).getValue()).isEqualTo( + UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")); } /** @@ -431,8 +451,8 @@ public void test_column_from_table_with_displays() throws Exception { Table table = new Table(source, "actor"); TableOutputter tableOutputter = Outputs.output(table); - Position position = - (Position) fieldPosition.get(tableOutputter); + Position position = + (Position) fieldPosition.get(tableOutputter); assertThat(fieldIndex.get(position)).isEqualTo(0); TableColumnOutputter tableColumnOutputter0 = tableOutputter.column(); assertThat(fieldIndex.get(position)).isEqualTo(1); @@ -452,8 +472,8 @@ public void test_column_from_table_with_displays() throws Exception { } TableOutputter tableOutputterBis = Outputs.output(table); - Position positionBis = - (Position) fieldPosition.get(tableOutputterBis); + Position positionBis = + (Position) fieldPosition.get(tableOutputterBis); assertThat(fieldIndex.get(positionBis)).isEqualTo(0); TableColumnOutputter tableColumnOutputterBis0 = tableOutputterBis.column(); assertThat(fieldIndex.get(positionBis)).isEqualTo(1); @@ -590,8 +610,8 @@ public void test_column_from_request_with_displays() throws Exception { assertThat(columnId3.getValuesList().get(2).getValue()).isEqualTo(columnIdBis3.getValuesList().get(2).getValue()).isEqualTo(Date.valueOf("1976-08-02")); assertThat(columnId4.getValuesList().get(0).getValue()).isEqualTo(columnIdBis4.getValuesList().get(0).getValue()).isEqualTo(UUID.fromString("30b443ae-c0c9-4790-9bec-ce1380808435")); assertThat(columnId4.getValuesList().get(1).getValue()).isEqualTo(columnIdBis4.getValuesList().get(1).getValue()).isEqualTo( - UUID.fromString("16319617-ae95-4087-9264-d3d21bf611b6")); + UUID.fromString("16319617-ae95-4087-9264-d3d21bf611b6")); assertThat(columnId4.getValuesList().get(2).getValue()).isEqualTo(columnIdBis4.getValuesList().get(2).getValue()).isEqualTo( - UUID.fromString("d735221b-5de5-4112-aa1e-49090cb75ada")); + UUID.fromString("d735221b-5de5-4112-aa1e-49090cb75ada")); } } diff --git a/src/test/java/org/assertj/db/navigation/ToRowFromChange_RowAtEndPoint_Test.java b/src/test/java/org/assertj/db/navigation/ToRowFromChange_RowAtEndPoint_Test.java index 303b7028..c939f3c7 100644 --- a/src/test/java/org/assertj/db/navigation/ToRowFromChange_RowAtEndPoint_Test.java +++ b/src/test/java/org/assertj/db/navigation/ToRowFromChange_RowAtEndPoint_Test.java @@ -8,10 +8,15 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.navigation; +import static org.assertj.db.api.Assertions.assertThat; +import static org.assertj.db.output.Outputs.output; + +import java.lang.reflect.Field; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeAssert; import org.assertj.db.api.ChangeRowAssert; @@ -26,17 +31,11 @@ import org.assertj.db.type.Row; import org.junit.Test; -import java.lang.reflect.Field; - -import static org.assertj.db.api.Assertions.assertThat; -import static org.assertj.db.output.Outputs.output; - /** * Tests on {@link org.assertj.db.navigation.ToRowFromChange} class : * {@link org.assertj.db.navigation.ToRowFromChange#rowAtEndPoint()} method. * * @author Régis Pouiller - * */ public class ToRowFromChange_RowAtEndPoint_Test extends AbstractTest { @@ -62,30 +61,30 @@ public void test_row_at_end_point_with_assertions() throws Exception { ChangesAssert changesAssert = assertThat(changes); ChangeAssert changeCreationAssert = changesAssert.change(); - PositionWithPoints positionCreation = - (PositionWithPoints) fieldPosition.get(changeCreationAssert); + PositionWithPoints positionCreation = + (PositionWithPoints) fieldPosition.get(changeCreationAssert); Assertions.assertThat(fieldRowAssert.get(positionCreation)).isNull(); ChangeRowAssert changeCreationRowAssert = changeCreationAssert.rowAtEndPoint(); Assertions.assertThat(fieldRowAssert.get(positionCreation)).isNotNull(); ChangeRowAssert changeCreationRowAssertBis = changeCreationRowAssert.rowAtEndPoint(); Assertions.assertThat(changeCreationRowAssert).isSameAs(changeCreationRowAssertBis); Assertions.assertThat(fieldRowFromAssert.get(changeCreationRowAssert)).isEqualTo( - fieldRowFromChange.get(changes.getChangesList().get(0))); + fieldRowFromChange.get(changes.getChangesList().get(0))); ChangeAssert changeModificationAssert = changesAssert.change(3); - PositionWithPoints positionModification = - (PositionWithPoints) fieldPosition.get(changeModificationAssert); + PositionWithPoints positionModification = + (PositionWithPoints) fieldPosition.get(changeModificationAssert); Assertions.assertThat(fieldRowAssert.get(positionModification)).isNull(); ChangeRowAssert changeModificationRowAssert = changeModificationAssert.rowAtEndPoint(); Assertions.assertThat(fieldRowAssert.get(positionModification)).isNotNull(); ChangeRowAssert changeModificationRowAssertBis = changeModificationRowAssert.rowAtEndPoint(); Assertions.assertThat(changeModificationRowAssert).isSameAs(changeModificationRowAssertBis); Assertions.assertThat(fieldRowFromAssert.get(changeModificationRowAssert)).isEqualTo( - fieldRowFromChange.get(changes.getChangesList().get(3))); + fieldRowFromChange.get(changes.getChangesList().get(3))); ChangeAssert changeDeletionAssert = changesAssert.change(6); - PositionWithPoints positionDeletion = - (PositionWithPoints) fieldPosition.get(changeDeletionAssert); + PositionWithPoints positionDeletion = + (PositionWithPoints) fieldPosition.get(changeDeletionAssert); Assertions.assertThat(fieldRowAssert.get(positionDeletion)).isNull(); ChangeRowAssert changeDeletionRowAssert = changeDeletionAssert.rowAtEndPoint(); Assertions.assertThat(fieldRowAssert.get(positionDeletion)).isNotNull(); @@ -116,30 +115,30 @@ public void test_row_at_end_point_with_displays() throws Exception { ChangesOutputter changesOutputter = output(changes); ChangeOutputter changeCreationOutputter = changesOutputter.change(); - PositionWithPoints positionCreation = - (PositionWithPoints) fieldPosition.get(changeCreationOutputter); + PositionWithPoints positionCreation = + (PositionWithPoints) fieldPosition.get(changeCreationOutputter); Assertions.assertThat(fieldRowOutputter.get(positionCreation)).isNull(); ChangeRowOutputter changeCreationRowOutputter = changeCreationOutputter.rowAtEndPoint(); Assertions.assertThat(fieldRowOutputter.get(positionCreation)).isNotNull(); ChangeRowOutputter changeCreationRowOutputterBis = changeCreationRowOutputter.rowAtEndPoint(); Assertions.assertThat(changeCreationRowOutputter).isSameAs(changeCreationRowOutputterBis); Assertions.assertThat(fieldRowFromOutputter.get(changeCreationRowOutputter)).isEqualTo( - fieldRowFromChange.get(changes.getChangesList().get(0))); + fieldRowFromChange.get(changes.getChangesList().get(0))); ChangeOutputter changeModificationOutputter = changesOutputter.change(3); - PositionWithPoints positionModification = - (PositionWithPoints) fieldPosition.get(changeModificationOutputter); + PositionWithPoints positionModification = + (PositionWithPoints) fieldPosition.get(changeModificationOutputter); Assertions.assertThat(fieldRowOutputter.get(positionModification)).isNull(); ChangeRowOutputter changeModificationRowOutputter = changeModificationOutputter.rowAtEndPoint(); Assertions.assertThat(fieldRowOutputter.get(positionModification)).isNotNull(); ChangeRowOutputter changeModificationRowOutputterBis = changeModificationRowOutputter.rowAtEndPoint(); Assertions.assertThat(changeModificationRowOutputter).isSameAs(changeModificationRowOutputterBis); Assertions.assertThat(fieldRowFromOutputter.get(changeModificationRowOutputter)).isEqualTo( - fieldRowFromChange.get(changes.getChangesList().get(3))); + fieldRowFromChange.get(changes.getChangesList().get(3))); ChangeOutputter changeDeletionOutputter = changesOutputter.change(6); - PositionWithPoints positionDeletion = - (PositionWithPoints) fieldPosition.get(changeDeletionOutputter); + PositionWithPoints positionDeletion = + (PositionWithPoints) fieldPosition.get(changeDeletionOutputter); Assertions.assertThat(fieldRowOutputter.get(positionDeletion)).isNull(); ChangeRowOutputter changeDeletionRowOutputter = changeDeletionOutputter.rowAtEndPoint(); Assertions.assertThat(fieldRowOutputter.get(positionDeletion)).isNotNull(); diff --git a/src/test/java/org/assertj/db/navigation/ToRowFromChange_RowAtStartPoint_Test.java b/src/test/java/org/assertj/db/navigation/ToRowFromChange_RowAtStartPoint_Test.java index db49a92b..20495cad 100644 --- a/src/test/java/org/assertj/db/navigation/ToRowFromChange_RowAtStartPoint_Test.java +++ b/src/test/java/org/assertj/db/navigation/ToRowFromChange_RowAtStartPoint_Test.java @@ -8,10 +8,15 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.navigation; +import static org.assertj.db.api.Assertions.assertThat; +import static org.assertj.db.output.Outputs.output; + +import java.lang.reflect.Field; + import org.assertj.core.api.Assertions; import org.assertj.db.api.ChangeAssert; import org.assertj.db.api.ChangeRowAssert; @@ -26,17 +31,11 @@ import org.assertj.db.type.Row; import org.junit.Test; -import java.lang.reflect.Field; - -import static org.assertj.db.api.Assertions.assertThat; -import static org.assertj.db.output.Outputs.output; - /** * Tests on {@link org.assertj.db.navigation.ToRowFromChange} class : * {@link org.assertj.db.navigation.ToRowFromChange#rowAtStartPoint()} method. * * @author Régis Pouiller - * */ public class ToRowFromChange_RowAtStartPoint_Test extends AbstractTest { @@ -62,8 +61,8 @@ public void test_row_at_start_point_with_assertions() throws Exception { ChangesAssert changesAssert = assertThat(changes); ChangeAssert changeCreationAssert = changesAssert.change(); - PositionWithPoints positionCreation = - (PositionWithPoints) fieldPosition.get(changeCreationAssert); + PositionWithPoints positionCreation = + (PositionWithPoints) fieldPosition.get(changeCreationAssert); Assertions.assertThat(fieldRowAssert.get(positionCreation)).isNull(); ChangeRowAssert changeCreationRowAssert = changeCreationAssert.rowAtStartPoint(); Assertions.assertThat(fieldRowAssert.get(positionCreation)).isNotNull(); @@ -72,26 +71,26 @@ public void test_row_at_start_point_with_assertions() throws Exception { Assertions.assertThat(fieldRowFromAssert.get(changeCreationRowAssert)).isNull(); ChangeAssert changeModificationAssert = changesAssert.change(3); - PositionWithPoints positionModification = - (PositionWithPoints) fieldPosition.get(changeModificationAssert); + PositionWithPoints positionModification = + (PositionWithPoints) fieldPosition.get(changeModificationAssert); Assertions.assertThat(fieldRowAssert.get(positionModification)).isNull(); ChangeRowAssert changeModificationRowAssert = changeModificationAssert.rowAtStartPoint(); Assertions.assertThat(fieldRowAssert.get(positionModification)).isNotNull(); ChangeRowAssert changeModificationRowAssertBis = changeModificationRowAssert.rowAtStartPoint(); Assertions.assertThat(changeModificationRowAssert).isSameAs(changeModificationRowAssertBis); Assertions.assertThat(fieldRowFromAssert.get(changeModificationRowAssert)).isEqualTo( - fieldRowFromChange.get(changes.getChangesList().get(3))); + fieldRowFromChange.get(changes.getChangesList().get(3))); ChangeAssert changeDeletionAssert = changesAssert.change(6); - PositionWithPoints positionDeletion = - (PositionWithPoints) fieldPosition.get(changeDeletionAssert); + PositionWithPoints positionDeletion = + (PositionWithPoints) fieldPosition.get(changeDeletionAssert); Assertions.assertThat(fieldRowAssert.get(positionDeletion)).isNull(); ChangeRowAssert changeDeletionRowAssert = changeDeletionAssert.rowAtStartPoint(); Assertions.assertThat(fieldRowAssert.get(positionDeletion)).isNotNull(); ChangeRowAssert changeDeletionRowAssertBis = changeDeletionRowAssert.rowAtStartPoint(); Assertions.assertThat(changeDeletionRowAssert).isSameAs(changeDeletionRowAssertBis); Assertions.assertThat(fieldRowFromAssert.get(changeDeletionRowAssert)).isEqualTo( - fieldRowFromChange.get(changes.getChangesList().get(6))); + fieldRowFromChange.get(changes.getChangesList().get(6))); } /** @@ -116,8 +115,8 @@ public void test_row_at_start_point_with_displays() throws Exception { ChangesOutputter changesOutputter = output(changes); ChangeOutputter changeCreationOutputter = changesOutputter.change(); - PositionWithPoints positionCreation = - (PositionWithPoints) fieldPosition.get(changeCreationOutputter); + PositionWithPoints positionCreation = + (PositionWithPoints) fieldPosition.get(changeCreationOutputter); Assertions.assertThat(fieldRowOutputter.get(positionCreation)).isNull(); ChangeRowOutputter changeCreationRowOutputter = changeCreationOutputter.rowAtStartPoint(); Assertions.assertThat(fieldRowOutputter.get(positionCreation)).isNotNull(); @@ -126,25 +125,25 @@ public void test_row_at_start_point_with_displays() throws Exception { Assertions.assertThat(fieldRowFromOutputter.get(changeCreationRowOutputter)).isNull(); ChangeOutputter changeModificationOutputter = changesOutputter.change(3); - PositionWithPoints positionModification = - (PositionWithPoints) fieldPosition.get(changeModificationOutputter); + PositionWithPoints positionModification = + (PositionWithPoints) fieldPosition.get(changeModificationOutputter); Assertions.assertThat(fieldRowOutputter.get(positionModification)).isNull(); ChangeRowOutputter changeModificationRowOutputter = changeModificationOutputter.rowAtStartPoint(); Assertions.assertThat(fieldRowOutputter.get(positionModification)).isNotNull(); ChangeRowOutputter changeModificationRowOutputterBis = changeModificationRowOutputter.rowAtStartPoint(); Assertions.assertThat(changeModificationRowOutputter).isSameAs(changeModificationRowOutputterBis); Assertions.assertThat(fieldRowFromOutputter.get(changeModificationRowOutputter)).isEqualTo( - fieldRowFromChange.get(changes.getChangesList().get(3))); + fieldRowFromChange.get(changes.getChangesList().get(3))); ChangeOutputter changeDeletionOutputter = changesOutputter.change(6); - PositionWithPoints positionDeletion = - (PositionWithPoints) fieldPosition.get(changeDeletionOutputter); + PositionWithPoints positionDeletion = + (PositionWithPoints) fieldPosition.get(changeDeletionOutputter); Assertions.assertThat(fieldRowOutputter.get(positionDeletion)).isNull(); ChangeRowOutputter changeDeletionRowOutputter = changeDeletionOutputter.rowAtStartPoint(); Assertions.assertThat(fieldRowOutputter.get(positionDeletion)).isNotNull(); ChangeRowOutputter changeDeletionRowOutputterBis = changeDeletionRowOutputter.rowAtStartPoint(); Assertions.assertThat(changeDeletionRowOutputter).isSameAs(changeDeletionRowOutputterBis); Assertions.assertThat(fieldRowFromOutputter.get(changeDeletionRowOutputter)).isEqualTo( - fieldRowFromChange.get(changes.getChangesList().get(6))); + fieldRowFromChange.get(changes.getChangesList().get(6))); } } diff --git a/src/test/java/org/assertj/db/navigation/ToRow_Row_Integer_Test.java b/src/test/java/org/assertj/db/navigation/ToRow_Row_Integer_Test.java index d58bb606..97466aa5 100644 --- a/src/test/java/org/assertj/db/navigation/ToRow_Row_Integer_Test.java +++ b/src/test/java/org/assertj/db/navigation/ToRow_Row_Integer_Test.java @@ -8,34 +8,44 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.navigation; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + +import java.lang.reflect.Field; +import java.math.BigDecimal; +import java.sql.Date; +import java.util.UUID; + import org.assertj.core.api.Assertions; -import org.assertj.db.api.*; +import org.assertj.db.api.AbstractDbAssert; +import org.assertj.db.api.AbstractRowAssert; +import org.assertj.db.api.RequestAssert; +import org.assertj.db.api.RequestRowAssert; +import org.assertj.db.api.TableAssert; +import org.assertj.db.api.TableRowAssert; import org.assertj.db.common.AbstractTest; import org.assertj.db.exception.AssertJDBException; -import org.assertj.db.output.*; +import org.assertj.db.output.AbstractDbOutputter; +import org.assertj.db.output.AbstractRowOutputter; +import org.assertj.db.output.Outputs; +import org.assertj.db.output.RequestOutputter; +import org.assertj.db.output.RequestRowOutputter; +import org.assertj.db.output.TableOutputter; +import org.assertj.db.output.TableRowOutputter; import org.assertj.db.type.Request; import org.assertj.db.type.Row; import org.assertj.db.type.Table; import org.junit.Test; -import java.lang.reflect.Field; -import java.math.BigDecimal; -import java.sql.Date; -import java.util.UUID; - -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.navigation.ToRow} class : * {@link org.assertj.db.navigation.ToRow#row(int)} method. * * @author Régis Pouiller - * */ public class ToRow_Row_Integer_Test extends AbstractTest { @@ -53,8 +63,8 @@ public void test_column_from_table_with_assertions() throws Exception { Table table = new Table(source, "actor"); TableAssert tableAssert = assertThat(table); - Position position = - (Position) fieldPosition.get(tableAssert); + Position position = + (Position) fieldPosition.get(tableAssert); Assertions.assertThat(fieldIndex.get(position)).isEqualTo(0); TableRowAssert tableRowAssert0 = tableAssert.row(0); Assertions.assertThat(fieldIndex.get(position)).isEqualTo(1); @@ -72,8 +82,8 @@ public void test_column_from_table_with_assertions() throws Exception { Assertions.assertThat(tableRowAssert0).isSameAs(tableRowAssertAgain0); TableAssert tableAssertBis = assertThat(table); - Position positionBis = - (Position) fieldPosition.get(tableAssertBis); + Position positionBis = + (Position) fieldPosition.get(tableAssertBis); Assertions.assertThat(fieldIndex.get(positionBis)).isEqualTo(0); TableRowAssert tableRowAssertBis0 = tableAssertBis.row(0); Assertions.assertThat(fieldIndex.get(positionBis)).isEqualTo(1); @@ -104,35 +114,35 @@ public void test_column_from_table_with_assertions() throws Exception { Row rowIdBis2 = (Row) fieldRow.get(tableRowAssertBis2); Assertions.assertThat(rowId0.getValuesList().get(0).getValue()).isEqualTo(rowIdBis0.getValuesList().get(0).getValue()) - .isEqualTo(new BigDecimal("1")); + .isEqualTo(new BigDecimal("1")); Assertions.assertThat(rowId0.getValuesList().get(1).getValue()).isEqualTo(rowIdBis0.getValuesList().get(1).getValue()) - .isEqualTo("Weaver"); + .isEqualTo("Weaver"); Assertions.assertThat(rowId0.getValuesList().get(2).getValue()).isEqualTo(rowIdBis0.getValuesList().get(2).getValue()) - .isEqualTo("Sigourney"); + .isEqualTo("Sigourney"); Assertions.assertThat(rowId0.getValuesList().get(3).getValue()).isEqualTo(rowIdBis0.getValuesList().get(3).getValue()) - .isEqualTo(Date.valueOf("1949-10-08")); + .isEqualTo(Date.valueOf("1949-10-08")); Assertions.assertThat(rowId0.getValuesList().get(4).getValue()).isEqualTo(rowIdBis0.getValuesList().get(4).getValue()) - .isEqualTo(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")); + .isEqualTo(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")); Assertions.assertThat(rowId1.getValuesList().get(0).getValue()).isEqualTo(rowIdBis1.getValuesList().get(0).getValue()) - .isEqualTo(new BigDecimal("2")); + .isEqualTo(new BigDecimal("2")); Assertions.assertThat(rowId1.getValuesList().get(1).getValue()).isEqualTo(rowIdBis1.getValuesList().get(1).getValue()) - .isEqualTo("Phoenix"); + .isEqualTo("Phoenix"); Assertions.assertThat(rowId1.getValuesList().get(2).getValue()).isEqualTo(rowIdBis1.getValuesList().get(2).getValue()) - .isEqualTo("Joaquim"); + .isEqualTo("Joaquim"); Assertions.assertThat(rowId1.getValuesList().get(3).getValue()).isEqualTo(rowIdBis1.getValuesList().get(3).getValue()) - .isEqualTo(Date.valueOf("1974-10-28")); + .isEqualTo(Date.valueOf("1974-10-28")); Assertions.assertThat(rowId1.getValuesList().get(4).getValue()).isEqualTo(rowIdBis1.getValuesList().get(4).getValue()) - .isEqualTo(UUID.fromString("16319617-AE95-4087-9264-D3D21BF611B6")); + .isEqualTo(UUID.fromString("16319617-AE95-4087-9264-D3D21BF611B6")); Assertions.assertThat(rowId2.getValuesList().get(0).getValue()).isEqualTo(rowIdBis2.getValuesList().get(0).getValue()) - .isEqualTo(new BigDecimal("3")); + .isEqualTo(new BigDecimal("3")); Assertions.assertThat(rowId2.getValuesList().get(1).getValue()).isEqualTo(rowIdBis2.getValuesList().get(1).getValue()) - .isEqualTo("Worthington"); + .isEqualTo("Worthington"); Assertions.assertThat(rowId2.getValuesList().get(2).getValue()).isEqualTo(rowIdBis2.getValuesList().get(2).getValue()) - .isEqualTo("Sam"); + .isEqualTo("Sam"); Assertions.assertThat(rowId2.getValuesList().get(3).getValue()).isEqualTo(rowIdBis2.getValuesList().get(3).getValue()) - .isEqualTo(Date.valueOf("1976-08-02")); + .isEqualTo(Date.valueOf("1976-08-02")); Assertions.assertThat(rowId2.getValuesList().get(4).getValue()).isEqualTo(rowIdBis2.getValuesList().get(4).getValue()) - .isEqualTo(UUID.fromString("D735221B-5DE5-4112-AA1E-49090CB75ADA")); + .isEqualTo(UUID.fromString("D735221B-5DE5-4112-AA1E-49090CB75ADA")); } /** @@ -149,8 +159,8 @@ public void test_column_from_request_with_assertions() throws Exception { Request request = new Request(source, "select * from actor"); RequestAssert requestAssert = assertThat(request); - Position position = - (Position) fieldPosition.get(requestAssert); + Position position = + (Position) fieldPosition.get(requestAssert); Assertions.assertThat(fieldIndex.get(position)).isEqualTo(0); RequestRowAssert requestRowAssert0 = requestAssert.row(0); Assertions.assertThat(fieldIndex.get(position)).isEqualTo(1); @@ -174,8 +184,8 @@ public void test_column_from_request_with_assertions() throws Exception { Assertions.assertThat(requestRowAssert0).isSameAs(requestRowAssertAgain0); RequestAssert requestAssertBis = assertThat(request); - Position positionBis = - (Position) fieldPosition.get(requestAssertBis); + Position positionBis = + (Position) fieldPosition.get(requestAssertBis); Assertions.assertThat(fieldIndex.get(positionBis)).isEqualTo(0); RequestRowAssert requestRowAssertBis0 = requestAssertBis.row(0); Assertions.assertThat(fieldIndex.get(positionBis)).isEqualTo(1); @@ -206,35 +216,35 @@ public void test_column_from_request_with_assertions() throws Exception { Row rowIdBis2 = (Row) fieldRow.get(requestRowAssertBis2); Assertions.assertThat(rowId0.getValuesList().get(0).getValue()).isEqualTo(rowIdBis0.getValuesList().get(0).getValue()) - .isEqualTo(new BigDecimal("1")); + .isEqualTo(new BigDecimal("1")); Assertions.assertThat(rowId0.getValuesList().get(1).getValue()).isEqualTo(rowIdBis0.getValuesList().get(1).getValue()) - .isEqualTo("Weaver"); + .isEqualTo("Weaver"); Assertions.assertThat(rowId0.getValuesList().get(2).getValue()).isEqualTo(rowIdBis0.getValuesList().get(2).getValue()) - .isEqualTo("Sigourney"); + .isEqualTo("Sigourney"); Assertions.assertThat(rowId0.getValuesList().get(3).getValue()).isEqualTo(rowIdBis0.getValuesList().get(3).getValue()) - .isEqualTo(Date.valueOf("1949-10-08")); + .isEqualTo(Date.valueOf("1949-10-08")); Assertions.assertThat(rowId0.getValuesList().get(4).getValue()).isEqualTo(rowIdBis0.getValuesList().get(4).getValue()) - .isEqualTo(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")); + .isEqualTo(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")); Assertions.assertThat(rowId1.getValuesList().get(0).getValue()).isEqualTo(rowIdBis1.getValuesList().get(0).getValue()) - .isEqualTo(new BigDecimal("2")); + .isEqualTo(new BigDecimal("2")); Assertions.assertThat(rowId1.getValuesList().get(1).getValue()).isEqualTo(rowIdBis1.getValuesList().get(1).getValue()) - .isEqualTo("Phoenix"); + .isEqualTo("Phoenix"); Assertions.assertThat(rowId1.getValuesList().get(2).getValue()).isEqualTo(rowIdBis1.getValuesList().get(2).getValue()) - .isEqualTo("Joaquim"); + .isEqualTo("Joaquim"); Assertions.assertThat(rowId1.getValuesList().get(3).getValue()).isEqualTo(rowIdBis1.getValuesList().get(3).getValue()) - .isEqualTo(Date.valueOf("1974-10-28")); + .isEqualTo(Date.valueOf("1974-10-28")); Assertions.assertThat(rowId1.getValuesList().get(4).getValue()).isEqualTo(rowIdBis1.getValuesList().get(4).getValue()) - .isEqualTo(UUID.fromString("16319617-AE95-4087-9264-D3D21BF611B6")); + .isEqualTo(UUID.fromString("16319617-AE95-4087-9264-D3D21BF611B6")); Assertions.assertThat(rowId2.getValuesList().get(0).getValue()).isEqualTo(rowIdBis2.getValuesList().get(0).getValue()) - .isEqualTo(new BigDecimal("3")); + .isEqualTo(new BigDecimal("3")); Assertions.assertThat(rowId2.getValuesList().get(1).getValue()).isEqualTo(rowIdBis2.getValuesList().get(1).getValue()) - .isEqualTo("Worthington"); + .isEqualTo("Worthington"); Assertions.assertThat(rowId2.getValuesList().get(2).getValue()).isEqualTo(rowIdBis2.getValuesList().get(2).getValue()) - .isEqualTo("Sam"); + .isEqualTo("Sam"); Assertions.assertThat(rowId2.getValuesList().get(3).getValue()).isEqualTo(rowIdBis2.getValuesList().get(3).getValue()) - .isEqualTo(Date.valueOf("1976-08-02")); + .isEqualTo(Date.valueOf("1976-08-02")); Assertions.assertThat(rowId2.getValuesList().get(4).getValue()).isEqualTo(rowIdBis2.getValuesList().get(4).getValue()) - .isEqualTo(UUID.fromString("D735221B-5DE5-4112-AA1E-49090CB75ADA")); + .isEqualTo(UUID.fromString("D735221B-5DE5-4112-AA1E-49090CB75ADA")); } /** @@ -251,8 +261,8 @@ public void test_column_from_table_with_displays() throws Exception { Table table = new Table(source, "actor"); TableOutputter tableOutputter = Outputs.output(table); - Position position = - (Position) fieldPosition.get(tableOutputter); + Position position = + (Position) fieldPosition.get(tableOutputter); Assertions.assertThat(fieldIndex.get(position)).isEqualTo(0); TableRowOutputter tableRowOutputter0 = tableOutputter.row(0); Assertions.assertThat(fieldIndex.get(position)).isEqualTo(1); @@ -270,8 +280,8 @@ public void test_column_from_table_with_displays() throws Exception { Assertions.assertThat(tableRowOutputter0).isSameAs(tableRowOutputterAgain0); TableOutputter tableOutputterBis = Outputs.output(table); - Position positionBis = - (Position) fieldPosition.get(tableOutputterBis); + Position positionBis = + (Position) fieldPosition.get(tableOutputterBis); Assertions.assertThat(fieldIndex.get(positionBis)).isEqualTo(0); TableRowOutputter tableRowOutputterBis0 = tableOutputterBis.row(0); Assertions.assertThat(fieldIndex.get(positionBis)).isEqualTo(1); @@ -302,35 +312,35 @@ public void test_column_from_table_with_displays() throws Exception { Row rowIdBis2 = (Row) fieldRow.get(tableRowOutputterBis2); Assertions.assertThat(rowId0.getValuesList().get(0).getValue()).isEqualTo(rowIdBis0.getValuesList().get(0).getValue()) - .isEqualTo(new BigDecimal("1")); + .isEqualTo(new BigDecimal("1")); Assertions.assertThat(rowId0.getValuesList().get(1).getValue()).isEqualTo(rowIdBis0.getValuesList().get(1).getValue()) - .isEqualTo("Weaver"); + .isEqualTo("Weaver"); Assertions.assertThat(rowId0.getValuesList().get(2).getValue()).isEqualTo(rowIdBis0.getValuesList().get(2).getValue()) - .isEqualTo("Sigourney"); + .isEqualTo("Sigourney"); Assertions.assertThat(rowId0.getValuesList().get(3).getValue()).isEqualTo(rowIdBis0.getValuesList().get(3).getValue()) - .isEqualTo(Date.valueOf("1949-10-08")); + .isEqualTo(Date.valueOf("1949-10-08")); Assertions.assertThat(rowId0.getValuesList().get(4).getValue()).isEqualTo(rowIdBis0.getValuesList().get(4).getValue()) - .isEqualTo(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")); + .isEqualTo(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")); Assertions.assertThat(rowId1.getValuesList().get(0).getValue()).isEqualTo(rowIdBis1.getValuesList().get(0).getValue()) - .isEqualTo(new BigDecimal("2")); + .isEqualTo(new BigDecimal("2")); Assertions.assertThat(rowId1.getValuesList().get(1).getValue()).isEqualTo(rowIdBis1.getValuesList().get(1).getValue()) - .isEqualTo("Phoenix"); + .isEqualTo("Phoenix"); Assertions.assertThat(rowId1.getValuesList().get(2).getValue()).isEqualTo(rowIdBis1.getValuesList().get(2).getValue()) - .isEqualTo("Joaquim"); + .isEqualTo("Joaquim"); Assertions.assertThat(rowId1.getValuesList().get(3).getValue()).isEqualTo(rowIdBis1.getValuesList().get(3).getValue()) - .isEqualTo(Date.valueOf("1974-10-28")); + .isEqualTo(Date.valueOf("1974-10-28")); Assertions.assertThat(rowId1.getValuesList().get(4).getValue()).isEqualTo(rowIdBis1.getValuesList().get(4).getValue()) - .isEqualTo(UUID.fromString("16319617-AE95-4087-9264-D3D21BF611B6")); + .isEqualTo(UUID.fromString("16319617-AE95-4087-9264-D3D21BF611B6")); Assertions.assertThat(rowId2.getValuesList().get(0).getValue()).isEqualTo(rowIdBis2.getValuesList().get(0).getValue()) - .isEqualTo(new BigDecimal("3")); + .isEqualTo(new BigDecimal("3")); Assertions.assertThat(rowId2.getValuesList().get(1).getValue()).isEqualTo(rowIdBis2.getValuesList().get(1).getValue()) - .isEqualTo("Worthington"); + .isEqualTo("Worthington"); Assertions.assertThat(rowId2.getValuesList().get(2).getValue()).isEqualTo(rowIdBis2.getValuesList().get(2).getValue()) - .isEqualTo("Sam"); + .isEqualTo("Sam"); Assertions.assertThat(rowId2.getValuesList().get(3).getValue()).isEqualTo(rowIdBis2.getValuesList().get(3).getValue()) - .isEqualTo(Date.valueOf("1976-08-02")); + .isEqualTo(Date.valueOf("1976-08-02")); Assertions.assertThat(rowId2.getValuesList().get(4).getValue()).isEqualTo(rowIdBis2.getValuesList().get(4).getValue()) - .isEqualTo(UUID.fromString("D735221B-5DE5-4112-AA1E-49090CB75ADA")); + .isEqualTo(UUID.fromString("D735221B-5DE5-4112-AA1E-49090CB75ADA")); } /** @@ -347,8 +357,8 @@ public void test_column_from_request_with_displays() throws Exception { Request request = new Request(source, "select * from actor"); RequestOutputter requestOutputter = Outputs.output(request); - Position position = - (Position) fieldPosition.get(requestOutputter); + Position position = + (Position) fieldPosition.get(requestOutputter); Assertions.assertThat(fieldIndex.get(position)).isEqualTo(0); RequestRowOutputter requestRowOutputter0 = requestOutputter.row(0); Assertions.assertThat(fieldIndex.get(position)).isEqualTo(1); @@ -372,8 +382,8 @@ public void test_column_from_request_with_displays() throws Exception { Assertions.assertThat(requestRowOutputter0).isSameAs(requestRowOutputterAgain0); RequestOutputter requestOutputterBis = Outputs.output(request); - Position positionBis = - (Position) fieldPosition.get(requestOutputterBis); + Position positionBis = + (Position) fieldPosition.get(requestOutputterBis); Assertions.assertThat(fieldIndex.get(positionBis)).isEqualTo(0); RequestRowOutputter requestRowOutputterBis0 = requestOutputterBis.row(0); Assertions.assertThat(fieldIndex.get(positionBis)).isEqualTo(1); @@ -404,34 +414,34 @@ public void test_column_from_request_with_displays() throws Exception { Row rowIdBis2 = (Row) fieldRow.get(requestRowOutputterBis2); Assertions.assertThat(rowId0.getValuesList().get(0).getValue()).isEqualTo(rowIdBis0.getValuesList().get(0).getValue()) - .isEqualTo(new BigDecimal("1")); + .isEqualTo(new BigDecimal("1")); Assertions.assertThat(rowId0.getValuesList().get(1).getValue()).isEqualTo(rowIdBis0.getValuesList().get(1).getValue()) - .isEqualTo("Weaver"); + .isEqualTo("Weaver"); Assertions.assertThat(rowId0.getValuesList().get(2).getValue()).isEqualTo(rowIdBis0.getValuesList().get(2).getValue()) - .isEqualTo("Sigourney"); + .isEqualTo("Sigourney"); Assertions.assertThat(rowId0.getValuesList().get(3).getValue()).isEqualTo(rowIdBis0.getValuesList().get(3).getValue()) - .isEqualTo(Date.valueOf("1949-10-08")); + .isEqualTo(Date.valueOf("1949-10-08")); Assertions.assertThat(rowId0.getValuesList().get(4).getValue()).isEqualTo(rowIdBis0.getValuesList().get(4).getValue()) - .isEqualTo(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")); + .isEqualTo(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")); Assertions.assertThat(rowId1.getValuesList().get(0).getValue()).isEqualTo(rowIdBis1.getValuesList().get(0).getValue()) - .isEqualTo(new BigDecimal("2")); + .isEqualTo(new BigDecimal("2")); Assertions.assertThat(rowId1.getValuesList().get(1).getValue()).isEqualTo(rowIdBis1.getValuesList().get(1).getValue()) - .isEqualTo("Phoenix"); + .isEqualTo("Phoenix"); Assertions.assertThat(rowId1.getValuesList().get(2).getValue()).isEqualTo(rowIdBis1.getValuesList().get(2).getValue()) - .isEqualTo("Joaquim"); + .isEqualTo("Joaquim"); Assertions.assertThat(rowId1.getValuesList().get(3).getValue()).isEqualTo(rowIdBis1.getValuesList().get(3).getValue()) - .isEqualTo(Date.valueOf("1974-10-28")); + .isEqualTo(Date.valueOf("1974-10-28")); Assertions.assertThat(rowId1.getValuesList().get(4).getValue()).isEqualTo(rowIdBis1.getValuesList().get(4).getValue()) - .isEqualTo(UUID.fromString("16319617-AE95-4087-9264-D3D21BF611B6")); + .isEqualTo(UUID.fromString("16319617-AE95-4087-9264-D3D21BF611B6")); Assertions.assertThat(rowId2.getValuesList().get(0).getValue()).isEqualTo(rowIdBis2.getValuesList().get(0).getValue()) - .isEqualTo(new BigDecimal("3")); + .isEqualTo(new BigDecimal("3")); Assertions.assertThat(rowId2.getValuesList().get(1).getValue()).isEqualTo(rowIdBis2.getValuesList().get(1).getValue()) - .isEqualTo("Worthington"); + .isEqualTo("Worthington"); Assertions.assertThat(rowId2.getValuesList().get(2).getValue()).isEqualTo(rowIdBis2.getValuesList().get(2).getValue()) - .isEqualTo("Sam"); + .isEqualTo("Sam"); Assertions.assertThat(rowId2.getValuesList().get(3).getValue()).isEqualTo(rowIdBis2.getValuesList().get(3).getValue()) - .isEqualTo(Date.valueOf("1976-08-02")); + .isEqualTo(Date.valueOf("1976-08-02")); Assertions.assertThat(rowId2.getValuesList().get(4).getValue()).isEqualTo(rowIdBis2.getValuesList().get(4).getValue()) - .isEqualTo(UUID.fromString("D735221B-5DE5-4112-AA1E-49090CB75ADA")); + .isEqualTo(UUID.fromString("D735221B-5DE5-4112-AA1E-49090CB75ADA")); } } diff --git a/src/test/java/org/assertj/db/navigation/ToRow_Row_Test.java b/src/test/java/org/assertj/db/navigation/ToRow_Row_Test.java index 58d84466..63798128 100644 --- a/src/test/java/org/assertj/db/navigation/ToRow_Row_Test.java +++ b/src/test/java/org/assertj/db/navigation/ToRow_Row_Test.java @@ -8,34 +8,44 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.navigation; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + +import java.lang.reflect.Field; +import java.math.BigDecimal; +import java.sql.Date; +import java.util.UUID; + import org.assertj.core.api.Assertions; -import org.assertj.db.api.*; +import org.assertj.db.api.AbstractDbAssert; +import org.assertj.db.api.AbstractRowAssert; +import org.assertj.db.api.RequestAssert; +import org.assertj.db.api.RequestRowAssert; +import org.assertj.db.api.TableAssert; +import org.assertj.db.api.TableRowAssert; import org.assertj.db.common.AbstractTest; import org.assertj.db.exception.AssertJDBException; -import org.assertj.db.output.*; +import org.assertj.db.output.AbstractDbOutputter; +import org.assertj.db.output.AbstractRowOutputter; +import org.assertj.db.output.Outputs; +import org.assertj.db.output.RequestOutputter; +import org.assertj.db.output.RequestRowOutputter; +import org.assertj.db.output.TableOutputter; +import org.assertj.db.output.TableRowOutputter; import org.assertj.db.type.Request; import org.assertj.db.type.Row; import org.assertj.db.type.Table; import org.junit.Test; -import java.lang.reflect.Field; -import java.math.BigDecimal; -import java.sql.Date; -import java.util.UUID; - -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.navigation.ToRow} class : * {@link org.assertj.db.navigation.ToRow#row()} method. * * @author Régis Pouiller - * */ public class ToRow_Row_Test extends AbstractTest { @@ -53,8 +63,8 @@ public void test_row_from_table_with_assertions() throws Exception { Table table = new Table(source, "actor"); TableAssert tableAssert = assertThat(table); - Position position = - (Position) fieldPosition.get(tableAssert); + Position position = + (Position) fieldPosition.get(tableAssert); Assertions.assertThat(fieldIndex.get(position)).isEqualTo(0); TableRowAssert tableRowAssert0 = tableAssert.row(); Assertions.assertThat(fieldIndex.get(position)).isEqualTo(1); @@ -70,8 +80,8 @@ public void test_row_from_table_with_assertions() throws Exception { } TableAssert tableAssertBis = assertThat(table); - Position positionBis = - (Position) fieldPosition.get(tableAssertBis); + Position positionBis = + (Position) fieldPosition.get(tableAssertBis); Assertions.assertThat(fieldIndex.get(positionBis)).isEqualTo(0); TableRowAssert tableRowAssertBis0 = tableAssertBis.row(); Assertions.assertThat(fieldIndex.get(positionBis)).isEqualTo(1); @@ -94,35 +104,35 @@ public void test_row_from_table_with_assertions() throws Exception { Row rowIdBis2 = (Row) fieldRow.get(tableRowAssertBis2); Assertions.assertThat(rowId0.getValuesList().get(0).getValue()).isEqualTo(rowIdBis0.getValuesList().get(0).getValue()) - .isEqualTo(new BigDecimal("1")); + .isEqualTo(new BigDecimal("1")); Assertions.assertThat(rowId0.getValuesList().get(1).getValue()).isEqualTo(rowIdBis0.getValuesList().get(1).getValue()) - .isEqualTo("Weaver"); + .isEqualTo("Weaver"); Assertions.assertThat(rowId0.getValuesList().get(2).getValue()).isEqualTo(rowIdBis0.getValuesList().get(2).getValue()) - .isEqualTo("Sigourney"); + .isEqualTo("Sigourney"); Assertions.assertThat(rowId0.getValuesList().get(3).getValue()).isEqualTo(rowIdBis0.getValuesList().get(3).getValue()) - .isEqualTo(Date.valueOf("1949-10-08")); + .isEqualTo(Date.valueOf("1949-10-08")); Assertions.assertThat(rowId0.getValuesList().get(4).getValue()).isEqualTo(rowIdBis0.getValuesList().get(4).getValue()) - .isEqualTo(UUID.fromString("30b443ae-c0c9-4790-9bec-ce1380808435")); + .isEqualTo(UUID.fromString("30b443ae-c0c9-4790-9bec-ce1380808435")); Assertions.assertThat(rowId1.getValuesList().get(0).getValue()).isEqualTo(rowIdBis1.getValuesList().get(0).getValue()) - .isEqualTo(new BigDecimal("2")); + .isEqualTo(new BigDecimal("2")); Assertions.assertThat(rowId1.getValuesList().get(1).getValue()).isEqualTo(rowIdBis1.getValuesList().get(1).getValue()) - .isEqualTo("Phoenix"); + .isEqualTo("Phoenix"); Assertions.assertThat(rowId1.getValuesList().get(2).getValue()).isEqualTo(rowIdBis1.getValuesList().get(2).getValue()) - .isEqualTo("Joaquim"); + .isEqualTo("Joaquim"); Assertions.assertThat(rowId1.getValuesList().get(3).getValue()).isEqualTo(rowIdBis1.getValuesList().get(3).getValue()) - .isEqualTo(Date.valueOf("1974-10-28")); + .isEqualTo(Date.valueOf("1974-10-28")); Assertions.assertThat(rowId1.getValuesList().get(4).getValue()).isEqualTo(rowIdBis1.getValuesList().get(4).getValue()) - .isEqualTo(UUID.fromString("16319617-AE95-4087-9264-D3D21BF611B6")); + .isEqualTo(UUID.fromString("16319617-AE95-4087-9264-D3D21BF611B6")); Assertions.assertThat(rowId2.getValuesList().get(0).getValue()).isEqualTo(rowIdBis2.getValuesList().get(0).getValue()) - .isEqualTo(new BigDecimal("3")); + .isEqualTo(new BigDecimal("3")); Assertions.assertThat(rowId2.getValuesList().get(1).getValue()).isEqualTo(rowIdBis2.getValuesList().get(1).getValue()) - .isEqualTo("Worthington"); + .isEqualTo("Worthington"); Assertions.assertThat(rowId2.getValuesList().get(2).getValue()).isEqualTo(rowIdBis2.getValuesList().get(2).getValue()) - .isEqualTo("Sam"); + .isEqualTo("Sam"); Assertions.assertThat(rowId2.getValuesList().get(3).getValue()).isEqualTo(rowIdBis2.getValuesList().get(3).getValue()) - .isEqualTo(Date.valueOf("1976-08-02")); + .isEqualTo(Date.valueOf("1976-08-02")); Assertions.assertThat(rowId2.getValuesList().get(4).getValue()).isEqualTo(rowIdBis2.getValuesList().get(4).getValue()) - .isEqualTo(UUID.fromString("D735221B-5DE5-4112-AA1E-49090CB75ADA")); + .isEqualTo(UUID.fromString("D735221B-5DE5-4112-AA1E-49090CB75ADA")); } /** @@ -139,8 +149,8 @@ public void test_row_from_request_with_assertions() throws Exception { Request request = new Request(source, "select * from actor"); RequestAssert requestAssert = assertThat(request); - Position position = - (Position) fieldPosition.get(requestAssert); + Position position = + (Position) fieldPosition.get(requestAssert); Assertions.assertThat(fieldIndex.get(position)).isEqualTo(0); RequestRowAssert requestRowAssert0 = requestAssert.row(); Assertions.assertThat(fieldIndex.get(position)).isEqualTo(1); @@ -156,8 +166,8 @@ public void test_row_from_request_with_assertions() throws Exception { } RequestAssert requestAssertBis = assertThat(request); - Position positionBis = - (Position) fieldPosition.get(requestAssertBis); + Position positionBis = + (Position) fieldPosition.get(requestAssertBis); Assertions.assertThat(fieldIndex.get(positionBis)).isEqualTo(0); RequestRowAssert requestRowAssertBis0 = requestAssertBis.row(); Assertions.assertThat(fieldIndex.get(positionBis)).isEqualTo(1); @@ -180,35 +190,35 @@ public void test_row_from_request_with_assertions() throws Exception { Row rowIdBis2 = (Row) fieldRow.get(requestRowAssertBis2); Assertions.assertThat(rowId0.getValuesList().get(0).getValue()).isEqualTo(rowIdBis0.getValuesList().get(0).getValue()) - .isEqualTo(new BigDecimal("1")); + .isEqualTo(new BigDecimal("1")); Assertions.assertThat(rowId0.getValuesList().get(1).getValue()).isEqualTo(rowIdBis0.getValuesList().get(1).getValue()) - .isEqualTo("Weaver"); + .isEqualTo("Weaver"); Assertions.assertThat(rowId0.getValuesList().get(2).getValue()).isEqualTo(rowIdBis0.getValuesList().get(2).getValue()) - .isEqualTo("Sigourney"); + .isEqualTo("Sigourney"); Assertions.assertThat(rowId0.getValuesList().get(3).getValue()).isEqualTo(rowIdBis0.getValuesList().get(3).getValue()) - .isEqualTo(Date.valueOf("1949-10-08")); + .isEqualTo(Date.valueOf("1949-10-08")); Assertions.assertThat(rowId0.getValuesList().get(4).getValue()).isEqualTo(rowIdBis0.getValuesList().get(4).getValue()) - .isEqualTo(UUID.fromString("30b443ae-c0c9-4790-9bec-ce1380808435")); + .isEqualTo(UUID.fromString("30b443ae-c0c9-4790-9bec-ce1380808435")); Assertions.assertThat(rowId1.getValuesList().get(0).getValue()).isEqualTo(rowIdBis1.getValuesList().get(0).getValue()) - .isEqualTo(new BigDecimal("2")); + .isEqualTo(new BigDecimal("2")); Assertions.assertThat(rowId1.getValuesList().get(1).getValue()).isEqualTo(rowIdBis1.getValuesList().get(1).getValue()) - .isEqualTo("Phoenix"); + .isEqualTo("Phoenix"); Assertions.assertThat(rowId1.getValuesList().get(2).getValue()).isEqualTo(rowIdBis1.getValuesList().get(2).getValue()) - .isEqualTo("Joaquim"); + .isEqualTo("Joaquim"); Assertions.assertThat(rowId1.getValuesList().get(3).getValue()).isEqualTo(rowIdBis1.getValuesList().get(3).getValue()) - .isEqualTo(Date.valueOf("1974-10-28")); + .isEqualTo(Date.valueOf("1974-10-28")); Assertions.assertThat(rowId1.getValuesList().get(4).getValue()).isEqualTo(rowIdBis1.getValuesList().get(4).getValue()) - .isEqualTo(UUID.fromString("16319617-AE95-4087-9264-D3D21BF611B6")); + .isEqualTo(UUID.fromString("16319617-AE95-4087-9264-D3D21BF611B6")); Assertions.assertThat(rowId2.getValuesList().get(0).getValue()).isEqualTo(rowIdBis2.getValuesList().get(0).getValue()) - .isEqualTo(new BigDecimal("3")); + .isEqualTo(new BigDecimal("3")); Assertions.assertThat(rowId2.getValuesList().get(1).getValue()).isEqualTo(rowIdBis2.getValuesList().get(1).getValue()) - .isEqualTo("Worthington"); + .isEqualTo("Worthington"); Assertions.assertThat(rowId2.getValuesList().get(2).getValue()).isEqualTo(rowIdBis2.getValuesList().get(2).getValue()) - .isEqualTo("Sam"); + .isEqualTo("Sam"); Assertions.assertThat(rowId2.getValuesList().get(3).getValue()).isEqualTo(rowIdBis2.getValuesList().get(3).getValue()) - .isEqualTo(Date.valueOf("1976-08-02")); + .isEqualTo(Date.valueOf("1976-08-02")); Assertions.assertThat(rowId2.getValuesList().get(4).getValue()).isEqualTo(rowIdBis2.getValuesList().get(4).getValue()) - .isEqualTo(UUID.fromString("D735221B-5DE5-4112-AA1E-49090CB75ADA")); + .isEqualTo(UUID.fromString("D735221B-5DE5-4112-AA1E-49090CB75ADA")); } /** @@ -225,8 +235,8 @@ public void test_row_from_table_with_displays() throws Exception { Table table = new Table(source, "actor"); TableOutputter tableOutputter = Outputs.output(table); - Position position = - (Position) fieldPosition.get(tableOutputter); + Position position = + (Position) fieldPosition.get(tableOutputter); Assertions.assertThat(fieldIndex.get(position)).isEqualTo(0); TableRowOutputter tableRowOutputter0 = tableOutputter.row(); Assertions.assertThat(fieldIndex.get(position)).isEqualTo(1); @@ -242,8 +252,8 @@ public void test_row_from_table_with_displays() throws Exception { } TableOutputter tableOutputterBis = Outputs.output(table); - Position positionBis = - (Position) fieldPosition.get(tableOutputterBis); + Position positionBis = + (Position) fieldPosition.get(tableOutputterBis); Assertions.assertThat(fieldIndex.get(positionBis)).isEqualTo(0); TableRowOutputter tableRowOutputterBis0 = tableOutputterBis.row(); Assertions.assertThat(fieldIndex.get(positionBis)).isEqualTo(1); @@ -266,35 +276,35 @@ public void test_row_from_table_with_displays() throws Exception { Row rowIdBis2 = (Row) fieldRow.get(tableRowOutputterBis2); Assertions.assertThat(rowId0.getValuesList().get(0).getValue()).isEqualTo(rowIdBis0.getValuesList().get(0).getValue()) - .isEqualTo(new BigDecimal("1")); + .isEqualTo(new BigDecimal("1")); Assertions.assertThat(rowId0.getValuesList().get(1).getValue()).isEqualTo(rowIdBis0.getValuesList().get(1).getValue()) - .isEqualTo("Weaver"); + .isEqualTo("Weaver"); Assertions.assertThat(rowId0.getValuesList().get(2).getValue()).isEqualTo(rowIdBis0.getValuesList().get(2).getValue()) - .isEqualTo("Sigourney"); + .isEqualTo("Sigourney"); Assertions.assertThat(rowId0.getValuesList().get(3).getValue()).isEqualTo(rowIdBis0.getValuesList().get(3).getValue()) - .isEqualTo(Date.valueOf("1949-10-08")); + .isEqualTo(Date.valueOf("1949-10-08")); Assertions.assertThat(rowId0.getValuesList().get(4).getValue()).isEqualTo(rowIdBis0.getValuesList().get(4).getValue()) - .isEqualTo(UUID.fromString("30b443ae-c0c9-4790-9bec-ce1380808435")); + .isEqualTo(UUID.fromString("30b443ae-c0c9-4790-9bec-ce1380808435")); Assertions.assertThat(rowId1.getValuesList().get(0).getValue()).isEqualTo(rowIdBis1.getValuesList().get(0).getValue()) - .isEqualTo(new BigDecimal("2")); + .isEqualTo(new BigDecimal("2")); Assertions.assertThat(rowId1.getValuesList().get(1).getValue()).isEqualTo(rowIdBis1.getValuesList().get(1).getValue()) - .isEqualTo("Phoenix"); + .isEqualTo("Phoenix"); Assertions.assertThat(rowId1.getValuesList().get(2).getValue()).isEqualTo(rowIdBis1.getValuesList().get(2).getValue()) - .isEqualTo("Joaquim"); + .isEqualTo("Joaquim"); Assertions.assertThat(rowId1.getValuesList().get(3).getValue()).isEqualTo(rowIdBis1.getValuesList().get(3).getValue()) - .isEqualTo(Date.valueOf("1974-10-28")); + .isEqualTo(Date.valueOf("1974-10-28")); Assertions.assertThat(rowId1.getValuesList().get(4).getValue()).isEqualTo(rowIdBis1.getValuesList().get(4).getValue()) - .isEqualTo(UUID.fromString("16319617-AE95-4087-9264-D3D21BF611B6")); + .isEqualTo(UUID.fromString("16319617-AE95-4087-9264-D3D21BF611B6")); Assertions.assertThat(rowId2.getValuesList().get(0).getValue()).isEqualTo(rowIdBis2.getValuesList().get(0).getValue()) - .isEqualTo(new BigDecimal("3")); + .isEqualTo(new BigDecimal("3")); Assertions.assertThat(rowId2.getValuesList().get(1).getValue()).isEqualTo(rowIdBis2.getValuesList().get(1).getValue()) - .isEqualTo("Worthington"); + .isEqualTo("Worthington"); Assertions.assertThat(rowId2.getValuesList().get(2).getValue()).isEqualTo(rowIdBis2.getValuesList().get(2).getValue()) - .isEqualTo("Sam"); + .isEqualTo("Sam"); Assertions.assertThat(rowId2.getValuesList().get(3).getValue()).isEqualTo(rowIdBis2.getValuesList().get(3).getValue()) - .isEqualTo(Date.valueOf("1976-08-02")); + .isEqualTo(Date.valueOf("1976-08-02")); Assertions.assertThat(rowId2.getValuesList().get(4).getValue()).isEqualTo(rowIdBis2.getValuesList().get(4).getValue()) - .isEqualTo(UUID.fromString("D735221B-5DE5-4112-AA1E-49090CB75ADA")); + .isEqualTo(UUID.fromString("D735221B-5DE5-4112-AA1E-49090CB75ADA")); } /** @@ -311,8 +321,8 @@ public void test_row_from_request_with_displays() throws Exception { Request request = new Request(source, "select * from actor"); RequestOutputter requestOutputter = Outputs.output(request); - Position position = - (Position) fieldPosition.get(requestOutputter); + Position position = + (Position) fieldPosition.get(requestOutputter); Assertions.assertThat(fieldIndex.get(position)).isEqualTo(0); RequestRowOutputter requestRowOutputter0 = requestOutputter.row(); Assertions.assertThat(fieldIndex.get(position)).isEqualTo(1); @@ -328,8 +338,8 @@ public void test_row_from_request_with_displays() throws Exception { } RequestOutputter requestOutputterBis = Outputs.output(request); - Position positionBis = - (Position) fieldPosition.get(requestOutputterBis); + Position positionBis = + (Position) fieldPosition.get(requestOutputterBis); Assertions.assertThat(fieldIndex.get(positionBis)).isEqualTo(0); RequestRowOutputter requestRowOutputterBis0 = requestOutputterBis.row(); Assertions.assertThat(fieldIndex.get(positionBis)).isEqualTo(1); @@ -352,34 +362,34 @@ public void test_row_from_request_with_displays() throws Exception { Row rowIdBis2 = (Row) fieldRow.get(requestRowOutputterBis2); Assertions.assertThat(rowId0.getValuesList().get(0).getValue()).isEqualTo(rowIdBis0.getValuesList().get(0).getValue()) - .isEqualTo(new BigDecimal("1")); + .isEqualTo(new BigDecimal("1")); Assertions.assertThat(rowId0.getValuesList().get(1).getValue()).isEqualTo(rowIdBis0.getValuesList().get(1).getValue()) - .isEqualTo("Weaver"); + .isEqualTo("Weaver"); Assertions.assertThat(rowId0.getValuesList().get(2).getValue()).isEqualTo(rowIdBis0.getValuesList().get(2).getValue()) - .isEqualTo("Sigourney"); + .isEqualTo("Sigourney"); Assertions.assertThat(rowId0.getValuesList().get(3).getValue()).isEqualTo(rowIdBis0.getValuesList().get(3).getValue()) - .isEqualTo(Date.valueOf("1949-10-08")); + .isEqualTo(Date.valueOf("1949-10-08")); Assertions.assertThat(rowId0.getValuesList().get(4).getValue()).isEqualTo(rowIdBis0.getValuesList().get(4).getValue()) - .isEqualTo(UUID.fromString("30b443ae-c0c9-4790-9bec-ce1380808435")); + .isEqualTo(UUID.fromString("30b443ae-c0c9-4790-9bec-ce1380808435")); Assertions.assertThat(rowId1.getValuesList().get(0).getValue()).isEqualTo(rowIdBis1.getValuesList().get(0).getValue()) - .isEqualTo(new BigDecimal("2")); + .isEqualTo(new BigDecimal("2")); Assertions.assertThat(rowId1.getValuesList().get(1).getValue()).isEqualTo(rowIdBis1.getValuesList().get(1).getValue()) - .isEqualTo("Phoenix"); + .isEqualTo("Phoenix"); Assertions.assertThat(rowId1.getValuesList().get(2).getValue()).isEqualTo(rowIdBis1.getValuesList().get(2).getValue()) - .isEqualTo("Joaquim"); + .isEqualTo("Joaquim"); Assertions.assertThat(rowId1.getValuesList().get(3).getValue()).isEqualTo(rowIdBis1.getValuesList().get(3).getValue()) - .isEqualTo(Date.valueOf("1974-10-28")); + .isEqualTo(Date.valueOf("1974-10-28")); Assertions.assertThat(rowId1.getValuesList().get(4).getValue()).isEqualTo(rowIdBis1.getValuesList().get(4).getValue()) - .isEqualTo(UUID.fromString("16319617-AE95-4087-9264-D3D21BF611B6")); + .isEqualTo(UUID.fromString("16319617-AE95-4087-9264-D3D21BF611B6")); Assertions.assertThat(rowId2.getValuesList().get(0).getValue()).isEqualTo(rowIdBis2.getValuesList().get(0).getValue()) - .isEqualTo(new BigDecimal("3")); + .isEqualTo(new BigDecimal("3")); Assertions.assertThat(rowId2.getValuesList().get(1).getValue()).isEqualTo(rowIdBis2.getValuesList().get(1).getValue()) - .isEqualTo("Worthington"); + .isEqualTo("Worthington"); Assertions.assertThat(rowId2.getValuesList().get(2).getValue()).isEqualTo(rowIdBis2.getValuesList().get(2).getValue()) - .isEqualTo("Sam"); + .isEqualTo("Sam"); Assertions.assertThat(rowId2.getValuesList().get(3).getValue()).isEqualTo(rowIdBis2.getValuesList().get(3).getValue()) - .isEqualTo(Date.valueOf("1976-08-02")); + .isEqualTo(Date.valueOf("1976-08-02")); Assertions.assertThat(rowId2.getValuesList().get(4).getValue()).isEqualTo(rowIdBis2.getValuesList().get(4).getValue()) - .isEqualTo(UUID.fromString("D735221B-5DE5-4112-AA1E-49090CB75ADA")); + .isEqualTo(UUID.fromString("D735221B-5DE5-4112-AA1E-49090CB75ADA")); } } diff --git a/src/test/java/org/assertj/db/navigation/ToValueFromColumn_ValueAtEndPoint_Test.java b/src/test/java/org/assertj/db/navigation/ToValueFromColumn_ValueAtEndPoint_Test.java index 9b9d2d54..732ed634 100644 --- a/src/test/java/org/assertj/db/navigation/ToValueFromColumn_ValueAtEndPoint_Test.java +++ b/src/test/java/org/assertj/db/navigation/ToValueFromColumn_ValueAtEndPoint_Test.java @@ -8,31 +8,38 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.navigation; +import static org.assertj.db.api.Assertions.assertThat; +import static org.assertj.db.output.Outputs.output; + +import java.lang.reflect.Field; +import java.math.BigDecimal; + import org.assertj.core.api.Assertions; -import org.assertj.db.api.*; +import org.assertj.db.api.AbstractAssertWithValues; +import org.assertj.db.api.ChangeAssert; +import org.assertj.db.api.ChangeColumnAssert; +import org.assertj.db.api.ChangeColumnValueAssert; +import org.assertj.db.api.ChangesAssert; import org.assertj.db.common.AbstractTest; import org.assertj.db.common.NeedReload; -import org.assertj.db.output.*; +import org.assertj.db.output.AbstractOutputterWithValues; +import org.assertj.db.output.ChangeColumnOutputter; +import org.assertj.db.output.ChangeColumnValueOutputter; +import org.assertj.db.output.ChangeOutputter; +import org.assertj.db.output.ChangesOutputter; import org.assertj.db.type.Changes; import org.assertj.db.type.Value; import org.junit.Test; -import java.lang.reflect.Field; -import java.math.BigDecimal; - -import static org.assertj.db.api.Assertions.assertThat; -import static org.assertj.db.output.Outputs.output; - /** * Tests on {@link org.assertj.db.navigation.ToValueFromColumn} class : * {@link org.assertj.db.navigation.ToValueFromColumn#valueAtEndPoint()} method. * * @author Régis Pouiller - * */ public class ToValueFromColumn_ValueAtEndPoint_Test extends AbstractTest { @@ -66,8 +73,8 @@ public void test_value_at_end_point_with_assertions() throws Exception { ChangeColumnValueAssert changeCreationRowValueAssertBis = changeColumnCreationAssert.valueAtEndPoint(); Assertions.assertThat(changeColumnValueCreationAssert).isSameAs(changeCreationRowValueAssertBis); Assertions.assertThat(((Value) fieldValueFromColumnAssert.get(changeColumnCreationAssert)).getValue()).isSameAs( - ((Value) fieldValueFromValueAssert.get(changeColumnValueCreationAssert)).getValue()).isEqualTo( - new BigDecimal("4")); + ((Value) fieldValueFromValueAssert.get(changeColumnValueCreationAssert)).getValue()).isEqualTo( + new BigDecimal("4")); ChangeAssert changeModificationAssert = changesAssert.change(3); ChangeColumnAssert changeColumnModificationAssert = changeModificationAssert.column(); @@ -78,8 +85,8 @@ public void test_value_at_end_point_with_assertions() throws Exception { ChangeColumnValueAssert changeModificationRowValueAssertBis = changeColumnValueModificationAssert.valueAtEndPoint(); Assertions.assertThat(changeColumnValueModificationAssert).isSameAs(changeModificationRowValueAssertBis); Assertions.assertThat(((Value) fieldValueFromColumnAssert.get(changeColumnModificationAssert)).getValue()).isSameAs( - ((Value) fieldValueFromValueAssert.get(changeColumnValueModificationAssert)).getValue()).isEqualTo( - new BigDecimal("1")); + ((Value) fieldValueFromValueAssert.get(changeColumnValueModificationAssert)).getValue()).isEqualTo( + new BigDecimal("1")); ChangeAssert changeDeletionAssert = changesAssert.change(6); ChangeColumnAssert changeColumnDeletionAssert = changeDeletionAssert.column(); @@ -123,8 +130,8 @@ public void test_value_at_end_point_with_displays() throws Exception { ChangeColumnValueOutputter changeCreationRowValueOutputterBis = changeColumnCreationOutputter.valueAtEndPoint(); Assertions.assertThat(changeColumnValueCreationOutputter).isSameAs(changeCreationRowValueOutputterBis); Assertions.assertThat(((Value) fieldValueFromColumnOutputter.get(changeColumnCreationOutputter)).getValue()).isSameAs( - ((Value) fieldValueFromValueOutputter.get(changeColumnValueCreationOutputter)).getValue()).isEqualTo( - new BigDecimal("4")); + ((Value) fieldValueFromValueOutputter.get(changeColumnValueCreationOutputter)).getValue()).isEqualTo( + new BigDecimal("4")); ChangeOutputter changeModificationOutputter = changesOutputter.change(3); ChangeColumnOutputter changeColumnModificationOutputter = changeModificationOutputter.column(); @@ -135,8 +142,8 @@ public void test_value_at_end_point_with_displays() throws Exception { ChangeColumnValueOutputter changeModificationRowValueOutputterBis = changeColumnValueModificationOutputter.valueAtEndPoint(); Assertions.assertThat(changeColumnValueModificationOutputter).isSameAs(changeModificationRowValueOutputterBis); Assertions.assertThat(((Value) fieldValueFromColumnOutputter.get(changeColumnModificationOutputter)).getValue()).isSameAs( - ((Value) fieldValueFromValueOutputter.get(changeColumnValueModificationOutputter)).getValue()).isEqualTo( - new BigDecimal("1")); + ((Value) fieldValueFromValueOutputter.get(changeColumnValueModificationOutputter)).getValue()).isEqualTo( + new BigDecimal("1")); ChangeOutputter changeDeletionOutputter = changesOutputter.change(6); ChangeColumnOutputter changeColumnDeletionOutputter = changeDeletionOutputter.column(); diff --git a/src/test/java/org/assertj/db/navigation/ToValueFromColumn_ValueAtStartPoint_Test.java b/src/test/java/org/assertj/db/navigation/ToValueFromColumn_ValueAtStartPoint_Test.java index dda620a4..86881417 100644 --- a/src/test/java/org/assertj/db/navigation/ToValueFromColumn_ValueAtStartPoint_Test.java +++ b/src/test/java/org/assertj/db/navigation/ToValueFromColumn_ValueAtStartPoint_Test.java @@ -8,31 +8,38 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.navigation; +import static org.assertj.db.api.Assertions.assertThat; +import static org.assertj.db.output.Outputs.output; + +import java.lang.reflect.Field; +import java.math.BigDecimal; + import org.assertj.core.api.Assertions; -import org.assertj.db.api.*; +import org.assertj.db.api.AbstractAssertWithValues; +import org.assertj.db.api.ChangeAssert; +import org.assertj.db.api.ChangeColumnAssert; +import org.assertj.db.api.ChangeColumnValueAssert; +import org.assertj.db.api.ChangesAssert; import org.assertj.db.common.AbstractTest; import org.assertj.db.common.NeedReload; -import org.assertj.db.output.*; +import org.assertj.db.output.AbstractOutputterWithValues; +import org.assertj.db.output.ChangeColumnOutputter; +import org.assertj.db.output.ChangeColumnValueOutputter; +import org.assertj.db.output.ChangeOutputter; +import org.assertj.db.output.ChangesOutputter; import org.assertj.db.type.Changes; import org.assertj.db.type.Value; import org.junit.Test; -import java.lang.reflect.Field; -import java.math.BigDecimal; - -import static org.assertj.db.api.Assertions.assertThat; -import static org.assertj.db.output.Outputs.output; - /** * Tests on {@link org.assertj.db.navigation.ToValueFromColumn} class : * {@link org.assertj.db.navigation.ToValueFromColumn#valueAtStartPoint()} method. * * @author Régis Pouiller - * */ public class ToValueFromColumn_ValueAtStartPoint_Test extends AbstractTest { @@ -65,7 +72,7 @@ public void test_value_at_start_point_with_assertions() throws Exception { Assertions.assertThat(fieldRowAssert.get(positionCreation)).isNotNull(); ChangeColumnValueAssert changeCreationRowValueAssertBis = changeColumnCreationAssert.valueAtStartPoint(); Assertions.assertThat(changeColumnValueCreationAssert).isSameAs( - changeCreationRowValueAssertBis); + changeCreationRowValueAssertBis); Assertions.assertThat(((Value) fieldValueFromColumnAssert.get(changeColumnCreationAssert)).getValue()).isNull(); Assertions.assertThat(((Value) fieldValueFromValueAssert.get(changeColumnValueCreationAssert)).getValue()).isNull(); @@ -78,8 +85,8 @@ public void test_value_at_start_point_with_assertions() throws Exception { ChangeColumnValueAssert changeModificationRowValueAssertBis = changeColumnValueModificationAssert.valueAtStartPoint(); Assertions.assertThat(changeColumnValueModificationAssert).isSameAs(changeModificationRowValueAssertBis); Assertions.assertThat(((Value) fieldValueFromColumnAssert.get(changeColumnModificationAssert)).getValue()).isSameAs( - ((Value) fieldValueFromValueAssert.get(changeColumnValueModificationAssert)).getValue()).isEqualTo( - new BigDecimal("1")); + ((Value) fieldValueFromValueAssert.get(changeColumnValueModificationAssert)).getValue()).isEqualTo( + new BigDecimal("1")); ChangeAssert changeDeletionAssert = changesAssert.change(6); ChangeColumnAssert changeColumnDeletionAssert = changeDeletionAssert.column(); @@ -90,8 +97,8 @@ public void test_value_at_start_point_with_assertions() throws Exception { ChangeColumnValueAssert changeDeletionRowValueAssertBis = changeColumnDeletionAssert.valueAtStartPoint(); Assertions.assertThat(changeColumnValueDeletionAssert).isSameAs(changeDeletionRowValueAssertBis); Assertions.assertThat(((Value) fieldValueFromColumnAssert.get(changeColumnDeletionAssert)).getValue()).isSameAs( - ((Value) fieldValueFromValueAssert.get(changeColumnValueDeletionAssert)).getValue()).isEqualTo( - new BigDecimal("3")); + ((Value) fieldValueFromValueAssert.get(changeColumnValueDeletionAssert)).getValue()).isEqualTo( + new BigDecimal("3")); } /** @@ -123,7 +130,7 @@ public void test_value_at_start_point_with_displays() throws Exception { Assertions.assertThat(fieldRowOutputter.get(positionCreation)).isNotNull(); ChangeColumnValueOutputter changeCreationRowValueOutputterBis = changeColumnCreationOutputter.valueAtStartPoint(); Assertions.assertThat(changeColumnValueCreationOutputter).isSameAs( - changeCreationRowValueOutputterBis); + changeCreationRowValueOutputterBis); Assertions.assertThat(((Value) fieldValueFromColumnOutputter.get(changeColumnCreationOutputter)).getValue()).isNull(); Assertions.assertThat(((Value) fieldValueFromValueOutputter.get(changeColumnValueCreationOutputter)).getValue()).isNull(); @@ -136,8 +143,8 @@ public void test_value_at_start_point_with_displays() throws Exception { ChangeColumnValueOutputter changeModificationRowValueOutputterBis = changeColumnValueModificationOutputter.valueAtStartPoint(); Assertions.assertThat(changeColumnValueModificationOutputter).isSameAs(changeModificationRowValueOutputterBis); Assertions.assertThat(((Value) fieldValueFromColumnOutputter.get(changeColumnModificationOutputter)).getValue()).isSameAs( - ((Value) fieldValueFromValueOutputter.get(changeColumnValueModificationOutputter)).getValue()).isEqualTo( - new BigDecimal("1")); + ((Value) fieldValueFromValueOutputter.get(changeColumnValueModificationOutputter)).getValue()).isEqualTo( + new BigDecimal("1")); ChangeOutputter changeDeletionOutputter = changesOutputter.change(6); ChangeColumnOutputter changeColumnDeletionOutputter = changeDeletionOutputter.column(); @@ -148,7 +155,7 @@ public void test_value_at_start_point_with_displays() throws Exception { ChangeColumnValueOutputter changeDeletionRowValueOutputterBis = changeColumnDeletionOutputter.valueAtStartPoint(); Assertions.assertThat(changeColumnValueDeletionOutputter).isSameAs(changeDeletionRowValueOutputterBis); Assertions.assertThat(((Value) fieldValueFromColumnOutputter.get(changeColumnDeletionOutputter)).getValue()).isSameAs( - ((Value) fieldValueFromValueOutputter.get(changeColumnValueDeletionOutputter)).getValue()).isEqualTo( - new BigDecimal("3")); + ((Value) fieldValueFromValueOutputter.get(changeColumnValueDeletionOutputter)).getValue()).isEqualTo( + new BigDecimal("3")); } } diff --git a/src/test/java/org/assertj/db/navigation/ToValueFromRow_Value_String_Test.java b/src/test/java/org/assertj/db/navigation/ToValueFromRow_Value_String_Test.java index 97289502..0804f38e 100644 --- a/src/test/java/org/assertj/db/navigation/ToValueFromRow_Value_String_Test.java +++ b/src/test/java/org/assertj/db/navigation/ToValueFromRow_Value_String_Test.java @@ -8,12 +8,31 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.navigation; +import static org.assertj.db.api.Assertions.assertThat; +import static org.junit.Assert.fail; + +import java.lang.reflect.Field; +import java.math.BigDecimal; +import java.sql.Date; + import org.assertj.core.api.Assertions; -import org.assertj.db.api.*; +import org.assertj.db.api.AbstractAssertWithValues; +import org.assertj.db.api.AbstractRowAssert; +import org.assertj.db.api.AbstractValueAssert; +import org.assertj.db.api.ChangeAssert; +import org.assertj.db.api.ChangeRowAssert; +import org.assertj.db.api.ChangeRowValueAssert; +import org.assertj.db.api.ChangesAssert; +import org.assertj.db.api.RequestAssert; +import org.assertj.db.api.RequestRowAssert; +import org.assertj.db.api.RequestRowValueAssert; +import org.assertj.db.api.TableAssert; +import org.assertj.db.api.TableRowAssert; +import org.assertj.db.api.TableRowValueAssert; import org.assertj.db.common.AbstractTest; import org.assertj.db.common.NeedReload; import org.assertj.db.exception.AssertJDBException; @@ -23,19 +42,11 @@ import org.assertj.db.type.Value; import org.junit.Test; -import java.lang.reflect.Field; -import java.math.BigDecimal; -import java.sql.Date; - -import static org.assertj.db.api.Assertions.assertThat; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.navigation.ToValueFromRow} class : * {@link org.assertj.db.navigation.ToValueFromRow#value(String)} method. * * @author Régis Pouiller - * */ public class ToValueFromRow_Value_String_Test extends AbstractTest { @@ -58,9 +69,9 @@ public void should_fail_because_row_does_not_exist() { } } - /** - * This method tests the {@code value} navigation method. - */ + /** + * This method tests the {@code value} navigation method. + */ @Test @NeedReload public void test_value_from_row_of_change_with_column_name() throws Exception { @@ -92,8 +103,8 @@ public void test_value_from_row_of_change_with_column_name() throws Exception { fail("An exception must be raised"); } catch (AssertJDBException e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("Column does not exist%n" - + "in <[ID, NAME, FIRSTNAME, BIRTH, ACTOR_IMDB]>%n" - + "with comparison IGNORE - Ignore the case")); + + "in <[ID, NAME, FIRSTNAME, BIRTH, ACTOR_IMDB]>%n" + + "with comparison IGNORE - Ignore the case")); } try { changeRowAssert.value(null); @@ -119,8 +130,8 @@ public void test_value_from_row_of_change_with_column_name() throws Exception { fail("An exception must be raised"); } catch (AssertJDBException e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("Column does not exist%n" - + "in <[ID, NAME, FIRSTNAME, BIRTH, ACTOR_IMDB]>%n" - + "with comparison IGNORE - Ignore the case")); + + "in <[ID, NAME, FIRSTNAME, BIRTH, ACTOR_IMDB]>%n" + + "with comparison IGNORE - Ignore the case")); } try { changeRowValueAssertBis3.value(null); @@ -130,16 +141,16 @@ public void test_value_from_row_of_change_with_column_name() throws Exception { } Assertions.assertThat(((Value) fieldValue.get(changeRowValueAssert0)).getValue()) - .isSameAs(((Value) fieldValue.get(changeRowValueAssertBis0)).getValue()) - .isEqualTo(new BigDecimal("4")); + .isSameAs(((Value) fieldValue.get(changeRowValueAssertBis0)).getValue()) + .isEqualTo(new BigDecimal("4")); Assertions.assertThat(((Value) fieldValue.get(changeRowValueAssert1)).getValue()) - .isSameAs(((Value) fieldValue.get(changeRowValueAssertBis1)).getValue()).isEqualTo("Murray"); + .isSameAs(((Value) fieldValue.get(changeRowValueAssertBis1)).getValue()).isEqualTo("Murray"); Assertions.assertThat(((Value) fieldValue.get(changeRowValueAssert2)).getValue()) - .isSameAs(((Value) fieldValue.get(changeRowValueAssertBis2)).getValue()) - .isEqualTo("Bill"); + .isSameAs(((Value) fieldValue.get(changeRowValueAssertBis2)).getValue()) + .isEqualTo("Bill"); Assertions.assertThat(((Value) fieldValue.get(changeRowValueAssert3)).getValue()) - .isSameAs(((Value) fieldValue.get(changeRowValueAssertBis3)).getValue()) - .isEqualTo(Date.valueOf("1950-09-21")); + .isSameAs(((Value) fieldValue.get(changeRowValueAssertBis3)).getValue()) + .isEqualTo(Date.valueOf("1950-09-21")); } /** @@ -172,8 +183,8 @@ public void test_value_from_row_of_table() throws Exception { fail("An exception must be raised"); } catch (AssertJDBException e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("Column does not exist%n" - + "in <[ID, NAME, FIRSTNAME, BIRTH, ACTOR_IMDB]>%n" - + "with comparison IGNORE - Ignore the case")); + + "in <[ID, NAME, FIRSTNAME, BIRTH, ACTOR_IMDB]>%n" + + "with comparison IGNORE - Ignore the case")); } try { tableRowAssert.value(null); @@ -199,8 +210,8 @@ public void test_value_from_row_of_table() throws Exception { fail("An exception must be raised"); } catch (AssertJDBException e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("Column does not exist%n" - + "in <[ID, NAME, FIRSTNAME, BIRTH, ACTOR_IMDB]>%n" - + "with comparison IGNORE - Ignore the case")); + + "in <[ID, NAME, FIRSTNAME, BIRTH, ACTOR_IMDB]>%n" + + "with comparison IGNORE - Ignore the case")); } try { tableRowValueAssertBis3.value(null); @@ -210,17 +221,17 @@ public void test_value_from_row_of_table() throws Exception { } Assertions.assertThat(((Value) fieldValue.get(tableRowValueAssert0)).getValue()) - .isSameAs(((Value) fieldValue.get(tableRowValueAssertBis0)).getValue()) - .isEqualTo(new BigDecimal("1")); + .isSameAs(((Value) fieldValue.get(tableRowValueAssertBis0)).getValue()) + .isEqualTo(new BigDecimal("1")); Assertions.assertThat(((Value) fieldValue.get(tableRowValueAssert1)).getValue()) - .isSameAs(((Value) fieldValue.get(tableRowValueAssertBis1)).getValue()) - .isEqualTo("Weaver"); + .isSameAs(((Value) fieldValue.get(tableRowValueAssertBis1)).getValue()) + .isEqualTo("Weaver"); Assertions.assertThat(((Value) fieldValue.get(tableRowValueAssert2)).getValue()) - .isSameAs(((Value) fieldValue.get(tableRowValueAssertBis2)).getValue()) - .isEqualTo("Sigourney"); + .isSameAs(((Value) fieldValue.get(tableRowValueAssertBis2)).getValue()) + .isEqualTo("Sigourney"); Assertions.assertThat(((Value) fieldValue.get(tableRowValueAssert3)).getValue()) - .isSameAs(((Value) fieldValue.get(tableRowValueAssertBis3)).getValue()) - .isEqualTo(Date.valueOf("1949-10-08")); + .isSameAs(((Value) fieldValue.get(tableRowValueAssertBis3)).getValue()) + .isEqualTo(Date.valueOf("1949-10-08")); } /** @@ -253,8 +264,8 @@ public void test_value_from_row_of_request() throws Exception { fail("An exception must be raised"); } catch (AssertJDBException e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("Column does not exist%n" - + "in <[ID, NAME, FIRSTNAME, BIRTH, ACTOR_IMDB]>%n" - + "with comparison IGNORE - Ignore the case")); + + "in <[ID, NAME, FIRSTNAME, BIRTH, ACTOR_IMDB]>%n" + + "with comparison IGNORE - Ignore the case")); } try { requestRowAssert.value(null); @@ -280,8 +291,8 @@ public void test_value_from_row_of_request() throws Exception { fail("An exception must be raised"); } catch (AssertJDBException e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("Column does not exist%n" - + "in <[ID, NAME, FIRSTNAME, BIRTH, ACTOR_IMDB]>%n" - + "with comparison IGNORE - Ignore the case")); + + "in <[ID, NAME, FIRSTNAME, BIRTH, ACTOR_IMDB]>%n" + + "with comparison IGNORE - Ignore the case")); } try { requestRowValueAssertBis3.value(null); @@ -291,16 +302,16 @@ public void test_value_from_row_of_request() throws Exception { } Assertions.assertThat(((Value) fieldValue.get(requestRowValueAssert0)).getValue()) - .isSameAs(((Value) fieldValue.get(requestRowValueAssertBis0)).getValue()) - .isEqualTo(new BigDecimal("1")); + .isSameAs(((Value) fieldValue.get(requestRowValueAssertBis0)).getValue()) + .isEqualTo(new BigDecimal("1")); Assertions.assertThat(((Value) fieldValue.get(requestRowValueAssert1)).getValue()) - .isSameAs(((Value) fieldValue.get(requestRowValueAssertBis1)).getValue()) - .isEqualTo("Weaver"); + .isSameAs(((Value) fieldValue.get(requestRowValueAssertBis1)).getValue()) + .isEqualTo("Weaver"); Assertions.assertThat(((Value) fieldValue.get(requestRowValueAssert2)).getValue()) - .isSameAs(((Value) fieldValue.get(requestRowValueAssertBis2)).getValue()) - .isEqualTo("Sigourney"); + .isSameAs(((Value) fieldValue.get(requestRowValueAssertBis2)).getValue()) + .isEqualTo("Sigourney"); Assertions.assertThat(((Value) fieldValue.get(requestRowValueAssert3)).getValue()) - .isSameAs(((Value) fieldValue.get(requestRowValueAssertBis3)).getValue()) - .isEqualTo(Date.valueOf("1949-10-08")); + .isSameAs(((Value) fieldValue.get(requestRowValueAssertBis3)).getValue()) + .isEqualTo(Date.valueOf("1949-10-08")); } } diff --git a/src/test/java/org/assertj/db/navigation/ToValue_Value_Integer_Test.java b/src/test/java/org/assertj/db/navigation/ToValue_Value_Integer_Test.java index 6b1deb3b..e8a5eec4 100644 --- a/src/test/java/org/assertj/db/navigation/ToValue_Value_Integer_Test.java +++ b/src/test/java/org/assertj/db/navigation/ToValue_Value_Integer_Test.java @@ -8,37 +8,71 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.navigation; +import static org.assertj.db.api.Assertions.assertThat; +import static org.assertj.db.output.Outputs.output; +import static org.junit.Assert.fail; + +import java.lang.reflect.Field; +import java.math.BigDecimal; +import java.sql.Date; +import java.util.UUID; + import org.assertj.core.api.Assertions; -import org.assertj.db.api.*; +import org.assertj.db.api.AbstractAssertWithValues; +import org.assertj.db.api.AbstractColumnAssert; +import org.assertj.db.api.AbstractRowAssert; +import org.assertj.db.api.AbstractValueAssert; +import org.assertj.db.api.ChangeAssert; +import org.assertj.db.api.ChangeRowAssert; +import org.assertj.db.api.ChangeRowValueAssert; +import org.assertj.db.api.ChangesAssert; +import org.assertj.db.api.RequestAssert; +import org.assertj.db.api.RequestColumnAssert; +import org.assertj.db.api.RequestColumnValueAssert; +import org.assertj.db.api.RequestRowAssert; +import org.assertj.db.api.RequestRowValueAssert; +import org.assertj.db.api.TableAssert; +import org.assertj.db.api.TableColumnAssert; +import org.assertj.db.api.TableColumnValueAssert; +import org.assertj.db.api.TableRowAssert; +import org.assertj.db.api.TableRowValueAssert; import org.assertj.db.common.AbstractTest; import org.assertj.db.common.NeedReload; import org.assertj.db.exception.AssertJDBException; -import org.assertj.db.output.*; +import org.assertj.db.output.AbstractColumnOutputter; +import org.assertj.db.output.AbstractOutputterWithValues; +import org.assertj.db.output.AbstractRowOutputter; +import org.assertj.db.output.AbstractValueOutputter; +import org.assertj.db.output.ChangeOutputter; +import org.assertj.db.output.ChangeRowOutputter; +import org.assertj.db.output.ChangeRowValueOutputter; +import org.assertj.db.output.ChangesOutputter; +import org.assertj.db.output.Outputs; +import org.assertj.db.output.RequestColumnOutputter; +import org.assertj.db.output.RequestColumnValueOutputter; +import org.assertj.db.output.RequestOutputter; +import org.assertj.db.output.RequestRowOutputter; +import org.assertj.db.output.RequestRowValueOutputter; +import org.assertj.db.output.TableColumnOutputter; +import org.assertj.db.output.TableColumnValueOutputter; +import org.assertj.db.output.TableOutputter; +import org.assertj.db.output.TableRowOutputter; +import org.assertj.db.output.TableRowValueOutputter; import org.assertj.db.type.Changes; import org.assertj.db.type.Request; import org.assertj.db.type.Table; import org.assertj.db.type.Value; import org.junit.Test; -import java.lang.reflect.Field; -import java.math.BigDecimal; -import java.sql.Date; -import java.util.UUID; - -import static org.assertj.db.api.Assertions.assertThat; -import static org.assertj.db.output.Outputs.output; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.navigation.ToValue} class : * {@link org.assertj.db.navigation.ToValue#value(int)} method. * * @author Régis Pouiller - * */ public class ToValue_Value_Integer_Test extends AbstractTest { @@ -62,8 +96,8 @@ public void test_value_from_row_of_change_with_index_with_assertions() throws Ex ChangesAssert changesAssert = assertThat(changes); ChangeAssert changeAssert = changesAssert.change(); ChangeRowAssert changeRowAssert = changeAssert.rowAtEndPoint(); - PositionWithColumns position = - (PositionWithColumns) fieldPosition.get(changeRowAssert); + PositionWithColumns position = + (PositionWithColumns) fieldPosition.get(changeRowAssert); Assertions.assertThat(fieldIndex.get(position)).isEqualTo(0); ChangeRowValueAssert changeRowValueAssert0 = changeRowAssert.value(0); Assertions.assertThat(fieldIndex.get(position)).isEqualTo(1); @@ -98,8 +132,8 @@ public void test_value_from_row_of_change_with_index_with_assertions() throws Ex ChangesAssert changesAssertBis = assertThat(changes); ChangeAssert changeAssertBis = changesAssertBis.change(); ChangeRowAssert changeRowAssertBis = changeAssertBis.rowAtEndPoint(); - PositionWithColumns positionBis = - (PositionWithColumns) fieldPosition.get(changeRowAssertBis); + PositionWithColumns positionBis = + (PositionWithColumns) fieldPosition.get(changeRowAssertBis); Assertions.assertThat(fieldIndex.get(positionBis)).isEqualTo(0); ChangeRowValueAssert changeRowValueAssertBis0 = changeRowAssertBis.value(0); Assertions.assertThat(fieldIndex.get(positionBis)).isEqualTo(1); @@ -132,20 +166,20 @@ public void test_value_from_row_of_change_with_index_with_assertions() throws Ex Assertions.assertThat(changeRowValueAssertBis0).isSameAs(changeRowValueAssertBisAgain0); Assertions.assertThat(((Value) fieldValue.get(changeRowValueAssert0)).getValue()) - .isSameAs(((Value) fieldValue.get(changeRowValueAssertBis0)).getValue()) - .isEqualTo(new BigDecimal("4")); + .isSameAs(((Value) fieldValue.get(changeRowValueAssertBis0)).getValue()) + .isEqualTo(new BigDecimal("4")); Assertions.assertThat(((Value) fieldValue.get(changeRowValueAssert1)).getValue()) - .isSameAs(((Value) fieldValue.get(changeRowValueAssertBis1)).getValue()) - .isEqualTo("Murray"); + .isSameAs(((Value) fieldValue.get(changeRowValueAssertBis1)).getValue()) + .isEqualTo("Murray"); Assertions.assertThat(((Value) fieldValue.get(changeRowValueAssert2)).getValue()) - .isSameAs(((Value) fieldValue.get(changeRowValueAssertBis2)).getValue()) - .isEqualTo("Bill"); + .isSameAs(((Value) fieldValue.get(changeRowValueAssertBis2)).getValue()) + .isEqualTo("Bill"); Assertions.assertThat(((Value) fieldValue.get(changeRowValueAssert3)).getValue()) - .isSameAs(((Value) fieldValue.get(changeRowValueAssertBis3)).getValue()) - .isEqualTo(Date.valueOf("1950-09-21")); + .isSameAs(((Value) fieldValue.get(changeRowValueAssertBis3)).getValue()) + .isEqualTo(Date.valueOf("1950-09-21")); Assertions.assertThat(((Value) fieldValue.get(changeRowValueAssert4)).getValue()) - .isSameAs(((Value) fieldValue.get(changeRowValueAssertBis4)).getValue()) - .isEqualTo(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")); + .isSameAs(((Value) fieldValue.get(changeRowValueAssertBis4)).getValue()) + .isEqualTo(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")); } /** @@ -163,8 +197,8 @@ public void test_value_from_column_of_table_with_index_with_assertions() throws Table table = new Table(source, "actor"); TableAssert tableAssert = assertThat(table); TableColumnAssert tableColumnAssert = tableAssert.column(); - Position position = - (Position) fieldPosition.get(tableColumnAssert); + Position position = + (Position) fieldPosition.get(tableColumnAssert); Assertions.assertThat(fieldIndex.get(position)).isEqualTo(0); TableColumnValueAssert tableColumnValueAssert0 = tableColumnAssert.value(0); Assertions.assertThat(fieldIndex.get(position)).isEqualTo(1); @@ -189,8 +223,8 @@ public void test_value_from_column_of_table_with_index_with_assertions() throws TableAssert tableAssertBis = assertThat(table); TableColumnAssert tableColumnAssertBis = tableAssertBis.column(); - Position positionBis = - (Position) fieldPosition.get(tableColumnAssertBis); + Position positionBis = + (Position) fieldPosition.get(tableColumnAssertBis); Assertions.assertThat(fieldIndex.get(positionBis)).isEqualTo(0); TableColumnValueAssert tableColumnValueAssertBis0 = tableColumnAssertBis.value(0); Assertions.assertThat(fieldIndex.get(positionBis)).isEqualTo(1); @@ -214,14 +248,14 @@ public void test_value_from_column_of_table_with_index_with_assertions() throws Assertions.assertThat(tableColumnValueAssertBis0).isSameAs(tableColumnValueAssertBisAgain0); Assertions.assertThat(((Value) fieldValue.get(tableColumnValueAssert0)).getValue()) - .isSameAs(((Value) fieldValue.get(tableColumnValueAssertBis0)).getValue()) - .isEqualTo(new BigDecimal("1")); + .isSameAs(((Value) fieldValue.get(tableColumnValueAssertBis0)).getValue()) + .isEqualTo(new BigDecimal("1")); Assertions.assertThat(((Value) fieldValue.get(tableColumnValueAssert1)).getValue()) - .isSameAs(((Value) fieldValue.get(tableColumnValueAssertBis1)).getValue()) - .isEqualTo(new BigDecimal("2")); + .isSameAs(((Value) fieldValue.get(tableColumnValueAssertBis1)).getValue()) + .isEqualTo(new BigDecimal("2")); Assertions.assertThat(((Value) fieldValue.get(tableColumnValueAssert2)).getValue()) - .isSameAs(((Value) fieldValue.get(tableColumnValueAssertBis2)).getValue()) - .isEqualTo(new BigDecimal("3")); + .isSameAs(((Value) fieldValue.get(tableColumnValueAssertBis2)).getValue()) + .isEqualTo(new BigDecimal("3")); } /** @@ -239,8 +273,8 @@ public void test_value_from_row_of_table_with_index_with_assertions() throws Exc Table table = new Table(source, "actor"); TableAssert tableAssert = assertThat(table); TableRowAssert tableRowAssert = tableAssert.row(); - Position position = - (Position) fieldPosition.get(tableRowAssert); + Position position = + (Position) fieldPosition.get(tableRowAssert); Assertions.assertThat(fieldIndex.get(position)).isEqualTo(0); TableRowValueAssert tableRowValueAssert0 = tableRowAssert.value(0); Assertions.assertThat(fieldIndex.get(position)).isEqualTo(1); @@ -269,8 +303,8 @@ public void test_value_from_row_of_table_with_index_with_assertions() throws Exc TableAssert tableAssertBis = assertThat(table); TableRowAssert tableRowAssertBis = tableAssertBis.row(); - Position positionBis = - (Position) fieldPosition.get(tableRowAssertBis); + Position positionBis = + (Position) fieldPosition.get(tableRowAssertBis); Assertions.assertThat(fieldIndex.get(positionBis)).isEqualTo(0); TableRowValueAssert tableRowValueAssertBis0 = tableRowAssertBis.value(0); Assertions.assertThat(fieldIndex.get(positionBis)).isEqualTo(1); @@ -298,20 +332,20 @@ public void test_value_from_row_of_table_with_index_with_assertions() throws Exc Assertions.assertThat(tableRowValueAssertBis0).isSameAs(tableRowValueAssertBisAgain0); Assertions.assertThat(((Value) fieldValue.get(tableRowValueAssert0)).getValue()) - .isSameAs(((Value) fieldValue.get(tableRowValueAssertBis0)).getValue()) - .isEqualTo(new BigDecimal("1")); + .isSameAs(((Value) fieldValue.get(tableRowValueAssertBis0)).getValue()) + .isEqualTo(new BigDecimal("1")); Assertions.assertThat(((Value) fieldValue.get(tableRowValueAssert1)).getValue()) - .isSameAs(((Value) fieldValue.get(tableRowValueAssertBis1)).getValue()) - .isEqualTo("Weaver"); + .isSameAs(((Value) fieldValue.get(tableRowValueAssertBis1)).getValue()) + .isEqualTo("Weaver"); Assertions.assertThat(((Value) fieldValue.get(tableRowValueAssert2)).getValue()) - .isSameAs(((Value) fieldValue.get(tableRowValueAssertBis2)).getValue()) - .isEqualTo("Sigourney"); + .isSameAs(((Value) fieldValue.get(tableRowValueAssertBis2)).getValue()) + .isEqualTo("Sigourney"); Assertions.assertThat(((Value) fieldValue.get(tableRowValueAssert3)).getValue()) - .isSameAs(((Value) fieldValue.get(tableRowValueAssertBis3)).getValue()) - .isEqualTo(Date.valueOf("1949-10-08")); + .isSameAs(((Value) fieldValue.get(tableRowValueAssertBis3)).getValue()) + .isEqualTo(Date.valueOf("1949-10-08")); Assertions.assertThat(((Value) fieldValue.get(tableRowValueAssert4)).getValue()) - .isSameAs(((Value) fieldValue.get(tableRowValueAssertBis4)).getValue()) - .isEqualTo(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")); + .isSameAs(((Value) fieldValue.get(tableRowValueAssertBis4)).getValue()) + .isEqualTo(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")); } /** @@ -378,14 +412,14 @@ public void test_value_from_column_of_request_with_index_with_assertions() throw Assertions.assertThat(requestColumnValueAssertBis0).isSameAs(requestColumnValueAssertBisAgain0); Assertions.assertThat(((Value) fieldValue.get(requestColumnValueAssert0)).getValue()) - .isSameAs(((Value) fieldValue.get(requestColumnValueAssertBis0)).getValue()) - .isEqualTo(new BigDecimal("1")); + .isSameAs(((Value) fieldValue.get(requestColumnValueAssertBis0)).getValue()) + .isEqualTo(new BigDecimal("1")); Assertions.assertThat(((Value) fieldValue.get(requestColumnValueAssert1)).getValue()) - .isSameAs(((Value) fieldValue.get(requestColumnValueAssertBis1)).getValue()) - .isEqualTo(new BigDecimal("2")); + .isSameAs(((Value) fieldValue.get(requestColumnValueAssertBis1)).getValue()) + .isEqualTo(new BigDecimal("2")); Assertions.assertThat(((Value) fieldValue.get(requestColumnValueAssert2)).getValue()) - .isSameAs(((Value) fieldValue.get(requestColumnValueAssertBis2)).getValue()) - .isEqualTo(new BigDecimal("3")); + .isSameAs(((Value) fieldValue.get(requestColumnValueAssertBis2)).getValue()) + .isEqualTo(new BigDecimal("3")); } /** @@ -460,20 +494,20 @@ public void test_value_from_row_of_request_with_index_with_assertions() throws E Assertions.assertThat(requestRowValueAssertBis0).isSameAs(requestRowValueAssertBisAgain0); Assertions.assertThat(((Value) fieldValue.get(requestRowValueAssert0)).getValue()) - .isSameAs(((Value) fieldValue.get(requestRowValueAssertBis0)).getValue()) - .isEqualTo(new BigDecimal("1")); + .isSameAs(((Value) fieldValue.get(requestRowValueAssertBis0)).getValue()) + .isEqualTo(new BigDecimal("1")); Assertions.assertThat(((Value) fieldValue.get(requestRowValueAssert1)).getValue()) - .isSameAs(((Value) fieldValue.get(requestRowValueAssertBis1)).getValue()) - .isEqualTo("Weaver"); + .isSameAs(((Value) fieldValue.get(requestRowValueAssertBis1)).getValue()) + .isEqualTo("Weaver"); Assertions.assertThat(((Value) fieldValue.get(requestRowValueAssert2)).getValue()) - .isSameAs(((Value) fieldValue.get(requestRowValueAssertBis2)).getValue()) - .isEqualTo("Sigourney"); + .isSameAs(((Value) fieldValue.get(requestRowValueAssertBis2)).getValue()) + .isEqualTo("Sigourney"); Assertions.assertThat(((Value) fieldValue.get(requestRowValueAssert3)).getValue()) - .isSameAs(((Value) fieldValue.get(requestRowValueAssertBis3)).getValue()) - .isEqualTo(Date.valueOf("1949-10-08")); + .isSameAs(((Value) fieldValue.get(requestRowValueAssertBis3)).getValue()) + .isEqualTo(Date.valueOf("1949-10-08")); Assertions.assertThat(((Value) fieldValue.get(requestRowValueAssert4)).getValue()) - .isSameAs(((Value) fieldValue.get(requestRowValueAssertBis4)).getValue()) - .isEqualTo(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")); + .isSameAs(((Value) fieldValue.get(requestRowValueAssertBis4)).getValue()) + .isEqualTo(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")); } /** @@ -564,20 +598,20 @@ public void test_value_from_row_of_change_with_index_with_displays() throws Exce Assertions.assertThat(changeRowValueOutputterBis0).isSameAs(changeRowValueOutputterBisAgain0); Assertions.assertThat(((Value) fieldValue.get(changeRowValueOutputter0)).getValue()) - .isSameAs(((Value) fieldValue.get(changeRowValueOutputterBis0)).getValue()) - .isEqualTo(new BigDecimal("4")); + .isSameAs(((Value) fieldValue.get(changeRowValueOutputterBis0)).getValue()) + .isEqualTo(new BigDecimal("4")); Assertions.assertThat(((Value) fieldValue.get(changeRowValueOutputter1)).getValue()) - .isSameAs(((Value) fieldValue.get(changeRowValueOutputterBis1)).getValue()) - .isEqualTo("Murray"); + .isSameAs(((Value) fieldValue.get(changeRowValueOutputterBis1)).getValue()) + .isEqualTo("Murray"); Assertions.assertThat(((Value) fieldValue.get(changeRowValueOutputter2)).getValue()) - .isSameAs(((Value) fieldValue.get(changeRowValueOutputterBis2)).getValue()) - .isEqualTo("Bill"); + .isSameAs(((Value) fieldValue.get(changeRowValueOutputterBis2)).getValue()) + .isEqualTo("Bill"); Assertions.assertThat(((Value) fieldValue.get(changeRowValueOutputter3)).getValue()) - .isSameAs(((Value) fieldValue.get(changeRowValueOutputterBis3)).getValue()) - .isEqualTo(Date.valueOf("1950-09-21")); + .isSameAs(((Value) fieldValue.get(changeRowValueOutputterBis3)).getValue()) + .isEqualTo(Date.valueOf("1950-09-21")); Assertions.assertThat(((Value) fieldValue.get(changeRowValueOutputter4)).getValue()) - .isSameAs(((Value) fieldValue.get(changeRowValueOutputterBis4)).getValue()) - .isEqualTo(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")); + .isSameAs(((Value) fieldValue.get(changeRowValueOutputterBis4)).getValue()) + .isEqualTo(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")); } /** @@ -644,14 +678,14 @@ public void test_value_from_column_of_table_with_index_with_displays() throws Ex Assertions.assertThat(tableColumnValueOutputterBis0).isSameAs(tableColumnValueOutputterBisAgain0); Assertions.assertThat(((Value) fieldValue.get(tableColumnValueOutputter0)).getValue()) - .isSameAs(((Value) fieldValue.get(tableColumnValueOutputterBis0)).getValue()) - .isEqualTo(new BigDecimal("1")); + .isSameAs(((Value) fieldValue.get(tableColumnValueOutputterBis0)).getValue()) + .isEqualTo(new BigDecimal("1")); Assertions.assertThat(((Value) fieldValue.get(tableColumnValueOutputter1)).getValue()) - .isSameAs(((Value) fieldValue.get(tableColumnValueOutputterBis1)).getValue()) - .isEqualTo(new BigDecimal("2")); + .isSameAs(((Value) fieldValue.get(tableColumnValueOutputterBis1)).getValue()) + .isEqualTo(new BigDecimal("2")); Assertions.assertThat(((Value) fieldValue.get(tableColumnValueOutputter2)).getValue()) - .isSameAs(((Value) fieldValue.get(tableColumnValueOutputterBis2)).getValue()) - .isEqualTo(new BigDecimal("3")); + .isSameAs(((Value) fieldValue.get(tableColumnValueOutputterBis2)).getValue()) + .isEqualTo(new BigDecimal("3")); } /** @@ -726,20 +760,20 @@ public void test_value_from_row_of_table_with_index_with_displays() throws Excep Assertions.assertThat(tableRowValueOutputterBis0).isSameAs(tableRowValueOutputterBisAgain0); Assertions.assertThat(((Value) fieldValue.get(tableRowValueOutputter0)).getValue()) - .isSameAs(((Value) fieldValue.get(tableRowValueOutputterBis0)).getValue()) - .isEqualTo(new BigDecimal("1")); + .isSameAs(((Value) fieldValue.get(tableRowValueOutputterBis0)).getValue()) + .isEqualTo(new BigDecimal("1")); Assertions.assertThat(((Value) fieldValue.get(tableRowValueOutputter1)).getValue()) - .isSameAs(((Value) fieldValue.get(tableRowValueOutputterBis1)).getValue()) - .isEqualTo("Weaver"); + .isSameAs(((Value) fieldValue.get(tableRowValueOutputterBis1)).getValue()) + .isEqualTo("Weaver"); Assertions.assertThat(((Value) fieldValue.get(tableRowValueOutputter2)).getValue()) - .isSameAs(((Value) fieldValue.get(tableRowValueOutputterBis2)).getValue()) - .isEqualTo("Sigourney"); + .isSameAs(((Value) fieldValue.get(tableRowValueOutputterBis2)).getValue()) + .isEqualTo("Sigourney"); Assertions.assertThat(((Value) fieldValue.get(tableRowValueOutputter3)).getValue()) - .isSameAs(((Value) fieldValue.get(tableRowValueOutputterBis3)).getValue()) - .isEqualTo(Date.valueOf("1949-10-08")); + .isSameAs(((Value) fieldValue.get(tableRowValueOutputterBis3)).getValue()) + .isEqualTo(Date.valueOf("1949-10-08")); Assertions.assertThat(((Value) fieldValue.get(tableRowValueOutputter4)).getValue()) - .isSameAs(((Value) fieldValue.get(tableRowValueOutputterBis4)).getValue()) - .isEqualTo(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")); + .isSameAs(((Value) fieldValue.get(tableRowValueOutputterBis4)).getValue()) + .isEqualTo(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")); } /** @@ -806,14 +840,14 @@ public void test_value_from_column_of_request_with_index_with_displays() throws Assertions.assertThat(requestColumnValueOutputterBis0).isSameAs(requestColumnValueOutputterBisAgain0); Assertions.assertThat(((Value) fieldValue.get(requestColumnValueOutputter0)).getValue()) - .isSameAs(((Value) fieldValue.get(requestColumnValueOutputterBis0)).getValue()) - .isEqualTo(new BigDecimal("1")); + .isSameAs(((Value) fieldValue.get(requestColumnValueOutputterBis0)).getValue()) + .isEqualTo(new BigDecimal("1")); Assertions.assertThat(((Value) fieldValue.get(requestColumnValueOutputter1)).getValue()) - .isSameAs(((Value) fieldValue.get(requestColumnValueOutputterBis1)).getValue()) - .isEqualTo(new BigDecimal("2")); + .isSameAs(((Value) fieldValue.get(requestColumnValueOutputterBis1)).getValue()) + .isEqualTo(new BigDecimal("2")); Assertions.assertThat(((Value) fieldValue.get(requestColumnValueOutputter2)).getValue()) - .isSameAs(((Value) fieldValue.get(requestColumnValueOutputterBis2)).getValue()) - .isEqualTo(new BigDecimal("3")); + .isSameAs(((Value) fieldValue.get(requestColumnValueOutputterBis2)).getValue()) + .isEqualTo(new BigDecimal("3")); } /** @@ -888,19 +922,19 @@ public void test_value_from_row_of_request_with_index_with_displays() throws Exc Assertions.assertThat(requestRowValueOutputterBis0).isSameAs(requestRowValueOutputterBisAgain0); Assertions.assertThat(((Value) fieldValue.get(requestRowValueOutputter0)).getValue()) - .isSameAs(((Value) fieldValue.get(requestRowValueOutputterBis0)).getValue()) - .isEqualTo(new BigDecimal("1")); + .isSameAs(((Value) fieldValue.get(requestRowValueOutputterBis0)).getValue()) + .isEqualTo(new BigDecimal("1")); Assertions.assertThat(((Value) fieldValue.get(requestRowValueOutputter1)).getValue()) - .isSameAs(((Value) fieldValue.get(requestRowValueOutputterBis1)).getValue()) - .isEqualTo("Weaver"); + .isSameAs(((Value) fieldValue.get(requestRowValueOutputterBis1)).getValue()) + .isEqualTo("Weaver"); Assertions.assertThat(((Value) fieldValue.get(requestRowValueOutputter2)).getValue()) - .isSameAs(((Value) fieldValue.get(requestRowValueOutputterBis2)).getValue()) - .isEqualTo("Sigourney"); + .isSameAs(((Value) fieldValue.get(requestRowValueOutputterBis2)).getValue()) + .isEqualTo("Sigourney"); Assertions.assertThat(((Value) fieldValue.get(requestRowValueOutputter3)).getValue()) - .isSameAs(((Value) fieldValue.get(requestRowValueOutputterBis3)).getValue()) - .isEqualTo(Date.valueOf("1949-10-08")); + .isSameAs(((Value) fieldValue.get(requestRowValueOutputterBis3)).getValue()) + .isEqualTo(Date.valueOf("1949-10-08")); Assertions.assertThat(((Value) fieldValue.get(requestRowValueOutputter4)).getValue()) - .isSameAs(((Value) fieldValue.get(requestRowValueOutputterBis4)).getValue()) - .isEqualTo(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")); + .isSameAs(((Value) fieldValue.get(requestRowValueOutputterBis4)).getValue()) + .isEqualTo(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")); } } diff --git a/src/test/java/org/assertj/db/navigation/ToValue_Value_Test.java b/src/test/java/org/assertj/db/navigation/ToValue_Value_Test.java index 1b4e2e29..f5477e97 100644 --- a/src/test/java/org/assertj/db/navigation/ToValue_Value_Test.java +++ b/src/test/java/org/assertj/db/navigation/ToValue_Value_Test.java @@ -8,37 +8,71 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.navigation; +import static org.assertj.db.api.Assertions.assertThat; +import static org.assertj.db.output.Outputs.output; +import static org.junit.Assert.fail; + +import java.lang.reflect.Field; +import java.math.BigDecimal; +import java.sql.Date; +import java.util.UUID; + import org.assertj.core.api.Assertions; -import org.assertj.db.api.*; +import org.assertj.db.api.AbstractAssertWithValues; +import org.assertj.db.api.AbstractColumnAssert; +import org.assertj.db.api.AbstractRowAssert; +import org.assertj.db.api.AbstractValueAssert; +import org.assertj.db.api.ChangeAssert; +import org.assertj.db.api.ChangeRowAssert; +import org.assertj.db.api.ChangeRowValueAssert; +import org.assertj.db.api.ChangesAssert; +import org.assertj.db.api.RequestAssert; +import org.assertj.db.api.RequestColumnAssert; +import org.assertj.db.api.RequestColumnValueAssert; +import org.assertj.db.api.RequestRowAssert; +import org.assertj.db.api.RequestRowValueAssert; +import org.assertj.db.api.TableAssert; +import org.assertj.db.api.TableColumnAssert; +import org.assertj.db.api.TableColumnValueAssert; +import org.assertj.db.api.TableRowAssert; +import org.assertj.db.api.TableRowValueAssert; import org.assertj.db.common.AbstractTest; import org.assertj.db.common.NeedReload; import org.assertj.db.exception.AssertJDBException; -import org.assertj.db.output.*; +import org.assertj.db.output.AbstractColumnOutputter; +import org.assertj.db.output.AbstractOutputterWithValues; +import org.assertj.db.output.AbstractRowOutputter; +import org.assertj.db.output.AbstractValueOutputter; +import org.assertj.db.output.ChangeOutputter; +import org.assertj.db.output.ChangeRowOutputter; +import org.assertj.db.output.ChangeRowValueOutputter; +import org.assertj.db.output.ChangesOutputter; +import org.assertj.db.output.Outputs; +import org.assertj.db.output.RequestColumnOutputter; +import org.assertj.db.output.RequestColumnValueOutputter; +import org.assertj.db.output.RequestOutputter; +import org.assertj.db.output.RequestRowOutputter; +import org.assertj.db.output.RequestRowValueOutputter; +import org.assertj.db.output.TableColumnOutputter; +import org.assertj.db.output.TableColumnValueOutputter; +import org.assertj.db.output.TableOutputter; +import org.assertj.db.output.TableRowOutputter; +import org.assertj.db.output.TableRowValueOutputter; import org.assertj.db.type.Changes; import org.assertj.db.type.Request; import org.assertj.db.type.Table; import org.assertj.db.type.Value; import org.junit.Test; -import java.lang.reflect.Field; -import java.math.BigDecimal; -import java.sql.Date; -import java.util.UUID; - -import static org.assertj.db.api.Assertions.assertThat; -import static org.assertj.db.output.Outputs.output; -import static org.junit.Assert.fail; - /** * Tests on {@link org.assertj.db.navigation.ToValue} class : * {@link org.assertj.db.navigation.ToValue#value()} method. * * @author Régis Pouiller - * */ public class ToValue_Value_Test extends AbstractTest { @@ -114,20 +148,20 @@ public void test_value_from_row_of_change_with_assertions() throws Exception { } Assertions.assertThat(((Value) fieldValue.get(changeRowValueAssert0)).getValue()) - .isSameAs(((Value) fieldValue.get(changeRowValueAssertBis0)).getValue()) - .isEqualTo(new BigDecimal("4")); + .isSameAs(((Value) fieldValue.get(changeRowValueAssertBis0)).getValue()) + .isEqualTo(new BigDecimal("4")); Assertions.assertThat(((Value) fieldValue.get(changeRowValueAssert1)).getValue()) - .isSameAs(((Value) fieldValue.get(changeRowValueAssertBis1)).getValue()) - .isEqualTo("Murray"); + .isSameAs(((Value) fieldValue.get(changeRowValueAssertBis1)).getValue()) + .isEqualTo("Murray"); Assertions.assertThat(((Value) fieldValue.get(changeRowValueAssert2)).getValue()) - .isSameAs(((Value) fieldValue.get(changeRowValueAssertBis2)).getValue()) - .isEqualTo("Bill"); + .isSameAs(((Value) fieldValue.get(changeRowValueAssertBis2)).getValue()) + .isEqualTo("Bill"); Assertions.assertThat(((Value) fieldValue.get(changeRowValueAssert3)).getValue()) - .isSameAs(((Value) fieldValue.get(changeRowValueAssertBis3)).getValue()) - .isEqualTo(Date.valueOf("1950-09-21")); + .isSameAs(((Value) fieldValue.get(changeRowValueAssertBis3)).getValue()) + .isEqualTo(Date.valueOf("1950-09-21")); Assertions.assertThat(((Value) fieldValue.get(changeRowValueAssert4)).getValue()) - .isSameAs(((Value) fieldValue.get(changeRowValueAssertBis4)).getValue()) - .isEqualTo(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")); + .isSameAs(((Value) fieldValue.get(changeRowValueAssertBis4)).getValue()) + .isEqualTo(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")); } /** @@ -178,14 +212,14 @@ public void test_value_from_column_of_table_with_assertions() throws Exception { } Assertions.assertThat(((Value) fieldValue.get(tableColumnValueAssert0)).getValue()) - .isSameAs(((Value) fieldValue.get(tableColumnValueAssertBis0)).getValue()) - .isEqualTo(new BigDecimal("1")); + .isSameAs(((Value) fieldValue.get(tableColumnValueAssertBis0)).getValue()) + .isEqualTo(new BigDecimal("1")); Assertions.assertThat(((Value) fieldValue.get(tableColumnValueAssert1)).getValue()) - .isSameAs(((Value) fieldValue.get(tableColumnValueAssertBis1)).getValue()) - .isEqualTo(new BigDecimal("2")); + .isSameAs(((Value) fieldValue.get(tableColumnValueAssertBis1)).getValue()) + .isEqualTo(new BigDecimal("2")); Assertions.assertThat(((Value) fieldValue.get(tableColumnValueAssert2)).getValue()) - .isSameAs(((Value) fieldValue.get(tableColumnValueAssertBis2)).getValue()) - .isEqualTo(new BigDecimal("3")); + .isSameAs(((Value) fieldValue.get(tableColumnValueAssertBis2)).getValue()) + .isEqualTo(new BigDecimal("3")); } /** @@ -244,20 +278,20 @@ public void test_value_from_row_of_table_with_assertions() throws Exception { } Assertions.assertThat(((Value) fieldValue.get(tableRowValueAssert0)).getValue()) - .isSameAs(((Value) fieldValue.get(tableRowValueAssertBis0)).getValue()) - .isEqualTo(new BigDecimal("1")); + .isSameAs(((Value) fieldValue.get(tableRowValueAssertBis0)).getValue()) + .isEqualTo(new BigDecimal("1")); Assertions.assertThat(((Value) fieldValue.get(tableRowValueAssert1)).getValue()) - .isSameAs(((Value) fieldValue.get(tableRowValueAssertBis1)).getValue()) - .isEqualTo("Weaver"); + .isSameAs(((Value) fieldValue.get(tableRowValueAssertBis1)).getValue()) + .isEqualTo("Weaver"); Assertions.assertThat(((Value) fieldValue.get(tableRowValueAssert2)).getValue()) - .isSameAs(((Value) fieldValue.get(tableRowValueAssertBis2)).getValue()) - .isEqualTo("Sigourney"); + .isSameAs(((Value) fieldValue.get(tableRowValueAssertBis2)).getValue()) + .isEqualTo("Sigourney"); Assertions.assertThat(((Value) fieldValue.get(tableRowValueAssert3)).getValue()) - .isSameAs(((Value) fieldValue.get(tableRowValueAssertBis3)).getValue()) - .isEqualTo(Date.valueOf("1949-10-08")); + .isSameAs(((Value) fieldValue.get(tableRowValueAssertBis3)).getValue()) + .isEqualTo(Date.valueOf("1949-10-08")); Assertions.assertThat(((Value) fieldValue.get(tableRowValueAssert4)).getValue()) - .isSameAs(((Value) fieldValue.get(tableRowValueAssertBis4)).getValue()) - .isEqualTo(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")); + .isSameAs(((Value) fieldValue.get(tableRowValueAssertBis4)).getValue()) + .isEqualTo(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")); } /** @@ -308,14 +342,14 @@ public void test_value_from_column_of_request_with_assertions() throws Exception } Assertions.assertThat(((Value) fieldValue.get(requestColumnValueAssert0)).getValue()) - .isSameAs(((Value) fieldValue.get(requestColumnValueAssertBis0)).getValue()) - .isEqualTo(new BigDecimal("1")); + .isSameAs(((Value) fieldValue.get(requestColumnValueAssertBis0)).getValue()) + .isEqualTo(new BigDecimal("1")); Assertions.assertThat(((Value) fieldValue.get(requestColumnValueAssert1)).getValue()) - .isSameAs(((Value) fieldValue.get(requestColumnValueAssertBis1)).getValue()) - .isEqualTo(new BigDecimal("2")); + .isSameAs(((Value) fieldValue.get(requestColumnValueAssertBis1)).getValue()) + .isEqualTo(new BigDecimal("2")); Assertions.assertThat(((Value) fieldValue.get(requestColumnValueAssert2)).getValue()) - .isSameAs(((Value) fieldValue.get(requestColumnValueAssertBis2)).getValue()) - .isEqualTo(new BigDecimal("3")); + .isSameAs(((Value) fieldValue.get(requestColumnValueAssertBis2)).getValue()) + .isEqualTo(new BigDecimal("3")); } /** @@ -374,20 +408,20 @@ public void test_value_from_row_of_request_with_assertions() throws Exception { } Assertions.assertThat(((Value) fieldValue.get(requestRowValueAssert0)).getValue()) - .isSameAs(((Value) fieldValue.get(requestRowValueAssertBis0)).getValue()) - .isEqualTo(new BigDecimal("1")); + .isSameAs(((Value) fieldValue.get(requestRowValueAssertBis0)).getValue()) + .isEqualTo(new BigDecimal("1")); Assertions.assertThat(((Value) fieldValue.get(requestRowValueAssert1)).getValue()) - .isSameAs(((Value) fieldValue.get(requestRowValueAssertBis1)).getValue()) - .isEqualTo("Weaver"); + .isSameAs(((Value) fieldValue.get(requestRowValueAssertBis1)).getValue()) + .isEqualTo("Weaver"); Assertions.assertThat(((Value) fieldValue.get(requestRowValueAssert2)).getValue()) - .isSameAs(((Value) fieldValue.get(requestRowValueAssertBis2)).getValue()) - .isEqualTo("Sigourney"); + .isSameAs(((Value) fieldValue.get(requestRowValueAssertBis2)).getValue()) + .isEqualTo("Sigourney"); Assertions.assertThat(((Value) fieldValue.get(requestRowValueAssert3)).getValue()) - .isSameAs(((Value) fieldValue.get(requestRowValueAssertBis3)).getValue()) - .isEqualTo(Date.valueOf("1949-10-08")); + .isSameAs(((Value) fieldValue.get(requestRowValueAssertBis3)).getValue()) + .isEqualTo(Date.valueOf("1949-10-08")); Assertions.assertThat(((Value) fieldValue.get(requestRowValueAssert4)).getValue()) - .isSameAs(((Value) fieldValue.get(requestRowValueAssertBis4)).getValue()) - .isEqualTo(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")); + .isSameAs(((Value) fieldValue.get(requestRowValueAssertBis4)).getValue()) + .isEqualTo(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")); } /** @@ -462,20 +496,20 @@ public void test_value_from_row_of_change_with_displays() throws Exception { } Assertions.assertThat(((Value) fieldValue.get(changeRowValueOutputter0)).getValue()) - .isSameAs(((Value) fieldValue.get(changeRowValueOutputterBis0)).getValue()) - .isEqualTo(new BigDecimal("4")); + .isSameAs(((Value) fieldValue.get(changeRowValueOutputterBis0)).getValue()) + .isEqualTo(new BigDecimal("4")); Assertions.assertThat(((Value) fieldValue.get(changeRowValueOutputter1)).getValue()) - .isSameAs(((Value) fieldValue.get(changeRowValueOutputterBis1)).getValue()) - .isEqualTo("Murray"); + .isSameAs(((Value) fieldValue.get(changeRowValueOutputterBis1)).getValue()) + .isEqualTo("Murray"); Assertions.assertThat(((Value) fieldValue.get(changeRowValueOutputter2)).getValue()) - .isSameAs(((Value) fieldValue.get(changeRowValueOutputterBis2)).getValue()) - .isEqualTo("Bill"); + .isSameAs(((Value) fieldValue.get(changeRowValueOutputterBis2)).getValue()) + .isEqualTo("Bill"); Assertions.assertThat(((Value) fieldValue.get(changeRowValueOutputter3)).getValue()) - .isSameAs(((Value) fieldValue.get(changeRowValueOutputterBis3)).getValue()) - .isEqualTo(Date.valueOf("1950-09-21")); + .isSameAs(((Value) fieldValue.get(changeRowValueOutputterBis3)).getValue()) + .isEqualTo(Date.valueOf("1950-09-21")); Assertions.assertThat(((Value) fieldValue.get(changeRowValueOutputter4)).getValue()) - .isSameAs(((Value) fieldValue.get(changeRowValueOutputterBis4)).getValue()) - .isEqualTo(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")); + .isSameAs(((Value) fieldValue.get(changeRowValueOutputterBis4)).getValue()) + .isEqualTo(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")); } /** @@ -526,14 +560,14 @@ public void test_value_from_column_of_table_with_displays() throws Exception { } Assertions.assertThat(((Value) fieldValue.get(tableColumnValueOutputter0)).getValue()) - .isSameAs(((Value) fieldValue.get(tableColumnValueOutputterBis0)).getValue()) - .isEqualTo(new BigDecimal("1")); + .isSameAs(((Value) fieldValue.get(tableColumnValueOutputterBis0)).getValue()) + .isEqualTo(new BigDecimal("1")); Assertions.assertThat(((Value) fieldValue.get(tableColumnValueOutputter1)).getValue()) - .isSameAs(((Value) fieldValue.get(tableColumnValueOutputterBis1)).getValue()) - .isEqualTo(new BigDecimal("2")); + .isSameAs(((Value) fieldValue.get(tableColumnValueOutputterBis1)).getValue()) + .isEqualTo(new BigDecimal("2")); Assertions.assertThat(((Value) fieldValue.get(tableColumnValueOutputter2)).getValue()) - .isSameAs(((Value) fieldValue.get(tableColumnValueOutputterBis2)).getValue()) - .isEqualTo(new BigDecimal("3")); + .isSameAs(((Value) fieldValue.get(tableColumnValueOutputterBis2)).getValue()) + .isEqualTo(new BigDecimal("3")); } /** @@ -592,20 +626,20 @@ public void test_value_from_row_of_table_with_displays() throws Exception { } Assertions.assertThat(((Value) fieldValue.get(tableRowValueOutputter0)).getValue()) - .isSameAs(((Value) fieldValue.get(tableRowValueOutputterBis0)).getValue()) - .isEqualTo(new BigDecimal("1")); + .isSameAs(((Value) fieldValue.get(tableRowValueOutputterBis0)).getValue()) + .isEqualTo(new BigDecimal("1")); Assertions.assertThat(((Value) fieldValue.get(tableRowValueOutputter1)).getValue()) - .isSameAs(((Value) fieldValue.get(tableRowValueOutputterBis1)).getValue()) - .isEqualTo("Weaver"); + .isSameAs(((Value) fieldValue.get(tableRowValueOutputterBis1)).getValue()) + .isEqualTo("Weaver"); Assertions.assertThat(((Value) fieldValue.get(tableRowValueOutputter2)).getValue()) - .isSameAs(((Value) fieldValue.get(tableRowValueOutputterBis2)).getValue()) - .isEqualTo("Sigourney"); + .isSameAs(((Value) fieldValue.get(tableRowValueOutputterBis2)).getValue()) + .isEqualTo("Sigourney"); Assertions.assertThat(((Value) fieldValue.get(tableRowValueOutputter3)).getValue()) - .isSameAs(((Value) fieldValue.get(tableRowValueOutputterBis3)).getValue()) - .isEqualTo(Date.valueOf("1949-10-08")); + .isSameAs(((Value) fieldValue.get(tableRowValueOutputterBis3)).getValue()) + .isEqualTo(Date.valueOf("1949-10-08")); Assertions.assertThat(((Value) fieldValue.get(tableRowValueOutputter4)).getValue()) - .isSameAs(((Value) fieldValue.get(tableRowValueOutputterBis4)).getValue()) - .isEqualTo(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")); + .isSameAs(((Value) fieldValue.get(tableRowValueOutputterBis4)).getValue()) + .isEqualTo(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")); } /** @@ -656,14 +690,14 @@ public void test_value_from_column_of_request_with_displays() throws Exception { } Assertions.assertThat(((Value) fieldValue.get(requestColumnValueOutputter0)).getValue()) - .isSameAs(((Value) fieldValue.get(requestColumnValueOutputterBis0)).getValue()) - .isEqualTo(new BigDecimal("1")); + .isSameAs(((Value) fieldValue.get(requestColumnValueOutputterBis0)).getValue()) + .isEqualTo(new BigDecimal("1")); Assertions.assertThat(((Value) fieldValue.get(requestColumnValueOutputter1)).getValue()) - .isSameAs(((Value) fieldValue.get(requestColumnValueOutputterBis1)).getValue()) - .isEqualTo(new BigDecimal("2")); + .isSameAs(((Value) fieldValue.get(requestColumnValueOutputterBis1)).getValue()) + .isEqualTo(new BigDecimal("2")); Assertions.assertThat(((Value) fieldValue.get(requestColumnValueOutputter2)).getValue()) - .isSameAs(((Value) fieldValue.get(requestColumnValueOutputterBis2)).getValue()) - .isEqualTo(new BigDecimal("3")); + .isSameAs(((Value) fieldValue.get(requestColumnValueOutputterBis2)).getValue()) + .isEqualTo(new BigDecimal("3")); } /** @@ -722,19 +756,19 @@ public void test_value_from_row_of_request_with_displays() throws Exception { } Assertions.assertThat(((Value) fieldValue.get(requestRowValueOutputter0)).getValue()) - .isSameAs(((Value) fieldValue.get(requestRowValueOutputterBis0)).getValue()) - .isEqualTo(new BigDecimal("1")); + .isSameAs(((Value) fieldValue.get(requestRowValueOutputterBis0)).getValue()) + .isEqualTo(new BigDecimal("1")); Assertions.assertThat(((Value) fieldValue.get(requestRowValueOutputter1)).getValue()) - .isSameAs(((Value) fieldValue.get(requestRowValueOutputterBis1)).getValue()) - .isEqualTo("Weaver"); + .isSameAs(((Value) fieldValue.get(requestRowValueOutputterBis1)).getValue()) + .isEqualTo("Weaver"); Assertions.assertThat(((Value) fieldValue.get(requestRowValueOutputter2)).getValue()) - .isSameAs(((Value) fieldValue.get(requestRowValueOutputterBis2)).getValue()) - .isEqualTo("Sigourney"); + .isSameAs(((Value) fieldValue.get(requestRowValueOutputterBis2)).getValue()) + .isEqualTo("Sigourney"); Assertions.assertThat(((Value) fieldValue.get(requestRowValueOutputter3)).getValue()) - .isSameAs(((Value) fieldValue.get(requestRowValueOutputterBis3)).getValue()) - .isEqualTo(Date.valueOf("1949-10-08")); + .isSameAs(((Value) fieldValue.get(requestRowValueOutputterBis3)).getValue()) + .isEqualTo(Date.valueOf("1949-10-08")); Assertions.assertThat(((Value) fieldValue.get(requestRowValueOutputter4)).getValue()) - .isSameAs(((Value) fieldValue.get(requestRowValueOutputterBis4)).getValue()) - .isEqualTo(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")); + .isSameAs(((Value) fieldValue.get(requestRowValueOutputterBis4)).getValue()) + .isEqualTo(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")); } } diff --git a/src/test/java/org/assertj/db/output/Outputs_Constructor_Test.java b/src/test/java/org/assertj/db/output/Outputs_Constructor_Test.java index 81b16c69..b3fe63d0 100644 --- a/src/test/java/org/assertj/db/output/Outputs_Constructor_Test.java +++ b/src/test/java/org/assertj/db/output/Outputs_Constructor_Test.java @@ -8,28 +8,28 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.output; -import org.junit.Test; +import static org.assertj.core.api.Assertions.assertThat; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Modifier; -import static org.assertj.core.api.Assertions.assertThat; +import org.junit.Test; /** * Test on the utility class {@code Displaying} : the private constructor. * * @author Régis Pouiller - * */ public class Outputs_Constructor_Test { /** * This method tests the private constructor of {@code Displaying} for the tests coverage.. + * * @throws NoSuchMethodException * @throws SecurityException * @throws java.lang.reflect.InvocationTargetException @@ -39,7 +39,7 @@ public class Outputs_Constructor_Test { */ @Test public void test_private_constructor_for_the_tests_coverage() throws SecurityException, NoSuchMethodException, IllegalArgumentException, InstantiationException, IllegalAccessException, - InvocationTargetException { + InvocationTargetException { Constructor constructor = Outputs.class.getDeclaredConstructor(); assertThat(Modifier.isPrivate(constructor.getModifiers())).isTrue(); constructor.setAccessible(true); diff --git a/src/test/java/org/assertj/db/output/OutputterChange_Test.java b/src/test/java/org/assertj/db/output/OutputterChange_Test.java index 57cf28a2..f1b248c2 100644 --- a/src/test/java/org/assertj/db/output/OutputterChange_Test.java +++ b/src/test/java/org/assertj/db/output/OutputterChange_Test.java @@ -8,20 +8,20 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.output; +import static org.assertj.db.output.Outputs.output; + +import java.io.ByteArrayOutputStream; + import org.assertj.core.api.Assertions; import org.assertj.db.common.AbstractTest; import org.assertj.db.common.NeedReload; import org.assertj.db.type.Changes; import org.junit.Test; -import java.io.ByteArrayOutputStream; - -import static org.assertj.db.output.Outputs.output; - /** * Test the output of changes. * @@ -48,100 +48,100 @@ public void test_output() throws Exception { ByteArrayOutputStream byteArrayOutputStream6 = new ByteArrayOutputStream(); ByteArrayOutputStream byteArrayOutputStream7 = new ByteArrayOutputStream(); output(changes).change().toStream(byteArrayOutputStream0) - .change().toStream(byteArrayOutputStream1) - .change().toStream(byteArrayOutputStream2) - .change().toStream(byteArrayOutputStream3) - .change().toStream(byteArrayOutputStream4) - .change().toStream(byteArrayOutputStream5) - .change().toStream(byteArrayOutputStream6) - .change().toStream(byteArrayOutputStream7); + .change().toStream(byteArrayOutputStream1) + .change().toStream(byteArrayOutputStream2) + .change().toStream(byteArrayOutputStream3) + .change().toStream(byteArrayOutputStream4) + .change().toStream(byteArrayOutputStream5) + .change().toStream(byteArrayOutputStream6) + .change().toStream(byteArrayOutputStream7); Assertions.assertThat(byteArrayOutputStream0.toString()).isEqualTo(String.format("[Change at index 0 (on table : ACTOR and with primary key : [4]) of Changes on tables of 'sa/jdbc:h2:mem:test' source]%n" - + "|----------|-------|---------|----------------|-----------|-----------|-----------|------------|--------------------------------------|%n" - + "| | | | | * | | | | |%n" - + "| TYPE | TABLE | PRIMARY | | ID | NAME | FIRSTNAME | BIRTH | ACTOR_IMDB |%n" - + "| | | KEY | | (NUMBER) | (TEXT) | (TEXT) | (DATE) | (UUID) |%n" - + "| | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 |%n" - + "|----------|-------|---------|----------------|-----------|-----------|-----------|------------|--------------------------------------|%n" - + "| | | | At start point | | | | | |%n" - + "| CREATION | ACTOR | 4 |----------------|-----------|-----------|-----------|------------|--------------------------------------|%n" - + "| | | | At end point | 4 | Murray | Bill | 1950-09-21 | 30b443ae-c0c9-4790-9bec-ce1380808435 |%n" - + "|----------|-------|---------|----------------|-----------|-----------|-----------|------------|--------------------------------------|%n")); + + "|----------|-------|---------|----------------|-----------|-----------|-----------|------------|--------------------------------------|%n" + + "| | | | | * | | | | |%n" + + "| TYPE | TABLE | PRIMARY | | ID | NAME | FIRSTNAME | BIRTH | ACTOR_IMDB |%n" + + "| | | KEY | | (NUMBER) | (TEXT) | (TEXT) | (DATE) | (UUID) |%n" + + "| | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 |%n" + + "|----------|-------|---------|----------------|-----------|-----------|-----------|------------|--------------------------------------|%n" + + "| | | | At start point | | | | | |%n" + + "| CREATION | ACTOR | 4 |----------------|-----------|-----------|-----------|------------|--------------------------------------|%n" + + "| | | | At end point | 4 | Murray | Bill | 1950-09-21 | 30b443ae-c0c9-4790-9bec-ce1380808435 |%n" + + "|----------|-------|---------|----------------|-----------|-----------|-----------|------------|--------------------------------------|%n")); Assertions.assertThat(byteArrayOutputStream1.toString()).isEqualTo(String.format("[Change at index 1 (on table : INTERPRETATION and with primary key : [6]) of Changes on tables of 'sa/jdbc:h2:mem:test' source]%n" - + "|----------|----------------|---------|----------------|-----------|-----------|-----------|------------------|%n" - + "| | | | | * | | | |%n" - + "| TYPE | TABLE | PRIMARY | | ID | ID_MOVIE | ID_ACTOR | CHARACTER |%n" - + "| | | KEY | | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) |%n" - + "| | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 |%n" - + "|----------|----------------|---------|----------------|-----------|-----------|-----------|------------------|%n" - + "| | | | At start point | | | | |%n" - + "| CREATION | INTERPRETATION | 6 |----------------|-----------|-----------|-----------|------------------|%n" - + "| | | | At end point | 6 | 4 | 4 | Dr Peter Venkman |%n" - + "|----------|----------------|---------|----------------|-----------|-----------|-----------|------------------|%n")); + + "|----------|----------------|---------|----------------|-----------|-----------|-----------|------------------|%n" + + "| | | | | * | | | |%n" + + "| TYPE | TABLE | PRIMARY | | ID | ID_MOVIE | ID_ACTOR | CHARACTER |%n" + + "| | | KEY | | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) |%n" + + "| | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 |%n" + + "|----------|----------------|---------|----------------|-----------|-----------|-----------|------------------|%n" + + "| | | | At start point | | | | |%n" + + "| CREATION | INTERPRETATION | 6 |----------------|-----------|-----------|-----------|------------------|%n" + + "| | | | At end point | 6 | 4 | 4 | Dr Peter Venkman |%n" + + "|----------|----------------|---------|----------------|-----------|-----------|-----------|------------------|%n")); Assertions.assertThat(byteArrayOutputStream2.toString()).isEqualTo(String.format("[Change at index 2 (on table : MOVIE and with primary key : [4]) of Changes on tables of 'sa/jdbc:h2:mem:test' source]%n" - + "|----------|-------|---------|----------------|-----------|--------------|-----------|--------------------------------------|%n" - + "| | | | | * | | | |%n" - + "| TYPE | TABLE | PRIMARY | | ID | TITLE | YEAR | MOVIE_IMDB |%n" - + "| | | KEY | | (NUMBER) | (TEXT) | (NUMBER) | (UUID) |%n" - + "| | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 |%n" - + "|----------|-------|---------|----------------|-----------|--------------|-----------|--------------------------------------|%n" - + "| | | | At start point | | | | |%n" - + "| CREATION | MOVIE | 4 |----------------|-----------|--------------|-----------|--------------------------------------|%n" - + "| | | | At end point | 4 | Ghostbusters | 1984 | 30b443ae-c0c9-4790-9bec-ce1380808435 |%n" - + "|----------|-------|---------|----------------|-----------|--------------|-----------|--------------------------------------|%n")); + + "|----------|-------|---------|----------------|-----------|--------------|-----------|--------------------------------------|%n" + + "| | | | | * | | | |%n" + + "| TYPE | TABLE | PRIMARY | | ID | TITLE | YEAR | MOVIE_IMDB |%n" + + "| | | KEY | | (NUMBER) | (TEXT) | (NUMBER) | (UUID) |%n" + + "| | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 |%n" + + "|----------|-------|---------|----------------|-----------|--------------|-----------|--------------------------------------|%n" + + "| | | | At start point | | | | |%n" + + "| CREATION | MOVIE | 4 |----------------|-----------|--------------|-----------|--------------------------------------|%n" + + "| | | | At end point | 4 | Ghostbusters | 1984 | 30b443ae-c0c9-4790-9bec-ce1380808435 |%n" + + "|----------|-------|---------|----------------|-----------|--------------|-----------|--------------------------------------|%n")); Assertions.assertThat(byteArrayOutputStream3.toString()).isEqualTo(String.format("[Change at index 3 (on table : ACTOR and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' source]%n" - + "|--------------|-------|---------|----------------|-----------|-----------|-----------------|------------|--------------------------------------|%n" - + "| | | | | * | | | | |%n" - + "| TYPE | TABLE | PRIMARY | | ID | NAME | FIRSTNAME | BIRTH | ACTOR_IMDB |%n" - + "| | | KEY | | (NUMBER) | (TEXT) | (TEXT) | (DATE) | (UUID) |%n" - + "| | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 |%n" - + "|--------------|-------|---------|----------------|-----------|-----------|-----------------|------------|--------------------------------------|%n" - + "| | | | At start point | 1 | Weaver | Sigourney | 1949-10-08 | 30b443ae-c0c9-4790-9bec-ce1380808435 |%n" - + "| MODIFICATION | ACTOR | 1 |----------------|-----------|-----------|-----------------|------------|--------------------------------------|%n" - + "| | | | At end point | 1 | Weaver | Susan Alexandra | 1949-10-08 | 30b443ae-c0c9-4790-9bec-ce1380808435 |%n" - + "|--------------|-------|---------|----------------|-----------|-----------|-----------------|------------|--------------------------------------|%n")); + + "|--------------|-------|---------|----------------|-----------|-----------|-----------------|------------|--------------------------------------|%n" + + "| | | | | * | | | | |%n" + + "| TYPE | TABLE | PRIMARY | | ID | NAME | FIRSTNAME | BIRTH | ACTOR_IMDB |%n" + + "| | | KEY | | (NUMBER) | (TEXT) | (TEXT) | (DATE) | (UUID) |%n" + + "| | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 |%n" + + "|--------------|-------|---------|----------------|-----------|-----------|-----------------|------------|--------------------------------------|%n" + + "| | | | At start point | 1 | Weaver | Sigourney | 1949-10-08 | 30b443ae-c0c9-4790-9bec-ce1380808435 |%n" + + "| MODIFICATION | ACTOR | 1 |----------------|-----------|-----------|-----------------|------------|--------------------------------------|%n" + + "| | | | At end point | 1 | Weaver | Susan Alexandra | 1949-10-08 | 30b443ae-c0c9-4790-9bec-ce1380808435 |%n" + + "|--------------|-------|---------|----------------|-----------|-----------|-----------------|------------|--------------------------------------|%n")); Assertions.assertThat(byteArrayOutputStream4.toString()).isEqualTo(String.format("[Change at index 4 (on table : INTERPRETATION and with primary key : [3]) of Changes on tables of 'sa/jdbc:h2:mem:test' source]%n" - + "|--------------|----------------|---------|----------------|-----------|-----------|-----------|------------------------|%n" - + "| | | | | * | | | |%n" - + "| TYPE | TABLE | PRIMARY | | ID | ID_MOVIE | ID_ACTOR | CHARACTER |%n" - + "| | | KEY | | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) |%n" - + "| | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 |%n" - + "|--------------|----------------|---------|----------------|-----------|-----------|-----------|------------------------|%n" - + "| | | | At start point | 3 | 3 | 1 | Dr Grace Augustine |%n" - + "| MODIFICATION | INTERPRETATION | 3 |----------------|-----------|-----------|-----------|------------------------|%n" - + "| | | | At end point | 3 | 3 | 1 | Doctor Grace Augustine |%n" - + "|--------------|----------------|---------|----------------|-----------|-----------|-----------|------------------------|%n")); + + "|--------------|----------------|---------|----------------|-----------|-----------|-----------|------------------------|%n" + + "| | | | | * | | | |%n" + + "| TYPE | TABLE | PRIMARY | | ID | ID_MOVIE | ID_ACTOR | CHARACTER |%n" + + "| | | KEY | | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) |%n" + + "| | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 |%n" + + "|--------------|----------------|---------|----------------|-----------|-----------|-----------|------------------------|%n" + + "| | | | At start point | 3 | 3 | 1 | Dr Grace Augustine |%n" + + "| MODIFICATION | INTERPRETATION | 3 |----------------|-----------|-----------|-----------|------------------------|%n" + + "| | | | At end point | 3 | 3 | 1 | Doctor Grace Augustine |%n" + + "|--------------|----------------|---------|----------------|-----------|-----------|-----------|------------------------|%n")); Assertions.assertThat(byteArrayOutputStream5.toString()).isEqualTo(String.format("[Change at index 5 (on table : MOVIE and with primary key : [3]) of Changes on tables of 'sa/jdbc:h2:mem:test' source]%n" - + "|--------------|-------|---------|----------------|-----------|------------|-----------|--------------------------------------|%n" - + "| | | | | * | | | |%n" - + "| TYPE | TABLE | PRIMARY | | ID | TITLE | YEAR | MOVIE_IMDB |%n" - + "| | | KEY | | (NUMBER) | (TEXT) | (NUMBER) | (UUID) |%n" - + "| | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 |%n" - + "|--------------|-------|---------|----------------|-----------|------------|-----------|--------------------------------------|%n" - + "| | | | At start point | 3 | Avatar | 2009 | d735221b-5de5-4112-aa1e-49090cb75ada |%n" - + "| MODIFICATION | MOVIE | 3 |----------------|-----------|------------|-----------|--------------------------------------|%n" - + "| | | | At end point | 3 | The Avatar | 2009 | d735221b-5de5-4112-aa1e-49090cb75ada |%n" - + "|--------------|-------|---------|----------------|-----------|------------|-----------|--------------------------------------|%n")); + + "|--------------|-------|---------|----------------|-----------|------------|-----------|--------------------------------------|%n" + + "| | | | | * | | | |%n" + + "| TYPE | TABLE | PRIMARY | | ID | TITLE | YEAR | MOVIE_IMDB |%n" + + "| | | KEY | | (NUMBER) | (TEXT) | (NUMBER) | (UUID) |%n" + + "| | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 |%n" + + "|--------------|-------|---------|----------------|-----------|------------|-----------|--------------------------------------|%n" + + "| | | | At start point | 3 | Avatar | 2009 | d735221b-5de5-4112-aa1e-49090cb75ada |%n" + + "| MODIFICATION | MOVIE | 3 |----------------|-----------|------------|-----------|--------------------------------------|%n" + + "| | | | At end point | 3 | The Avatar | 2009 | d735221b-5de5-4112-aa1e-49090cb75ada |%n" + + "|--------------|-------|---------|----------------|-----------|------------|-----------|--------------------------------------|%n")); Assertions.assertThat(byteArrayOutputStream6.toString()).isEqualTo(String.format("[Change at index 6 (on table : ACTOR and with primary key : [3]) of Changes on tables of 'sa/jdbc:h2:mem:test' source]%n" - + "|----------|-------|---------|----------------|-----------|-------------|-----------|------------|--------------------------------------|%n" - + "| | | | | * | | | | |%n" - + "| TYPE | TABLE | PRIMARY | | ID | NAME | FIRSTNAME | BIRTH | ACTOR_IMDB |%n" - + "| | | KEY | | (NUMBER) | (TEXT) | (TEXT) | (DATE) | (UUID) |%n" - + "| | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 |%n" - + "|----------|-------|---------|----------------|-----------|-------------|-----------|------------|--------------------------------------|%n" - + "| | | | At start point | 3 | Worthington | Sam | 1976-08-02 | d735221b-5de5-4112-aa1e-49090cb75ada |%n" - + "| DELETION | ACTOR | 3 |----------------|-----------|-------------|-----------|------------|--------------------------------------|%n" - + "| | | | At end point | | | | | |%n" - + "|----------|-------|---------|----------------|-----------|-------------|-----------|------------|--------------------------------------|%n")); + + "|----------|-------|---------|----------------|-----------|-------------|-----------|------------|--------------------------------------|%n" + + "| | | | | * | | | | |%n" + + "| TYPE | TABLE | PRIMARY | | ID | NAME | FIRSTNAME | BIRTH | ACTOR_IMDB |%n" + + "| | | KEY | | (NUMBER) | (TEXT) | (TEXT) | (DATE) | (UUID) |%n" + + "| | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 |%n" + + "|----------|-------|---------|----------------|-----------|-------------|-----------|------------|--------------------------------------|%n" + + "| | | | At start point | 3 | Worthington | Sam | 1976-08-02 | d735221b-5de5-4112-aa1e-49090cb75ada |%n" + + "| DELETION | ACTOR | 3 |----------------|-----------|-------------|-----------|------------|--------------------------------------|%n" + + "| | | | At end point | | | | | |%n" + + "|----------|-------|---------|----------------|-----------|-------------|-----------|------------|--------------------------------------|%n")); Assertions.assertThat(byteArrayOutputStream7.toString()).isEqualTo(String.format("[Change at index 7 (on table : INTERPRETATION and with primary key : [5]) of Changes on tables of 'sa/jdbc:h2:mem:test' source]%n" - + "|----------|----------------|---------|----------------|-----------|-----------|-----------|------------|%n" - + "| | | | | * | | | |%n" - + "| TYPE | TABLE | PRIMARY | | ID | ID_MOVIE | ID_ACTOR | CHARACTER |%n" - + "| | | KEY | | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) |%n" - + "| | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 |%n" - + "|----------|----------------|---------|----------------|-----------|-----------|-----------|------------|%n" - + "| | | | At start point | 5 | 3 | 3 | Jake Sully |%n" - + "| DELETION | INTERPRETATION | 5 |----------------|-----------|-----------|-----------|------------|%n" - + "| | | | At end point | | | | |%n" - + "|----------|----------------|---------|----------------|-----------|-----------|-----------|------------|%n")); + + "|----------|----------------|---------|----------------|-----------|-----------|-----------|------------|%n" + + "| | | | | * | | | |%n" + + "| TYPE | TABLE | PRIMARY | | ID | ID_MOVIE | ID_ACTOR | CHARACTER |%n" + + "| | | KEY | | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) |%n" + + "| | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 |%n" + + "|----------|----------------|---------|----------------|-----------|-----------|-----------|------------|%n" + + "| | | | At start point | 5 | 3 | 3 | Jake Sully |%n" + + "| DELETION | INTERPRETATION | 5 |----------------|-----------|-----------|-----------|------------|%n" + + "| | | | At end point | | | | |%n" + + "|----------|----------------|---------|----------------|-----------|-----------|-----------|------------|%n")); } } diff --git a/src/test/java/org/assertj/db/output/OutputterChanges_Test.java b/src/test/java/org/assertj/db/output/OutputterChanges_Test.java index 04095ed3..10138a02 100644 --- a/src/test/java/org/assertj/db/output/OutputterChanges_Test.java +++ b/src/test/java/org/assertj/db/output/OutputterChanges_Test.java @@ -8,20 +8,20 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.output; +import static org.assertj.db.output.Outputs.output; + +import java.io.ByteArrayOutputStream; + import org.assertj.core.api.Assertions; import org.assertj.db.common.AbstractTest; import org.assertj.db.common.NeedReload; import org.assertj.db.type.Changes; import org.junit.Test; -import java.io.ByteArrayOutputStream; - -import static org.assertj.db.output.Outputs.output; - /** * Test the output of changes. * @@ -42,85 +42,85 @@ public void test_output() throws Exception { ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); output(changes).toStream(byteArrayOutputStream); Assertions.assertThat(byteArrayOutputStream.toString()).isEqualTo(String.format("[Changes on tables of 'sa/jdbc:h2:mem:test' source]%n" - + "|-----------|--------------|----------------|---------|----------------|-----------|-----------|-----------|------------|--------------------------------------|%n" - + "| | | | | | * | | | | |%n" - + "| | TYPE | TABLE | PRIMARY | | ID | NAME | FIRSTNAME | BIRTH | ACTOR_IMDB |%n" - + "| | | | KEY | | (NUMBER) | (TEXT) | (TEXT) | (DATE) | (UUID) |%n" - + "| | | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 |%n" - + "|-----------|--------------|----------------|---------|----------------|-----------|-----------|-----------|------------|--------------------------------------|%n" - + "| | | | | At start point | | | | | |%n" - + "| Index : 0 | CREATION | ACTOR | 4 |----------------|-----------|-----------|-----------|------------|--------------------------------------|%n" - + "| | | | | At end point | 4 | Murray | Bill | 1950-09-21 | 30b443ae-c0c9-4790-9bec-ce1380808435 |%n" - + "|-----------|--------------|----------------|---------|----------------|-----------|-----------|-----------|------------|--------------------------------------|%n" - + "|-----------|--------------|----------------|---------|----------------|-----------|-----------|-----------|------------------|%n" - + "| | | | | | * | | | |%n" - + "| | TYPE | TABLE | PRIMARY | | ID | ID_MOVIE | ID_ACTOR | CHARACTER |%n" - + "| | | | KEY | | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) |%n" - + "| | | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 |%n" - + "|-----------|--------------|----------------|---------|----------------|-----------|-----------|-----------|------------------|%n" - + "| | | | | At start point | | | | |%n" - + "| Index : 1 | CREATION | INTERPRETATION | 6 |----------------|-----------|-----------|-----------|------------------|%n" - + "| | | | | At end point | 6 | 4 | 4 | Dr Peter Venkman |%n" - + "|-----------|--------------|----------------|---------|----------------|-----------|-----------|-----------|------------------|%n" - + "|-----------|--------------|----------------|---------|----------------|-----------|--------------|-----------|--------------------------------------|%n" - + "| | | | | | * | | | |%n" - + "| | TYPE | TABLE | PRIMARY | | ID | TITLE | YEAR | MOVIE_IMDB |%n" - + "| | | | KEY | | (NUMBER) | (TEXT) | (NUMBER) | (UUID) |%n" - + "| | | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 |%n" - + "|-----------|--------------|----------------|---------|----------------|-----------|--------------|-----------|--------------------------------------|%n" - + "| | | | | At start point | | | | |%n" - + "| Index : 2 | CREATION | MOVIE | 4 |----------------|-----------|--------------|-----------|--------------------------------------|%n" - + "| | | | | At end point | 4 | Ghostbusters | 1984 | 30b443ae-c0c9-4790-9bec-ce1380808435 |%n" - + "|-----------|--------------|----------------|---------|----------------|-----------|--------------|-----------|--------------------------------------|%n" - + "|-----------|--------------|----------------|---------|----------------|-----------|-----------|-----------------|------------|--------------------------------------|%n" - + "| | | | | | * | | | | |%n" - + "| | TYPE | TABLE | PRIMARY | | ID | NAME | FIRSTNAME | BIRTH | ACTOR_IMDB |%n" - + "| | | | KEY | | (NUMBER) | (TEXT) | (TEXT) | (DATE) | (UUID) |%n" - + "| | | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 |%n" - + "|-----------|--------------|----------------|---------|----------------|-----------|-----------|-----------------|------------|--------------------------------------|%n" - + "| | | | | At start point | 1 | Weaver | Sigourney | 1949-10-08 | 30b443ae-c0c9-4790-9bec-ce1380808435 |%n" - + "| Index : 3 | MODIFICATION | ACTOR | 1 |----------------|-----------|-----------|-----------------|------------|--------------------------------------|%n" - + "| | | | | At end point | 1 | Weaver | Susan Alexandra | 1949-10-08 | 30b443ae-c0c9-4790-9bec-ce1380808435 |%n" - + "|-----------|--------------|----------------|---------|----------------|-----------|-----------|-----------------|------------|--------------------------------------|%n" - + "|-----------|--------------|----------------|---------|----------------|-----------|-----------|-----------|------------------------|%n" - + "| | | | | | * | | | |%n" - + "| | TYPE | TABLE | PRIMARY | | ID | ID_MOVIE | ID_ACTOR | CHARACTER |%n" - + "| | | | KEY | | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) |%n" - + "| | | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 |%n" - + "|-----------|--------------|----------------|---------|----------------|-----------|-----------|-----------|------------------------|%n" - + "| | | | | At start point | 3 | 3 | 1 | Dr Grace Augustine |%n" - + "| Index : 4 | MODIFICATION | INTERPRETATION | 3 |----------------|-----------|-----------|-----------|------------------------|%n" - + "| | | | | At end point | 3 | 3 | 1 | Doctor Grace Augustine |%n" - + "|-----------|--------------|----------------|---------|----------------|-----------|-----------|-----------|------------------------|%n" - + "|-----------|--------------|----------------|---------|----------------|-----------|------------|-----------|--------------------------------------|%n" - + "| | | | | | * | | | |%n" - + "| | TYPE | TABLE | PRIMARY | | ID | TITLE | YEAR | MOVIE_IMDB |%n" - + "| | | | KEY | | (NUMBER) | (TEXT) | (NUMBER) | (UUID) |%n" - + "| | | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 |%n" - + "|-----------|--------------|----------------|---------|----------------|-----------|------------|-----------|--------------------------------------|%n" - + "| | | | | At start point | 3 | Avatar | 2009 | d735221b-5de5-4112-aa1e-49090cb75ada |%n" - + "| Index : 5 | MODIFICATION | MOVIE | 3 |----------------|-----------|------------|-----------|--------------------------------------|%n" - + "| | | | | At end point | 3 | The Avatar | 2009 | d735221b-5de5-4112-aa1e-49090cb75ada |%n" - + "|-----------|--------------|----------------|---------|----------------|-----------|------------|-----------|--------------------------------------|%n" - + "|-----------|--------------|----------------|---------|----------------|-----------|-------------|-----------|------------|--------------------------------------|%n" - + "| | | | | | * | | | | |%n" - + "| | TYPE | TABLE | PRIMARY | | ID | NAME | FIRSTNAME | BIRTH | ACTOR_IMDB |%n" - + "| | | | KEY | | (NUMBER) | (TEXT) | (TEXT) | (DATE) | (UUID) |%n" - + "| | | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 |%n" - + "|-----------|--------------|----------------|---------|----------------|-----------|-------------|-----------|------------|--------------------------------------|%n" - + "| | | | | At start point | 3 | Worthington | Sam | 1976-08-02 | d735221b-5de5-4112-aa1e-49090cb75ada |%n" - + "| Index : 6 | DELETION | ACTOR | 3 |----------------|-----------|-------------|-----------|------------|--------------------------------------|%n" - + "| | | | | At end point | | | | | |%n" - + "|-----------|--------------|----------------|---------|----------------|-----------|-------------|-----------|------------|--------------------------------------|%n" - + "|-----------|--------------|----------------|---------|----------------|-----------|-----------|-----------|------------|%n" - + "| | | | | | * | | | |%n" - + "| | TYPE | TABLE | PRIMARY | | ID | ID_MOVIE | ID_ACTOR | CHARACTER |%n" - + "| | | | KEY | | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) |%n" - + "| | | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 |%n" - + "|-----------|--------------|----------------|---------|----------------|-----------|-----------|-----------|------------|%n" - + "| | | | | At start point | 5 | 3 | 3 | Jake Sully |%n" - + "| Index : 7 | DELETION | INTERPRETATION | 5 |----------------|-----------|-----------|-----------|------------|%n" - + "| | | | | At end point | | | | |%n" - + "|-----------|--------------|----------------|---------|----------------|-----------|-----------|-----------|------------|%n")); + + "|-----------|--------------|----------------|---------|----------------|-----------|-----------|-----------|------------|--------------------------------------|%n" + + "| | | | | | * | | | | |%n" + + "| | TYPE | TABLE | PRIMARY | | ID | NAME | FIRSTNAME | BIRTH | ACTOR_IMDB |%n" + + "| | | | KEY | | (NUMBER) | (TEXT) | (TEXT) | (DATE) | (UUID) |%n" + + "| | | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 |%n" + + "|-----------|--------------|----------------|---------|----------------|-----------|-----------|-----------|------------|--------------------------------------|%n" + + "| | | | | At start point | | | | | |%n" + + "| Index : 0 | CREATION | ACTOR | 4 |----------------|-----------|-----------|-----------|------------|--------------------------------------|%n" + + "| | | | | At end point | 4 | Murray | Bill | 1950-09-21 | 30b443ae-c0c9-4790-9bec-ce1380808435 |%n" + + "|-----------|--------------|----------------|---------|----------------|-----------|-----------|-----------|------------|--------------------------------------|%n" + + "|-----------|--------------|----------------|---------|----------------|-----------|-----------|-----------|------------------|%n" + + "| | | | | | * | | | |%n" + + "| | TYPE | TABLE | PRIMARY | | ID | ID_MOVIE | ID_ACTOR | CHARACTER |%n" + + "| | | | KEY | | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) |%n" + + "| | | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 |%n" + + "|-----------|--------------|----------------|---------|----------------|-----------|-----------|-----------|------------------|%n" + + "| | | | | At start point | | | | |%n" + + "| Index : 1 | CREATION | INTERPRETATION | 6 |----------------|-----------|-----------|-----------|------------------|%n" + + "| | | | | At end point | 6 | 4 | 4 | Dr Peter Venkman |%n" + + "|-----------|--------------|----------------|---------|----------------|-----------|-----------|-----------|------------------|%n" + + "|-----------|--------------|----------------|---------|----------------|-----------|--------------|-----------|--------------------------------------|%n" + + "| | | | | | * | | | |%n" + + "| | TYPE | TABLE | PRIMARY | | ID | TITLE | YEAR | MOVIE_IMDB |%n" + + "| | | | KEY | | (NUMBER) | (TEXT) | (NUMBER) | (UUID) |%n" + + "| | | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 |%n" + + "|-----------|--------------|----------------|---------|----------------|-----------|--------------|-----------|--------------------------------------|%n" + + "| | | | | At start point | | | | |%n" + + "| Index : 2 | CREATION | MOVIE | 4 |----------------|-----------|--------------|-----------|--------------------------------------|%n" + + "| | | | | At end point | 4 | Ghostbusters | 1984 | 30b443ae-c0c9-4790-9bec-ce1380808435 |%n" + + "|-----------|--------------|----------------|---------|----------------|-----------|--------------|-----------|--------------------------------------|%n" + + "|-----------|--------------|----------------|---------|----------------|-----------|-----------|-----------------|------------|--------------------------------------|%n" + + "| | | | | | * | | | | |%n" + + "| | TYPE | TABLE | PRIMARY | | ID | NAME | FIRSTNAME | BIRTH | ACTOR_IMDB |%n" + + "| | | | KEY | | (NUMBER) | (TEXT) | (TEXT) | (DATE) | (UUID) |%n" + + "| | | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 |%n" + + "|-----------|--------------|----------------|---------|----------------|-----------|-----------|-----------------|------------|--------------------------------------|%n" + + "| | | | | At start point | 1 | Weaver | Sigourney | 1949-10-08 | 30b443ae-c0c9-4790-9bec-ce1380808435 |%n" + + "| Index : 3 | MODIFICATION | ACTOR | 1 |----------------|-----------|-----------|-----------------|------------|--------------------------------------|%n" + + "| | | | | At end point | 1 | Weaver | Susan Alexandra | 1949-10-08 | 30b443ae-c0c9-4790-9bec-ce1380808435 |%n" + + "|-----------|--------------|----------------|---------|----------------|-----------|-----------|-----------------|------------|--------------------------------------|%n" + + "|-----------|--------------|----------------|---------|----------------|-----------|-----------|-----------|------------------------|%n" + + "| | | | | | * | | | |%n" + + "| | TYPE | TABLE | PRIMARY | | ID | ID_MOVIE | ID_ACTOR | CHARACTER |%n" + + "| | | | KEY | | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) |%n" + + "| | | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 |%n" + + "|-----------|--------------|----------------|---------|----------------|-----------|-----------|-----------|------------------------|%n" + + "| | | | | At start point | 3 | 3 | 1 | Dr Grace Augustine |%n" + + "| Index : 4 | MODIFICATION | INTERPRETATION | 3 |----------------|-----------|-----------|-----------|------------------------|%n" + + "| | | | | At end point | 3 | 3 | 1 | Doctor Grace Augustine |%n" + + "|-----------|--------------|----------------|---------|----------------|-----------|-----------|-----------|------------------------|%n" + + "|-----------|--------------|----------------|---------|----------------|-----------|------------|-----------|--------------------------------------|%n" + + "| | | | | | * | | | |%n" + + "| | TYPE | TABLE | PRIMARY | | ID | TITLE | YEAR | MOVIE_IMDB |%n" + + "| | | | KEY | | (NUMBER) | (TEXT) | (NUMBER) | (UUID) |%n" + + "| | | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 |%n" + + "|-----------|--------------|----------------|---------|----------------|-----------|------------|-----------|--------------------------------------|%n" + + "| | | | | At start point | 3 | Avatar | 2009 | d735221b-5de5-4112-aa1e-49090cb75ada |%n" + + "| Index : 5 | MODIFICATION | MOVIE | 3 |----------------|-----------|------------|-----------|--------------------------------------|%n" + + "| | | | | At end point | 3 | The Avatar | 2009 | d735221b-5de5-4112-aa1e-49090cb75ada |%n" + + "|-----------|--------------|----------------|---------|----------------|-----------|------------|-----------|--------------------------------------|%n" + + "|-----------|--------------|----------------|---------|----------------|-----------|-------------|-----------|------------|--------------------------------------|%n" + + "| | | | | | * | | | | |%n" + + "| | TYPE | TABLE | PRIMARY | | ID | NAME | FIRSTNAME | BIRTH | ACTOR_IMDB |%n" + + "| | | | KEY | | (NUMBER) | (TEXT) | (TEXT) | (DATE) | (UUID) |%n" + + "| | | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 |%n" + + "|-----------|--------------|----------------|---------|----------------|-----------|-------------|-----------|------------|--------------------------------------|%n" + + "| | | | | At start point | 3 | Worthington | Sam | 1976-08-02 | d735221b-5de5-4112-aa1e-49090cb75ada |%n" + + "| Index : 6 | DELETION | ACTOR | 3 |----------------|-----------|-------------|-----------|------------|--------------------------------------|%n" + + "| | | | | At end point | | | | | |%n" + + "|-----------|--------------|----------------|---------|----------------|-----------|-------------|-----------|------------|--------------------------------------|%n" + + "|-----------|--------------|----------------|---------|----------------|-----------|-----------|-----------|------------|%n" + + "| | | | | | * | | | |%n" + + "| | TYPE | TABLE | PRIMARY | | ID | ID_MOVIE | ID_ACTOR | CHARACTER |%n" + + "| | | | KEY | | (NUMBER) | (NUMBER) | (NUMBER) | (TEXT) |%n" + + "| | | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 |%n" + + "|-----------|--------------|----------------|---------|----------------|-----------|-----------|-----------|------------|%n" + + "| | | | | At start point | 5 | 3 | 3 | Jake Sully |%n" + + "| Index : 7 | DELETION | INTERPRETATION | 5 |----------------|-----------|-----------|-----------|------------|%n" + + "| | | | | At end point | | | | |%n" + + "|-----------|--------------|----------------|---------|----------------|-----------|-----------|-----------|------------|%n")); } } diff --git a/src/test/java/org/assertj/db/output/OutputterColumn_Test.java b/src/test/java/org/assertj/db/output/OutputterColumn_Test.java index e40855e0..4091979c 100644 --- a/src/test/java/org/assertj/db/output/OutputterColumn_Test.java +++ b/src/test/java/org/assertj/db/output/OutputterColumn_Test.java @@ -8,10 +8,14 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.output; +import static org.assertj.db.output.Outputs.output; + +import java.io.ByteArrayOutputStream; + import org.assertj.core.api.Assertions; import org.assertj.db.common.AbstractTest; import org.assertj.db.common.NeedReload; @@ -20,10 +24,6 @@ import org.assertj.db.type.Table; import org.junit.Test; -import java.io.ByteArrayOutputStream; - -import static org.assertj.db.output.Outputs.output; - /** * Test the output of columns. * @@ -42,35 +42,35 @@ public void test_output_for_table() throws Exception { ByteArrayOutputStream byteArrayOutputStream1 = new ByteArrayOutputStream(); ByteArrayOutputStream byteArrayOutputStream2 = new ByteArrayOutputStream(); Outputs.output(table).column().toStream(byteArrayOutputStream0) - .column(1).toStream(byteArrayOutputStream1) - .column().toStream(byteArrayOutputStream2); + .column(1).toStream(byteArrayOutputStream1) + .column().toStream(byteArrayOutputStream2); Assertions.assertThat(byteArrayOutputStream0.toString()).isEqualTo(String.format("[Column at index 0 (column name : ID) of ACTOR table]%n" - + "|-----------|----------|%n" - + "| | ID |%n" - + "| | (NUMBER) |%n" - + "|-----------|----------|%n" - + "| Index : 0 | 1 |%n" - + "| Index : 1 | 2 |%n" - + "| Index : 2 | 3 |%n" - + "|-----------|----------|%n")); + + "|-----------|----------|%n" + + "| | ID |%n" + + "| | (NUMBER) |%n" + + "|-----------|----------|%n" + + "| Index : 0 | 1 |%n" + + "| Index : 1 | 2 |%n" + + "| Index : 2 | 3 |%n" + + "|-----------|----------|%n")); Assertions.assertThat(byteArrayOutputStream1.toString()).isEqualTo(String.format("[Column at index 1 (column name : NAME) of ACTOR table]%n" - + "|-----------|-------------|%n" - + "| | NAME |%n" - + "| | (TEXT) |%n" - + "|-----------|-------------|%n" - + "| Index : 0 | Weaver |%n" - + "| Index : 1 | Phoenix |%n" - + "| Index : 2 | Worthington |%n" - + "|-----------|-------------|%n")); + + "|-----------|-------------|%n" + + "| | NAME |%n" + + "| | (TEXT) |%n" + + "|-----------|-------------|%n" + + "| Index : 0 | Weaver |%n" + + "| Index : 1 | Phoenix |%n" + + "| Index : 2 | Worthington |%n" + + "|-----------|-------------|%n")); Assertions.assertThat(byteArrayOutputStream2.toString()).isEqualTo(String.format("[Column at index 2 (column name : FIRSTNAME) of ACTOR table]%n" - + "|-----------|-----------|%n" - + "| | FIRSTNAME |%n" - + "| | (TEXT) |%n" - + "|-----------|-----------|%n" - + "| Index : 0 | Sigourney |%n" - + "| Index : 1 | Joaquim |%n" - + "| Index : 2 | Sam |%n" - + "|-----------|-----------|%n")); + + "|-----------|-----------|%n" + + "| | FIRSTNAME |%n" + + "| | (TEXT) |%n" + + "|-----------|-----------|%n" + + "| Index : 0 | Sigourney |%n" + + "| Index : 1 | Joaquim |%n" + + "| Index : 2 | Sam |%n" + + "|-----------|-----------|%n")); } /** @@ -84,35 +84,35 @@ public void test_output_for_request() throws Exception { ByteArrayOutputStream byteArrayOutputStream1 = new ByteArrayOutputStream(); ByteArrayOutputStream byteArrayOutputStream2 = new ByteArrayOutputStream(); Outputs.output(request).column().toStream(byteArrayOutputStream0) - .column(1).toStream(byteArrayOutputStream1) - .column().toStream(byteArrayOutputStream2); + .column(1).toStream(byteArrayOutputStream1) + .column().toStream(byteArrayOutputStream2); Assertions.assertThat(byteArrayOutputStream0.toString()).isEqualTo(String.format("[Column at index 0 (column name : ID) of 'select * from actor' request]%n" - + "|-----------|----------|%n" - + "| | ID |%n" - + "| | (NUMBER) |%n" - + "|-----------|----------|%n" - + "| Index : 0 | 1 |%n" - + "| Index : 1 | 2 |%n" - + "| Index : 2 | 3 |%n" - + "|-----------|----------|%n")); + + "|-----------|----------|%n" + + "| | ID |%n" + + "| | (NUMBER) |%n" + + "|-----------|----------|%n" + + "| Index : 0 | 1 |%n" + + "| Index : 1 | 2 |%n" + + "| Index : 2 | 3 |%n" + + "|-----------|----------|%n")); Assertions.assertThat(byteArrayOutputStream1.toString()).isEqualTo(String.format("[Column at index 1 (column name : NAME) of 'select * from actor' request]%n" - + "|-----------|-------------|%n" - + "| | NAME |%n" - + "| | (TEXT) |%n" - + "|-----------|-------------|%n" - + "| Index : 0 | Weaver |%n" - + "| Index : 1 | Phoenix |%n" - + "| Index : 2 | Worthington |%n" - + "|-----------|-------------|%n")); + + "|-----------|-------------|%n" + + "| | NAME |%n" + + "| | (TEXT) |%n" + + "|-----------|-------------|%n" + + "| Index : 0 | Weaver |%n" + + "| Index : 1 | Phoenix |%n" + + "| Index : 2 | Worthington |%n" + + "|-----------|-------------|%n")); Assertions.assertThat(byteArrayOutputStream2.toString()).isEqualTo(String.format("[Column at index 2 (column name : FIRSTNAME) of 'select * from actor' request]%n" - + "|-----------|-----------|%n" - + "| | FIRSTNAME |%n" - + "| | (TEXT) |%n" - + "|-----------|-----------|%n" - + "| Index : 0 | Sigourney |%n" - + "| Index : 1 | Joaquim |%n" - + "| Index : 2 | Sam |%n" - + "|-----------|-----------|%n")); + + "|-----------|-----------|%n" + + "| | FIRSTNAME |%n" + + "| | (TEXT) |%n" + + "|-----------|-----------|%n" + + "| Index : 0 | Sigourney |%n" + + "| Index : 1 | Joaquim |%n" + + "| Index : 2 | Sam |%n" + + "|-----------|-----------|%n")); } /** @@ -129,34 +129,34 @@ public void test_output_for_change() throws Exception { ByteArrayOutputStream byteArrayOutputStream1 = new ByteArrayOutputStream(); ByteArrayOutputStream byteArrayOutputStream2 = new ByteArrayOutputStream(); output(changes).change().column().toStream(byteArrayOutputStream0) - .column().toStream(byteArrayOutputStream1) - .column().toStream(byteArrayOutputStream2); + .column().toStream(byteArrayOutputStream1) + .column().toStream(byteArrayOutputStream2); Assertions.assertThat(byteArrayOutputStream0.toString()).isEqualTo(String.format("[Column at index 0 (column name : ID) of Change at index 0 (on table : ACTOR and with primary key : [4]) of Changes on tables of 'sa/jdbc:h2:mem:test' source]%n" - + "|----------------|----------|%n" - + "| | ID |%n" - + "| | (NUMBER) |%n" - + "|----------------|----------|%n" - + "| At start point | null |%n" - + "|----------------|----------|%n" - + "| At end point | 4 |%n" - + "|----------------|----------|%n")); + + "|----------------|----------|%n" + + "| | ID |%n" + + "| | (NUMBER) |%n" + + "|----------------|----------|%n" + + "| At start point | null |%n" + + "|----------------|----------|%n" + + "| At end point | 4 |%n" + + "|----------------|----------|%n")); Assertions.assertThat(byteArrayOutputStream1.toString()).isEqualTo(String.format("[Column at index 1 (column name : NAME) of Change at index 0 (on table : ACTOR and with primary key : [4]) of Changes on tables of 'sa/jdbc:h2:mem:test' source]%n" - + "|----------------|--------|%n" - + "| | NAME |%n" - + "| | (TEXT) |%n" - + "|----------------|--------|%n" - + "| At start point | null |%n" - + "|----------------|--------|%n" - + "| At end point | Murray |%n" - + "|----------------|--------|%n")); + + "|----------------|--------|%n" + + "| | NAME |%n" + + "| | (TEXT) |%n" + + "|----------------|--------|%n" + + "| At start point | null |%n" + + "|----------------|--------|%n" + + "| At end point | Murray |%n" + + "|----------------|--------|%n")); Assertions.assertThat(byteArrayOutputStream2.toString()).isEqualTo(String.format("[Column at index 2 (column name : FIRSTNAME) of Change at index 0 (on table : ACTOR and with primary key : [4]) of Changes on tables of 'sa/jdbc:h2:mem:test' source]%n" - + "|----------------|-----------|%n" - + "| | FIRSTNAME |%n" - + "| | (TEXT) |%n" - + "|----------------|-----------|%n" - + "| At start point | null |%n" - + "|----------------|-----------|%n" - + "| At end point | Bill |%n" - + "|----------------|-----------|%n")); + + "|----------------|-----------|%n" + + "| | FIRSTNAME |%n" + + "| | (TEXT) |%n" + + "|----------------|-----------|%n" + + "| At start point | null |%n" + + "|----------------|-----------|%n" + + "| At end point | Bill |%n" + + "|----------------|-----------|%n")); } } diff --git a/src/test/java/org/assertj/db/output/OutputterException_Test.java b/src/test/java/org/assertj/db/output/OutputterException_Test.java index b4b2ae6a..5b375dd7 100644 --- a/src/test/java/org/assertj/db/output/OutputterException_Test.java +++ b/src/test/java/org/assertj/db/output/OutputterException_Test.java @@ -8,10 +8,14 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.output; +import static org.junit.Assert.fail; + +import java.io.File; + import org.assertj.core.api.Assertions; import org.assertj.db.common.AbstractTest; import org.assertj.db.common.NeedReload; @@ -21,10 +25,6 @@ import org.assertj.db.type.Table; import org.junit.Test; -import java.io.File; - -import static org.junit.Assert.fail; - /** * Test the exception of output. * @@ -52,8 +52,8 @@ public void test_display_from_column_for_table() throws Exception { fail("An exception must be raised"); } catch (AssertJDBException e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("Column does not exist%n" - + "in <[ID, NAME, FIRSTNAME, BIRTH, ACTOR_IMDB]>%n" - + "with comparison IGNORE - Ignore the case")); + + "in <[ID, NAME, FIRSTNAME, BIRTH, ACTOR_IMDB]>%n" + + "with comparison IGNORE - Ignore the case")); } } @@ -76,8 +76,8 @@ public void test_display_from_column_for_request() throws Exception { fail("An exception must be raised"); } catch (AssertJDBException e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("Column does not exist%n" - + "in <[ID, NAME, FIRSTNAME, BIRTH, ACTOR_IMDB]>%n" - + "with comparison IGNORE - Ignore the case")); + + "in <[ID, NAME, FIRSTNAME, BIRTH, ACTOR_IMDB]>%n" + + "with comparison IGNORE - Ignore the case")); } } @@ -132,8 +132,8 @@ public void test_display_from_value_from_row_for_table() throws Exception { fail("An exception must be raised"); } catch (AssertJDBException e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("Column does not exist%n" - + "in <[ID, NAME, FIRSTNAME, BIRTH, ACTOR_IMDB]>%n" - + "with comparison IGNORE - Ignore the case")); + + "in <[ID, NAME, FIRSTNAME, BIRTH, ACTOR_IMDB]>%n" + + "with comparison IGNORE - Ignore the case")); } } @@ -156,8 +156,8 @@ public void test_display_from_value_from_row_for_request() throws Exception { fail("An exception must be raised"); } catch (AssertJDBException e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("Column does not exist%n" - + "in <[ID, NAME, FIRSTNAME, BIRTH, ACTOR_IMDB]>%n" - + "with comparison IGNORE - Ignore the case")); + + "in <[ID, NAME, FIRSTNAME, BIRTH, ACTOR_IMDB]>%n" + + "with comparison IGNORE - Ignore the case")); } } diff --git a/src/test/java/org/assertj/db/output/OutputterRequest_Test.java b/src/test/java/org/assertj/db/output/OutputterRequest_Test.java index d3d6090d..35fddfdd 100644 --- a/src/test/java/org/assertj/db/output/OutputterRequest_Test.java +++ b/src/test/java/org/assertj/db/output/OutputterRequest_Test.java @@ -8,19 +8,19 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.output; +import static org.assertj.db.output.Outputs.output; + +import java.io.ByteArrayOutputStream; + import org.assertj.core.api.Assertions; import org.assertj.db.common.AbstractTest; import org.assertj.db.type.Request; import org.junit.Test; -import java.io.ByteArrayOutputStream; - -import static org.assertj.db.output.Outputs.output; - /** * Test the output of requests. * @@ -38,16 +38,16 @@ public void test_output() throws Exception { ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); output(request).toStream(byteArrayOutputStream); Assertions.assertThat(byteArrayOutputStream.toString()).isEqualTo(String.format("['select * from actor' request]%n" - + "|-----------|---------|-----------|-------------|-----------|------------|--------------------------------------|%n" - + "| | | | | | | |%n" - + "| | PRIMARY | ID | NAME | FIRSTNAME | BIRTH | ACTOR_IMDB |%n" - + "| | KEY | (NUMBER) | (TEXT) | (TEXT) | (DATE) | (UUID) |%n" - + "| | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 |%n" - + "|-----------|---------|-----------|-------------|-----------|------------|--------------------------------------|%n" - + "| Index : 0 | | 1 | Weaver | Sigourney | 1949-10-08 | 30b443ae-c0c9-4790-9bec-ce1380808435 |%n" - + "| Index : 1 | | 2 | Phoenix | Joaquim | 1974-10-28 | 16319617-ae95-4087-9264-d3d21bf611b6 |%n" - + "| Index : 2 | | 3 | Worthington | Sam | 1976-08-02 | d735221b-5de5-4112-aa1e-49090cb75ada |%n" - + "|-----------|---------|-----------|-------------|-----------|------------|--------------------------------------|%n")); + + "|-----------|---------|-----------|-------------|-----------|------------|--------------------------------------|%n" + + "| | | | | | | |%n" + + "| | PRIMARY | ID | NAME | FIRSTNAME | BIRTH | ACTOR_IMDB |%n" + + "| | KEY | (NUMBER) | (TEXT) | (TEXT) | (DATE) | (UUID) |%n" + + "| | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 |%n" + + "|-----------|---------|-----------|-------------|-----------|------------|--------------------------------------|%n" + + "| Index : 0 | | 1 | Weaver | Sigourney | 1949-10-08 | 30b443ae-c0c9-4790-9bec-ce1380808435 |%n" + + "| Index : 1 | | 2 | Phoenix | Joaquim | 1974-10-28 | 16319617-ae95-4087-9264-d3d21bf611b6 |%n" + + "| Index : 2 | | 3 | Worthington | Sam | 1976-08-02 | d735221b-5de5-4112-aa1e-49090cb75ada |%n" + + "|-----------|---------|-----------|-------------|-----------|------------|--------------------------------------|%n")); } /** @@ -175,4 +175,4 @@ public void test_navigation() throws Exception { Assertions.assertThat(requestOutputter).isSameAs(requestOutputterFromRow).isSameAs(requestOutputterFromRowValue).isSameAs(requestOutputterFromColumn).isSameAs(requestOutputterFromColumnValue); } -} \ No newline at end of file +} diff --git a/src/test/java/org/assertj/db/output/OutputterRow_Test.java b/src/test/java/org/assertj/db/output/OutputterRow_Test.java index 4264bfa1..a6bc2001 100644 --- a/src/test/java/org/assertj/db/output/OutputterRow_Test.java +++ b/src/test/java/org/assertj/db/output/OutputterRow_Test.java @@ -8,10 +8,14 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.output; +import static org.assertj.db.output.Outputs.output; + +import java.io.ByteArrayOutputStream; + import org.assertj.core.api.Assertions; import org.assertj.db.common.AbstractTest; import org.assertj.db.common.NeedReload; @@ -20,10 +24,6 @@ import org.assertj.db.type.Table; import org.junit.Test; -import java.io.ByteArrayOutputStream; - -import static org.assertj.db.output.Outputs.output; - /** * Test the output of rows. * @@ -42,35 +42,35 @@ public void test_output_for_table() throws Exception { ByteArrayOutputStream byteArrayOutputStream1 = new ByteArrayOutputStream(); ByteArrayOutputStream byteArrayOutputStream2 = new ByteArrayOutputStream(); Outputs.output(table).row().toStream(byteArrayOutputStream0) - .row(1).toStream(byteArrayOutputStream1) - .row().toStream(byteArrayOutputStream2); + .row(1).toStream(byteArrayOutputStream1) + .row().toStream(byteArrayOutputStream2); Assertions.assertThat(byteArrayOutputStream0.toString()).isEqualTo(String.format("[Row at index 0 of ACTOR table]%n" - + "|---------|-----------|-----------|-----------|------------|--------------------------------------|%n" - + "| | * | | | | |%n" - + "| PRIMARY | ID | NAME | FIRSTNAME | BIRTH | ACTOR_IMDB |%n" - + "| KEY | (NUMBER) | (TEXT) | (TEXT) | (DATE) | (UUID) |%n" - + "| | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 |%n" - + "|---------|-----------|-----------|-----------|------------|--------------------------------------|%n" - + "| 1 | 1 | Weaver | Sigourney | 1949-10-08 | 30b443ae-c0c9-4790-9bec-ce1380808435 |%n" - + "|---------|-----------|-----------|-----------|------------|--------------------------------------|%n")); + + "|---------|-----------|-----------|-----------|------------|--------------------------------------|%n" + + "| | * | | | | |%n" + + "| PRIMARY | ID | NAME | FIRSTNAME | BIRTH | ACTOR_IMDB |%n" + + "| KEY | (NUMBER) | (TEXT) | (TEXT) | (DATE) | (UUID) |%n" + + "| | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 |%n" + + "|---------|-----------|-----------|-----------|------------|--------------------------------------|%n" + + "| 1 | 1 | Weaver | Sigourney | 1949-10-08 | 30b443ae-c0c9-4790-9bec-ce1380808435 |%n" + + "|---------|-----------|-----------|-----------|------------|--------------------------------------|%n")); Assertions.assertThat(byteArrayOutputStream1.toString()).isEqualTo(String.format("[Row at index 1 of ACTOR table]%n" - + "|---------|-----------|-----------|-----------|------------|--------------------------------------|%n" - + "| | * | | | | |%n" - + "| PRIMARY | ID | NAME | FIRSTNAME | BIRTH | ACTOR_IMDB |%n" - + "| KEY | (NUMBER) | (TEXT) | (TEXT) | (DATE) | (UUID) |%n" - + "| | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 |%n" - + "|---------|-----------|-----------|-----------|------------|--------------------------------------|%n" - + "| 2 | 2 | Phoenix | Joaquim | 1974-10-28 | 16319617-ae95-4087-9264-d3d21bf611b6 |%n" - + "|---------|-----------|-----------|-----------|------------|--------------------------------------|%n")); + + "|---------|-----------|-----------|-----------|------------|--------------------------------------|%n" + + "| | * | | | | |%n" + + "| PRIMARY | ID | NAME | FIRSTNAME | BIRTH | ACTOR_IMDB |%n" + + "| KEY | (NUMBER) | (TEXT) | (TEXT) | (DATE) | (UUID) |%n" + + "| | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 |%n" + + "|---------|-----------|-----------|-----------|------------|--------------------------------------|%n" + + "| 2 | 2 | Phoenix | Joaquim | 1974-10-28 | 16319617-ae95-4087-9264-d3d21bf611b6 |%n" + + "|---------|-----------|-----------|-----------|------------|--------------------------------------|%n")); Assertions.assertThat(byteArrayOutputStream2.toString()).isEqualTo(String.format("[Row at index 2 of ACTOR table]%n" - + "|---------|-----------|-------------|-----------|------------|--------------------------------------|%n" - + "| | * | | | | |%n" - + "| PRIMARY | ID | NAME | FIRSTNAME | BIRTH | ACTOR_IMDB |%n" - + "| KEY | (NUMBER) | (TEXT) | (TEXT) | (DATE) | (UUID) |%n" - + "| | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 |%n" - + "|---------|-----------|-------------|-----------|------------|--------------------------------------|%n" - + "| 3 | 3 | Worthington | Sam | 1976-08-02 | d735221b-5de5-4112-aa1e-49090cb75ada |%n" - + "|---------|-----------|-------------|-----------|------------|--------------------------------------|%n")); + + "|---------|-----------|-------------|-----------|------------|--------------------------------------|%n" + + "| | * | | | | |%n" + + "| PRIMARY | ID | NAME | FIRSTNAME | BIRTH | ACTOR_IMDB |%n" + + "| KEY | (NUMBER) | (TEXT) | (TEXT) | (DATE) | (UUID) |%n" + + "| | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 |%n" + + "|---------|-----------|-------------|-----------|------------|--------------------------------------|%n" + + "| 3 | 3 | Worthington | Sam | 1976-08-02 | d735221b-5de5-4112-aa1e-49090cb75ada |%n" + + "|---------|-----------|-------------|-----------|------------|--------------------------------------|%n")); } /** @@ -84,35 +84,35 @@ public void test_output_for_request() throws Exception { ByteArrayOutputStream byteArrayOutputStream1 = new ByteArrayOutputStream(); ByteArrayOutputStream byteArrayOutputStream2 = new ByteArrayOutputStream(); Outputs.output(request).row().toStream(byteArrayOutputStream0) - .row(1).toStream(byteArrayOutputStream1) - .row().toStream(byteArrayOutputStream2); + .row(1).toStream(byteArrayOutputStream1) + .row().toStream(byteArrayOutputStream2); Assertions.assertThat(byteArrayOutputStream0.toString()).isEqualTo(String.format("[Row at index 0 of 'select * from actor' request]%n" - + "|---------|-----------|-----------|-----------|------------|--------------------------------------|%n" - + "| | | | | | |%n" - + "| PRIMARY | ID | NAME | FIRSTNAME | BIRTH | ACTOR_IMDB |%n" - + "| KEY | (NUMBER) | (TEXT) | (TEXT) | (DATE) | (UUID) |%n" - + "| | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 |%n" - + "|---------|-----------|-----------|-----------|------------|--------------------------------------|%n" - + "| | 1 | Weaver | Sigourney | 1949-10-08 | 30b443ae-c0c9-4790-9bec-ce1380808435 |%n" - + "|---------|-----------|-----------|-----------|------------|--------------------------------------|%n")); + + "|---------|-----------|-----------|-----------|------------|--------------------------------------|%n" + + "| | | | | | |%n" + + "| PRIMARY | ID | NAME | FIRSTNAME | BIRTH | ACTOR_IMDB |%n" + + "| KEY | (NUMBER) | (TEXT) | (TEXT) | (DATE) | (UUID) |%n" + + "| | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 |%n" + + "|---------|-----------|-----------|-----------|------------|--------------------------------------|%n" + + "| | 1 | Weaver | Sigourney | 1949-10-08 | 30b443ae-c0c9-4790-9bec-ce1380808435 |%n" + + "|---------|-----------|-----------|-----------|------------|--------------------------------------|%n")); Assertions.assertThat(byteArrayOutputStream1.toString()).isEqualTo(String.format("[Row at index 1 of 'select * from actor' request]%n" - + "|---------|-----------|-----------|-----------|------------|--------------------------------------|%n" - + "| | | | | | |%n" - + "| PRIMARY | ID | NAME | FIRSTNAME | BIRTH | ACTOR_IMDB |%n" - + "| KEY | (NUMBER) | (TEXT) | (TEXT) | (DATE) | (UUID) |%n" - + "| | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 |%n" - + "|---------|-----------|-----------|-----------|------------|--------------------------------------|%n" - + "| | 2 | Phoenix | Joaquim | 1974-10-28 | 16319617-ae95-4087-9264-d3d21bf611b6 |%n" - + "|---------|-----------|-----------|-----------|------------|--------------------------------------|%n")); + + "|---------|-----------|-----------|-----------|------------|--------------------------------------|%n" + + "| | | | | | |%n" + + "| PRIMARY | ID | NAME | FIRSTNAME | BIRTH | ACTOR_IMDB |%n" + + "| KEY | (NUMBER) | (TEXT) | (TEXT) | (DATE) | (UUID) |%n" + + "| | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 |%n" + + "|---------|-----------|-----------|-----------|------------|--------------------------------------|%n" + + "| | 2 | Phoenix | Joaquim | 1974-10-28 | 16319617-ae95-4087-9264-d3d21bf611b6 |%n" + + "|---------|-----------|-----------|-----------|------------|--------------------------------------|%n")); Assertions.assertThat(byteArrayOutputStream2.toString()).isEqualTo(String.format("[Row at index 2 of 'select * from actor' request]%n" - + "|---------|-----------|-------------|-----------|------------|--------------------------------------|%n" - + "| | | | | | |%n" - + "| PRIMARY | ID | NAME | FIRSTNAME | BIRTH | ACTOR_IMDB |%n" - + "| KEY | (NUMBER) | (TEXT) | (TEXT) | (DATE) | (UUID) |%n" - + "| | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 |%n" - + "|---------|-----------|-------------|-----------|------------|--------------------------------------|%n" - + "| | 3 | Worthington | Sam | 1976-08-02 | d735221b-5de5-4112-aa1e-49090cb75ada |%n" - + "|---------|-----------|-------------|-----------|------------|--------------------------------------|%n")); + + "|---------|-----------|-------------|-----------|------------|--------------------------------------|%n" + + "| | | | | | |%n" + + "| PRIMARY | ID | NAME | FIRSTNAME | BIRTH | ACTOR_IMDB |%n" + + "| KEY | (NUMBER) | (TEXT) | (TEXT) | (DATE) | (UUID) |%n" + + "| | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 |%n" + + "|---------|-----------|-------------|-----------|------------|--------------------------------------|%n" + + "| | 3 | Worthington | Sam | 1976-08-02 | d735221b-5de5-4112-aa1e-49090cb75ada |%n" + + "|---------|-----------|-------------|-----------|------------|--------------------------------------|%n")); } /** @@ -129,27 +129,27 @@ public void test_output_for_change() throws Exception { ByteArrayOutputStream byteArrayOutputStream1 = new ByteArrayOutputStream(); ByteArrayOutputStream byteArrayOutputStream2 = new ByteArrayOutputStream(); output(changes).change().rowAtStartPoint().toStream(byteArrayOutputStream0) - .rowAtEndPoint().toStream(byteArrayOutputStream1) - .changeOfModification().rowAtStartPoint().toStream(byteArrayOutputStream2); + .rowAtEndPoint().toStream(byteArrayOutputStream1) + .changeOfModification().rowAtStartPoint().toStream(byteArrayOutputStream2); Assertions.assertThat(byteArrayOutputStream0.toString()).isEqualTo(String.format("[Row at start point of Change at index 0 (on table : ACTOR and with primary key : [4]) of Changes on tables of 'sa/jdbc:h2:mem:test' source]%n" - + "Row does not exist%n")); + + "Row does not exist%n")); Assertions.assertThat(byteArrayOutputStream1.toString()).isEqualTo(String.format("[Row at end point of Change at index 0 (on table : ACTOR and with primary key : [4]) of Changes on tables of 'sa/jdbc:h2:mem:test' source]%n" - + "|---------|-----------|-----------|-----------|------------|--------------------------------------|%n" - + "| | * | | | | |%n" - + "| PRIMARY | ID | NAME | FIRSTNAME | BIRTH | ACTOR_IMDB |%n" - + "| KEY | (NUMBER) | (TEXT) | (TEXT) | (DATE) | (UUID) |%n" - + "| | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 |%n" - + "|---------|-----------|-----------|-----------|------------|--------------------------------------|%n" - + "| 4 | 4 | Murray | Bill | 1950-09-21 | 30b443ae-c0c9-4790-9bec-ce1380808435 |%n" - + "|---------|-----------|-----------|-----------|------------|--------------------------------------|%n")); + + "|---------|-----------|-----------|-----------|------------|--------------------------------------|%n" + + "| | * | | | | |%n" + + "| PRIMARY | ID | NAME | FIRSTNAME | BIRTH | ACTOR_IMDB |%n" + + "| KEY | (NUMBER) | (TEXT) | (TEXT) | (DATE) | (UUID) |%n" + + "| | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 |%n" + + "|---------|-----------|-----------|-----------|------------|--------------------------------------|%n" + + "| 4 | 4 | Murray | Bill | 1950-09-21 | 30b443ae-c0c9-4790-9bec-ce1380808435 |%n" + + "|---------|-----------|-----------|-----------|------------|--------------------------------------|%n")); Assertions.assertThat(byteArrayOutputStream2.toString()).isEqualTo(String.format("[Row at start point of Change at index 0 (on table : ACTOR and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' source (only modification changes)]%n" - + "|---------|-----------|-----------|-----------|------------|--------------------------------------|%n" - + "| | * | | | | |%n" - + "| PRIMARY | ID | NAME | FIRSTNAME | BIRTH | ACTOR_IMDB |%n" - + "| KEY | (NUMBER) | (TEXT) | (TEXT) | (DATE) | (UUID) |%n" - + "| | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 |%n" - + "|---------|-----------|-----------|-----------|------------|--------------------------------------|%n" - + "| 1 | 1 | Weaver | Sigourney | 1949-10-08 | 30b443ae-c0c9-4790-9bec-ce1380808435 |%n" - + "|---------|-----------|-----------|-----------|------------|--------------------------------------|%n")); + + "|---------|-----------|-----------|-----------|------------|--------------------------------------|%n" + + "| | * | | | | |%n" + + "| PRIMARY | ID | NAME | FIRSTNAME | BIRTH | ACTOR_IMDB |%n" + + "| KEY | (NUMBER) | (TEXT) | (TEXT) | (DATE) | (UUID) |%n" + + "| | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 |%n" + + "|---------|-----------|-----------|-----------|------------|--------------------------------------|%n" + + "| 1 | 1 | Weaver | Sigourney | 1949-10-08 | 30b443ae-c0c9-4790-9bec-ce1380808435 |%n" + + "|---------|-----------|-----------|-----------|------------|--------------------------------------|%n")); } } diff --git a/src/test/java/org/assertj/db/output/OutputterTable_Test.java b/src/test/java/org/assertj/db/output/OutputterTable_Test.java index 44894b64..f0d19022 100644 --- a/src/test/java/org/assertj/db/output/OutputterTable_Test.java +++ b/src/test/java/org/assertj/db/output/OutputterTable_Test.java @@ -8,19 +8,19 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.output; +import static org.assertj.db.output.Outputs.output; + +import java.io.ByteArrayOutputStream; + import org.assertj.core.api.Assertions; import org.assertj.db.common.AbstractTest; import org.assertj.db.type.Table; import org.junit.Test; -import java.io.ByteArrayOutputStream; - -import static org.assertj.db.output.Outputs.output; - /** * Test the output of tables. * @@ -38,16 +38,16 @@ public void test_output() throws Exception { ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); output(table).toStream(byteArrayOutputStream); Assertions.assertThat(byteArrayOutputStream.toString()).isEqualTo(String.format("[ACTOR table]%n" - + "|-----------|---------|-----------|-------------|-----------|------------|--------------------------------------|%n" - + "| | | * | | | | |%n" - + "| | PRIMARY | ID | NAME | FIRSTNAME | BIRTH | ACTOR_IMDB |%n" - + "| | KEY | (NUMBER) | (TEXT) | (TEXT) | (DATE) | (UUID) |%n" - + "| | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 |%n" - + "|-----------|---------|-----------|-------------|-----------|------------|--------------------------------------|%n" - + "| Index : 0 | 1 | 1 | Weaver | Sigourney | 1949-10-08 | 30b443ae-c0c9-4790-9bec-ce1380808435 |%n" - + "| Index : 1 | 2 | 2 | Phoenix | Joaquim | 1974-10-28 | 16319617-ae95-4087-9264-d3d21bf611b6 |%n" - + "| Index : 2 | 3 | 3 | Worthington | Sam | 1976-08-02 | d735221b-5de5-4112-aa1e-49090cb75ada |%n" - + "|-----------|---------|-----------|-------------|-----------|------------|--------------------------------------|%n")); + + "|-----------|---------|-----------|-------------|-----------|------------|--------------------------------------|%n" + + "| | | * | | | | |%n" + + "| | PRIMARY | ID | NAME | FIRSTNAME | BIRTH | ACTOR_IMDB |%n" + + "| | KEY | (NUMBER) | (TEXT) | (TEXT) | (DATE) | (UUID) |%n" + + "| | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 |%n" + + "|-----------|---------|-----------|-------------|-----------|------------|--------------------------------------|%n" + + "| Index : 0 | 1 | 1 | Weaver | Sigourney | 1949-10-08 | 30b443ae-c0c9-4790-9bec-ce1380808435 |%n" + + "| Index : 1 | 2 | 2 | Phoenix | Joaquim | 1974-10-28 | 16319617-ae95-4087-9264-d3d21bf611b6 |%n" + + "| Index : 2 | 3 | 3 | Worthington | Sam | 1976-08-02 | d735221b-5de5-4112-aa1e-49090cb75ada |%n" + + "|-----------|---------|-----------|-------------|-----------|------------|--------------------------------------|%n")); } /** @@ -175,4 +175,4 @@ public void test_navigation() throws Exception { Assertions.assertThat(tableOutputter).isSameAs(tableOutputterFromRow).isSameAs(tableOutputterFromRowValue).isSameAs(tableOutputterFromColumn).isSameAs(tableOutputterFromColumnValue); } -} \ No newline at end of file +} diff --git a/src/test/java/org/assertj/db/output/OutputterToConsole_Test.java b/src/test/java/org/assertj/db/output/OutputterToConsole_Test.java index 306457ff..bc24c259 100644 --- a/src/test/java/org/assertj/db/output/OutputterToConsole_Test.java +++ b/src/test/java/org/assertj/db/output/OutputterToConsole_Test.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.output; @@ -39,11 +39,11 @@ public void test_output_to_console() throws Exception { Outputs.output(table).row().value().toConsole(); System.setOut(System.out); Assertions.assertThat(byteArrayOutputStream0.toString()).isEqualTo(String.format("[Value at index 0 (column name : ID) of Row at index 0 of ACTOR table]%n" - + "|----------|%n" - + "| ID |%n" - + "| (NUMBER) |%n" - + "|----------|%n" - + "| 1 |%n" - + "|----------|%n")); + + "|----------|%n" + + "| ID |%n" + + "| (NUMBER) |%n" + + "|----------|%n" + + "| 1 |%n" + + "|----------|%n")); } -} \ No newline at end of file +} diff --git a/src/test/java/org/assertj/db/output/OutputterToFile_Test.java b/src/test/java/org/assertj/db/output/OutputterToFile_Test.java index 30788d11..0e654a53 100644 --- a/src/test/java/org/assertj/db/output/OutputterToFile_Test.java +++ b/src/test/java/org/assertj/db/output/OutputterToFile_Test.java @@ -8,19 +8,19 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.output; +import java.io.File; +import java.io.FileInputStream; +import java.io.InputStream; + import org.assertj.core.api.Assertions; import org.assertj.db.common.AbstractTest; import org.assertj.db.type.Table; import org.junit.Test; -import java.io.File; -import java.io.FileInputStream; -import java.io.InputStream; - /** * Test the output to File. * @@ -40,13 +40,13 @@ public void test_output_to_file() throws Exception { byte[] bytes = new byte[2048]; int nb = inputStream.read(bytes); Assertions.assertThat(new String(bytes, 0, nb)) - .isEqualTo(String.format("[Value at index 0 (column name : ID) of Row at index 0 of ACTOR table]%n" - + "|----------|%n" - + "| ID |%n" - + "| (NUMBER) |%n" - + "|----------|%n" - + "| 1 |%n" - + "|----------|%n")); + .isEqualTo(String.format("[Value at index 0 (column name : ID) of Row at index 0 of ACTOR table]%n" + + "|----------|%n" + + "| ID |%n" + + "| (NUMBER) |%n" + + "|----------|%n" + + "| 1 |%n" + + "|----------|%n")); } } } diff --git a/src/test/java/org/assertj/db/output/OutputterToStream_Test.java b/src/test/java/org/assertj/db/output/OutputterToStream_Test.java index 70b273dc..705a1dc9 100644 --- a/src/test/java/org/assertj/db/output/OutputterToStream_Test.java +++ b/src/test/java/org/assertj/db/output/OutputterToStream_Test.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.output; @@ -36,11 +36,11 @@ public void test_output_to_stream() throws Exception { ByteArrayOutputStream byteArrayOutputStream0 = new ByteArrayOutputStream(); Outputs.output(table).row().value().toStream(byteArrayOutputStream0); Assertions.assertThat(byteArrayOutputStream0.toString()).isEqualTo(String.format("[Value at index 0 (column name : ID) of Row at index 0 of ACTOR table]%n" - + "|----------|%n" - + "| ID |%n" - + "| (NUMBER) |%n" - + "|----------|%n" - + "| 1 |%n" - + "|----------|%n")); + + "|----------|%n" + + "| ID |%n" + + "| (NUMBER) |%n" + + "|----------|%n" + + "| 1 |%n" + + "|----------|%n")); } } diff --git a/src/test/java/org/assertj/db/output/OutputterValue_Test.java b/src/test/java/org/assertj/db/output/OutputterValue_Test.java index 65d0990b..35e0f7be 100644 --- a/src/test/java/org/assertj/db/output/OutputterValue_Test.java +++ b/src/test/java/org/assertj/db/output/OutputterValue_Test.java @@ -8,10 +8,14 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.output; +import static org.assertj.db.output.Outputs.output; + +import java.io.ByteArrayOutputStream; + import org.assertj.core.api.Assertions; import org.assertj.db.common.AbstractTest; import org.assertj.db.common.NeedReload; @@ -20,10 +24,6 @@ import org.assertj.db.type.Table; import org.junit.Test; -import java.io.ByteArrayOutputStream; - -import static org.assertj.db.output.Outputs.output; - /** * Test the output of values. * @@ -43,37 +43,37 @@ public void test_output_for_row_from_table() throws Exception { ByteArrayOutputStream byteArrayOutputStream2 = new ByteArrayOutputStream(); ByteArrayOutputStream byteArrayOutputStream3 = new ByteArrayOutputStream(); Outputs.output(table).row().value().toStream(byteArrayOutputStream0).returnToRow() - .value(1).toStream(byteArrayOutputStream1) - .value().toStream(byteArrayOutputStream2) - .row(2).value(2).toStream(byteArrayOutputStream3); + .value(1).toStream(byteArrayOutputStream1) + .value().toStream(byteArrayOutputStream2) + .row(2).value(2).toStream(byteArrayOutputStream3); Assertions.assertThat(byteArrayOutputStream0.toString()).isEqualTo(String.format("[Value at index 0 (column name : ID) of Row at index 0 of ACTOR table]%n" - + "|----------|%n" - + "| ID |%n" - + "| (NUMBER) |%n" - + "|----------|%n" - + "| 1 |%n" - + "|----------|%n")); + + "|----------|%n" + + "| ID |%n" + + "| (NUMBER) |%n" + + "|----------|%n" + + "| 1 |%n" + + "|----------|%n")); Assertions.assertThat(byteArrayOutputStream1.toString()).isEqualTo(String.format("[Value at index 1 (column name : NAME) of Row at index 0 of ACTOR table]%n" - + "|--------|%n" - + "| NAME |%n" - + "| (TEXT) |%n" - + "|--------|%n" - + "| Weaver |%n" - + "|--------|%n")); + + "|--------|%n" + + "| NAME |%n" + + "| (TEXT) |%n" + + "|--------|%n" + + "| Weaver |%n" + + "|--------|%n")); Assertions.assertThat(byteArrayOutputStream2.toString()).isEqualTo(String.format("[Value at index 2 (column name : FIRSTNAME) of Row at index 0 of ACTOR table]%n" - + "|-----------|%n" - + "| FIRSTNAME |%n" - + "| (TEXT) |%n" - + "|-----------|%n" - + "| Sigourney |%n" - + "|-----------|%n")); + + "|-----------|%n" + + "| FIRSTNAME |%n" + + "| (TEXT) |%n" + + "|-----------|%n" + + "| Sigourney |%n" + + "|-----------|%n")); Assertions.assertThat(byteArrayOutputStream3.toString()).isEqualTo(String.format("[Value at index 2 (column name : FIRSTNAME) of Row at index 2 of ACTOR table]%n" - + "|-----------|%n" - + "| FIRSTNAME |%n" - + "| (TEXT) |%n" - + "|-----------|%n" - + "| Sam |%n" - + "|-----------|%n")); + + "|-----------|%n" + + "| FIRSTNAME |%n" + + "| (TEXT) |%n" + + "|-----------|%n" + + "| Sam |%n" + + "|-----------|%n")); } /** @@ -88,37 +88,37 @@ public void test_output_for_row_from_request() throws Exception { ByteArrayOutputStream byteArrayOutputStream2 = new ByteArrayOutputStream(); ByteArrayOutputStream byteArrayOutputStream3 = new ByteArrayOutputStream(); Outputs.output(request).row().value().toStream(byteArrayOutputStream0).returnToRow() - .value(1).toStream(byteArrayOutputStream1) - .value().toStream(byteArrayOutputStream2) - .row(2).value(2).toStream(byteArrayOutputStream3); + .value(1).toStream(byteArrayOutputStream1) + .value().toStream(byteArrayOutputStream2) + .row(2).value(2).toStream(byteArrayOutputStream3); Assertions.assertThat(byteArrayOutputStream0.toString()).isEqualTo(String.format("[Value at index 0 (column name : ID) of Row at index 0 of 'select * from actor' request]%n" - + "|----------|%n" - + "| ID |%n" - + "| (NUMBER) |%n" - + "|----------|%n" - + "| 1 |%n" - + "|----------|%n")); + + "|----------|%n" + + "| ID |%n" + + "| (NUMBER) |%n" + + "|----------|%n" + + "| 1 |%n" + + "|----------|%n")); Assertions.assertThat(byteArrayOutputStream1.toString()).isEqualTo(String.format("[Value at index 1 (column name : NAME) of Row at index 0 of 'select * from actor' request]%n" - + "|--------|%n" - + "| NAME |%n" - + "| (TEXT) |%n" - + "|--------|%n" - + "| Weaver |%n" - + "|--------|%n")); + + "|--------|%n" + + "| NAME |%n" + + "| (TEXT) |%n" + + "|--------|%n" + + "| Weaver |%n" + + "|--------|%n")); Assertions.assertThat(byteArrayOutputStream2.toString()).isEqualTo(String.format("[Value at index 2 (column name : FIRSTNAME) of Row at index 0 of 'select * from actor' request]%n" - + "|-----------|%n" - + "| FIRSTNAME |%n" - + "| (TEXT) |%n" - + "|-----------|%n" - + "| Sigourney |%n" - + "|-----------|%n")); + + "|-----------|%n" + + "| FIRSTNAME |%n" + + "| (TEXT) |%n" + + "|-----------|%n" + + "| Sigourney |%n" + + "|-----------|%n")); Assertions.assertThat(byteArrayOutputStream3.toString()).isEqualTo(String.format("[Value at index 2 (column name : FIRSTNAME) of Row at index 2 of 'select * from actor' request]%n" - + "|-----------|%n" - + "| FIRSTNAME |%n" - + "| (TEXT) |%n" - + "|-----------|%n" - + "| Sam |%n" - + "|-----------|%n")); + + "|-----------|%n" + + "| FIRSTNAME |%n" + + "| (TEXT) |%n" + + "|-----------|%n" + + "| Sam |%n" + + "|-----------|%n")); } /** @@ -136,37 +136,37 @@ public void test_output_for_row_from_change() throws Exception { ByteArrayOutputStream byteArrayOutputStream2 = new ByteArrayOutputStream(); ByteArrayOutputStream byteArrayOutputStream3 = new ByteArrayOutputStream(); output(changes).change().rowAtEndPoint().value().toStream(byteArrayOutputStream0) - .changeOfModification().rowAtStartPoint().value().toStream(byteArrayOutputStream1) - .rowAtEndPoint().value().toStream(byteArrayOutputStream2) - .value("firstname").toStream(byteArrayOutputStream3); + .changeOfModification().rowAtStartPoint().value().toStream(byteArrayOutputStream1) + .rowAtEndPoint().value().toStream(byteArrayOutputStream2) + .value("firstname").toStream(byteArrayOutputStream3); Assertions.assertThat(byteArrayOutputStream0.toString()).isEqualTo(String.format("[Value at index 0 (column name : ID) of Row at end point of Change at index 0 (on table : ACTOR and with primary key : [4]) of Changes on tables of 'sa/jdbc:h2:mem:test' source]%n" - + "|----------|%n" - + "| ID |%n" - + "| (NUMBER) |%n" - + "|----------|%n" - + "| 4 |%n" - + "|----------|%n")); + + "|----------|%n" + + "| ID |%n" + + "| (NUMBER) |%n" + + "|----------|%n" + + "| 4 |%n" + + "|----------|%n")); Assertions.assertThat(byteArrayOutputStream1.toString()).isEqualTo(String.format("[Value at index 0 (column name : ID) of Row at start point of Change at index 0 (on table : ACTOR and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' source (only modification changes)]%n" - + "|----------|%n" - + "| ID |%n" - + "| (NUMBER) |%n" - + "|----------|%n" - + "| 1 |%n" - + "|----------|%n")); + + "|----------|%n" + + "| ID |%n" + + "| (NUMBER) |%n" + + "|----------|%n" + + "| 1 |%n" + + "|----------|%n")); Assertions.assertThat(byteArrayOutputStream2.toString()).isEqualTo(String.format("[Value at index 0 (column name : ID) of Row at end point of Change at index 0 (on table : ACTOR and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' source (only modification changes)]%n" - + "|----------|%n" - + "| ID |%n" - + "| (NUMBER) |%n" - + "|----------|%n" - + "| 1 |%n" - + "|----------|%n")); + + "|----------|%n" + + "| ID |%n" + + "| (NUMBER) |%n" + + "|----------|%n" + + "| 1 |%n" + + "|----------|%n")); Assertions.assertThat(byteArrayOutputStream3.toString()).isEqualTo(String.format("[Value at index 2 (column name : FIRSTNAME) of Row at end point of Change at index 0 (on table : ACTOR and with primary key : [1]) of Changes on tables of 'sa/jdbc:h2:mem:test' source (only modification changes)]%n" - + "|-----------------|%n" - + "| FIRSTNAME |%n" - + "| (TEXT) |%n" - + "|-----------------|%n" - + "| Susan Alexandra |%n" - + "|-----------------|%n")); + + "|-----------------|%n" + + "| FIRSTNAME |%n" + + "| (TEXT) |%n" + + "|-----------------|%n" + + "| Susan Alexandra |%n" + + "|-----------------|%n")); } /** @@ -181,37 +181,37 @@ public void test_output_for_column_from_table() throws Exception { ByteArrayOutputStream byteArrayOutputStream2 = new ByteArrayOutputStream(); ByteArrayOutputStream byteArrayOutputStream3 = new ByteArrayOutputStream(); Outputs.output(table).column().value().toStream(byteArrayOutputStream0).returnToColumn() - .value(1).toStream(byteArrayOutputStream1) - .value().toStream(byteArrayOutputStream2) - .column("name").value(2).toStream(byteArrayOutputStream3); + .value(1).toStream(byteArrayOutputStream1) + .value().toStream(byteArrayOutputStream2) + .column("name").value(2).toStream(byteArrayOutputStream3); Assertions.assertThat(byteArrayOutputStream0.toString()).isEqualTo(String.format("[Value at index 0 of Column at index 0 (column name : ID) of ACTOR table]%n" - + "|----------|%n" - + "| ID |%n" - + "| (NUMBER) |%n" - + "|----------|%n" - + "| 1 |%n" - + "|----------|%n")); + + "|----------|%n" + + "| ID |%n" + + "| (NUMBER) |%n" + + "|----------|%n" + + "| 1 |%n" + + "|----------|%n")); Assertions.assertThat(byteArrayOutputStream1.toString()).isEqualTo(String.format("[Value at index 1 of Column at index 0 (column name : ID) of ACTOR table]%n" - + "|----------|%n" - + "| ID |%n" - + "| (NUMBER) |%n" - + "|----------|%n" - + "| 2 |%n" - + "|----------|%n")); + + "|----------|%n" + + "| ID |%n" + + "| (NUMBER) |%n" + + "|----------|%n" + + "| 2 |%n" + + "|----------|%n")); Assertions.assertThat(byteArrayOutputStream2.toString()).isEqualTo(String.format("[Value at index 2 of Column at index 0 (column name : ID) of ACTOR table]%n" - + "|----------|%n" - + "| ID |%n" - + "| (NUMBER) |%n" - + "|----------|%n" - + "| 3 |%n" - + "|----------|%n")); + + "|----------|%n" + + "| ID |%n" + + "| (NUMBER) |%n" + + "|----------|%n" + + "| 3 |%n" + + "|----------|%n")); Assertions.assertThat(byteArrayOutputStream3.toString()).isEqualTo(String.format("[Value at index 2 of Column at index 1 (column name : NAME) of ACTOR table]%n" - + "|-------------|%n" - + "| NAME |%n" - + "| (TEXT) |%n" - + "|-------------|%n" - + "| Worthington |%n" - + "|-------------|%n")); + + "|-------------|%n" + + "| NAME |%n" + + "| (TEXT) |%n" + + "|-------------|%n" + + "| Worthington |%n" + + "|-------------|%n")); } /** @@ -226,38 +226,38 @@ public void test_output_for_column_from_request() throws Exception { ByteArrayOutputStream byteArrayOutputStream2 = new ByteArrayOutputStream(); ByteArrayOutputStream byteArrayOutputStream3 = new ByteArrayOutputStream(); Outputs.output(request).column().value().toStream(byteArrayOutputStream0).returnToColumn() - .value(1).toStream(byteArrayOutputStream1) - .value().toStream(byteArrayOutputStream2) - .column("name").value(2).toStream(byteArrayOutputStream3); + .value(1).toStream(byteArrayOutputStream1) + .value().toStream(byteArrayOutputStream2) + .column("name").value(2).toStream(byteArrayOutputStream3); Assertions.assertThat(byteArrayOutputStream0.toString()).isEqualTo(String.format( - "[Value at index 0 of Column at index 0 (column name : ID) of 'select * from actor' request]%n" - + "|----------|%n" - + "| ID |%n" - + "| (NUMBER) |%n" - + "|----------|%n" - + "| 1 |%n" - + "|----------|%n")); + "[Value at index 0 of Column at index 0 (column name : ID) of 'select * from actor' request]%n" + + "|----------|%n" + + "| ID |%n" + + "| (NUMBER) |%n" + + "|----------|%n" + + "| 1 |%n" + + "|----------|%n")); Assertions.assertThat(byteArrayOutputStream1.toString()).isEqualTo(String.format("[Value at index 1 of Column at index 0 (column name : ID) of 'select * from actor' request]%n" - + "|----------|%n" - + "| ID |%n" - + "| (NUMBER) |%n" - + "|----------|%n" - + "| 2 |%n" - + "|----------|%n")); + + "|----------|%n" + + "| ID |%n" + + "| (NUMBER) |%n" + + "|----------|%n" + + "| 2 |%n" + + "|----------|%n")); Assertions.assertThat(byteArrayOutputStream2.toString()).isEqualTo(String.format("[Value at index 2 of Column at index 0 (column name : ID) of 'select * from actor' request]%n" - + "|----------|%n" - + "| ID |%n" - + "| (NUMBER) |%n" - + "|----------|%n" - + "| 3 |%n" - + "|----------|%n")); + + "|----------|%n" + + "| ID |%n" + + "| (NUMBER) |%n" + + "|----------|%n" + + "| 3 |%n" + + "|----------|%n")); Assertions.assertThat(byteArrayOutputStream3.toString()).isEqualTo(String.format("[Value at index 2 of Column at index 1 (column name : NAME) of 'select * from actor' request]%n" - + "|-------------|%n" - + "| NAME |%n" - + "| (TEXT) |%n" - + "|-------------|%n" - + "| Worthington |%n" - + "|-------------|%n")); + + "|-------------|%n" + + "| NAME |%n" + + "| (TEXT) |%n" + + "|-------------|%n" + + "| Worthington |%n" + + "|-------------|%n")); } /** @@ -274,28 +274,28 @@ public void test_output_for_column_from_change() throws Exception { ByteArrayOutputStream byteArrayOutputStream1 = new ByteArrayOutputStream(); ByteArrayOutputStream byteArrayOutputStream2 = new ByteArrayOutputStream(); output(changes).change().column().valueAtStartPoint().toStream(byteArrayOutputStream0) - .valueAtEndPoint().toStream(byteArrayOutputStream1) - .column().valueAtEndPoint().toStream(byteArrayOutputStream2); + .valueAtEndPoint().toStream(byteArrayOutputStream1) + .column().valueAtEndPoint().toStream(byteArrayOutputStream2); Assertions.assertThat(byteArrayOutputStream0.toString()).isEqualTo(String.format("[Value at start point of Column at index 0 (column name : ID) of Change at index 0 (on table : ACTOR and with primary key : [4]) of Changes on tables of 'sa/jdbc:h2:mem:test' source]%n" - + "|------------------|%n" - + "| ID |%n" - + "| (NOT_IDENTIFIED) |%n" - + "|------------------|%n" - + "| null |%n" - + "|------------------|%n")); + + "|------------------|%n" + + "| ID |%n" + + "| (NOT_IDENTIFIED) |%n" + + "|------------------|%n" + + "| null |%n" + + "|------------------|%n")); Assertions.assertThat(byteArrayOutputStream1.toString()).isEqualTo(String.format("[Value at end point of Column at index 0 (column name : ID) of Change at index 0 (on table : ACTOR and with primary key : [4]) of Changes on tables of 'sa/jdbc:h2:mem:test' source]%n" - + "|----------|%n" - + "| ID |%n" - + "| (NUMBER) |%n" - + "|----------|%n" - + "| 4 |%n" - + "|----------|%n")); + + "|----------|%n" + + "| ID |%n" + + "| (NUMBER) |%n" + + "|----------|%n" + + "| 4 |%n" + + "|----------|%n")); Assertions.assertThat(byteArrayOutputStream2.toString()).isEqualTo(String.format("[Value at end point of Column at index 1 (column name : NAME) of Change at index 0 (on table : ACTOR and with primary key : [4]) of Changes on tables of 'sa/jdbc:h2:mem:test' source]%n" - + "|--------|%n" - + "| NAME |%n" - + "| (TEXT) |%n" - + "|--------|%n" - + "| Murray |%n" - + "|--------|%n")); + + "|--------|%n" + + "| NAME |%n" + + "| (TEXT) |%n" + + "|--------|%n" + + "| Murray |%n" + + "|--------|%n")); } } diff --git a/src/test/java/org/assertj/db/output/impl/HtmlOutput_Test.java b/src/test/java/org/assertj/db/output/impl/HtmlOutput_Test.java index e6a8a67f..d22d9e2c 100644 --- a/src/test/java/org/assertj/db/output/impl/HtmlOutput_Test.java +++ b/src/test/java/org/assertj/db/output/impl/HtmlOutput_Test.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.output.impl; @@ -64,45 +64,45 @@ public void test_table_output() throws Exception { WritableAssertionInfo info = new WritableAssertionInfo(); info.description("description"); Row row1 = getRow(Arrays.asList("column1", "column5"), - Arrays.asList("column1", "column2", "column3", "column4", - "column5", "column6", "column7", "column8", - "column9", "column10"), - Arrays.asList(getValue(null, null), getValue(null, true), getValue(null, new byte[] { 0, 1 }), - getValue(null, Timestamp.valueOf("2007-12-23 09:01:00")), - getValue(null, Date.valueOf("2007-12-23")), getValue(null, 8), - getValue(null, Locale.FRENCH), getValue(null, "test"), - getValue(null, Time.valueOf("09:01:00")), - getValue(null, UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")))); + Arrays.asList("column1", "column2", "column3", "column4", + "column5", "column6", "column7", "column8", + "column9", "column10"), + Arrays.asList(getValue(null, null), getValue(null, true), getValue(null, new byte[]{0, 1}), + getValue(null, Timestamp.valueOf("2007-12-23 09:01:00")), + getValue(null, Date.valueOf("2007-12-23")), getValue(null, 8), + getValue(null, Locale.FRENCH), getValue(null, "test"), + getValue(null, Time.valueOf("09:01:00")), + getValue(null, UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")))); Row row2 = getRow(Arrays.asList("column1", "column5"), - Arrays.asList("column1", "column2", "column3", "column4", - "column5", "column6", "column7", "column8", - "column9", "column10"), - Arrays.asList(getValue(null, null), getValue(null, false), getValue(null, new byte[] { 2, 3 }), - getValue(null, Timestamp.valueOf("2002-07-25 03:30:05")), - getValue(null, Date.valueOf("2002-07-25")), getValue(null, 9), - getValue(null, Locale.ENGLISH), getValue(null, "test2"), - getValue(null, Time.valueOf("03:30:05")), - getValue(null, UUID.fromString("0E2A1269-EFF0-4233-B87B-B53E8B6F164D")))); + Arrays.asList("column1", "column2", "column3", "column4", + "column5", "column6", "column7", "column8", + "column9", "column10"), + Arrays.asList(getValue(null, null), getValue(null, false), getValue(null, new byte[]{2, 3}), + getValue(null, Timestamp.valueOf("2002-07-25 03:30:05")), + getValue(null, Date.valueOf("2002-07-25")), getValue(null, 9), + getValue(null, Locale.ENGLISH), getValue(null, "test2"), + getValue(null, Time.valueOf("03:30:05")), + getValue(null, UUID.fromString("0E2A1269-EFF0-4233-B87B-B53E8B6F164D")))); Row row3 = getRow(Arrays.asList("column1", "column5", "column6"), - Arrays.asList("column1", "column2", "column3", "column4", - "column5", "column6", "column7", "column8", - "column9", "column10"), - Arrays.asList(getValue(null, null), getValue(null, false), getValue(null, new byte[] { 2, 3 }), - getValue(null, Timestamp.valueOf("2002-07-25 03:30:05")), - getValue(null, Date.valueOf("2002-07-25")), getValue(null, 9), - getValue(null, Locale.ENGLISH), getValue(null, "test2"), - getValue(null, Time.valueOf("03:30:05")), - getValue(null, UUID.fromString("0E2A1269-EFF0-4233-B87B-B53E8B6F164D")))); + Arrays.asList("column1", "column2", "column3", "column4", + "column5", "column6", "column7", "column8", + "column9", "column10"), + Arrays.asList(getValue(null, null), getValue(null, false), getValue(null, new byte[]{2, 3}), + getValue(null, Timestamp.valueOf("2002-07-25 03:30:05")), + getValue(null, Date.valueOf("2002-07-25")), getValue(null, 9), + getValue(null, Locale.ENGLISH), getValue(null, "test2"), + getValue(null, Time.valueOf("03:30:05")), + getValue(null, UUID.fromString("0E2A1269-EFF0-4233-B87B-B53E8B6F164D")))); assertThat(HtmlOutput.INSTANCE.getTableOutput(info, - getTable(row1.getColumnsNameList(), row1.getPksNameList(), - Arrays.asList(row1, row2, row3)))) - .isEqualTo(htmlTextFromClassPathOf("test_table_output1.html")); + getTable(row1.getColumnsNameList(), row1.getPksNameList(), + Arrays.asList(row1, row2, row3)))) + .isEqualTo(htmlTextFromClassPathOf("test_table_output1.html")); assertThat(HtmlOutput.INSTANCE.getTableOutput(info, - getTable(row1.getColumnsNameList(), row1.getPksNameList(), - new ArrayList()))) - .isEqualTo(htmlTextFromClassPathOf("test_table_output2.html")); + getTable(row1.getColumnsNameList(), row1.getPksNameList(), + new ArrayList()))) + .isEqualTo(htmlTextFromClassPathOf("test_table_output2.html")); } /** @@ -113,45 +113,45 @@ public void test_request_output() throws Exception { WritableAssertionInfo info = new WritableAssertionInfo(); info.description("description"); Row row1 = getRow(Arrays.asList("column1", "column5"), - Arrays.asList("column1", "column2", "column3", "column4", - "column5", "column6", "column7", "column8", - "column9", "column10"), - Arrays.asList(getValue(null, null), getValue(null, true), getValue(null, new byte[] { 0, 1 }), - getValue(null, Timestamp.valueOf("2007-12-23 09:01:00")), - getValue(null, Date.valueOf("2007-12-23")), getValue(null, 8), - getValue(null, Locale.FRENCH), getValue(null, "test"), - getValue(null, Time.valueOf("09:01:00")), - getValue(null, UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")))); + Arrays.asList("column1", "column2", "column3", "column4", + "column5", "column6", "column7", "column8", + "column9", "column10"), + Arrays.asList(getValue(null, null), getValue(null, true), getValue(null, new byte[]{0, 1}), + getValue(null, Timestamp.valueOf("2007-12-23 09:01:00")), + getValue(null, Date.valueOf("2007-12-23")), getValue(null, 8), + getValue(null, Locale.FRENCH), getValue(null, "test"), + getValue(null, Time.valueOf("09:01:00")), + getValue(null, UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")))); Row row2 = getRow(Arrays.asList("column1", "column5"), - Arrays.asList("column1", "column2", "column3", "column4", - "column5", "column6", "column7", "column8", - "column9", "column10"), - Arrays.asList(getValue(null, null), getValue(null, false), getValue(null, new byte[] { 2, 3 }), - getValue(null, Timestamp.valueOf("2002-07-25 03:30:05")), - getValue(null, Date.valueOf("2002-07-25")), getValue(null, 9), - getValue(null, Locale.ENGLISH), getValue(null, "test2"), - getValue(null, Time.valueOf("03:30:05")), - getValue(null, UUID.fromString("0E2A1269-EFF0-4233-B87B-B53E8B6F164D")))); + Arrays.asList("column1", "column2", "column3", "column4", + "column5", "column6", "column7", "column8", + "column9", "column10"), + Arrays.asList(getValue(null, null), getValue(null, false), getValue(null, new byte[]{2, 3}), + getValue(null, Timestamp.valueOf("2002-07-25 03:30:05")), + getValue(null, Date.valueOf("2002-07-25")), getValue(null, 9), + getValue(null, Locale.ENGLISH), getValue(null, "test2"), + getValue(null, Time.valueOf("03:30:05")), + getValue(null, UUID.fromString("0E2A1269-EFF0-4233-B87B-B53E8B6F164D")))); Row row3 = getRow(Arrays.asList("column1", "column5", "column6"), - Arrays.asList("column1", "column2", "column3", "column4", - "column5", "column6", "column7", "column8", - "column9", "column10"), - Arrays.asList(getValue(null, null), getValue(null, false), getValue(null, new byte[] { 2, 3 }), - getValue(null, Timestamp.valueOf("2002-07-25 03:30:05")), - getValue(null, Date.valueOf("2002-07-25")), getValue(null, 9), - getValue(null, Locale.ENGLISH), getValue(null, "test2"), - getValue(null, Time.valueOf("03:30:05")), - getValue(null, UUID.fromString("0E2A1269-EFF0-4233-B87B-B53E8B6F164D")))); + Arrays.asList("column1", "column2", "column3", "column4", + "column5", "column6", "column7", "column8", + "column9", "column10"), + Arrays.asList(getValue(null, null), getValue(null, false), getValue(null, new byte[]{2, 3}), + getValue(null, Timestamp.valueOf("2002-07-25 03:30:05")), + getValue(null, Date.valueOf("2002-07-25")), getValue(null, 9), + getValue(null, Locale.ENGLISH), getValue(null, "test2"), + getValue(null, Time.valueOf("03:30:05")), + getValue(null, UUID.fromString("0E2A1269-EFF0-4233-B87B-B53E8B6F164D")))); assertThat(HtmlOutput.INSTANCE.getRequestOutput(info, - getRequest(row1.getColumnsNameList(), row1.getPksNameList(), - Arrays.asList(row1, row2, row3)))) - .isEqualTo(htmlTextFromClassPathOf("test_request_output1.html")); + getRequest(row1.getColumnsNameList(), row1.getPksNameList(), + Arrays.asList(row1, row2, row3)))) + .isEqualTo(htmlTextFromClassPathOf("test_request_output1.html")); assertThat(HtmlOutput.INSTANCE.getRequestOutput(info, - getRequest(row1.getColumnsNameList(), row1.getPksNameList(), - new ArrayList()))) - .isEqualTo(htmlTextFromClassPathOf("test_request_output2.html")); + getRequest(row1.getColumnsNameList(), row1.getPksNameList(), + new ArrayList()))) + .isEqualTo(htmlTextFromClassPathOf("test_request_output2.html")); } /** @@ -162,54 +162,54 @@ public void test_changes_output() throws Exception { WritableAssertionInfo info = new WritableAssertionInfo(); info.description("description"); Row row1 = getRow(Arrays.asList("column1", "column5"), - Arrays.asList("column1", "column2", "column3", "column4", - "column5", "column6", "column7", "column8", - "column9", "column10"), - Arrays.asList(getValue(null, null), getValue(null, true), getValue(null, new byte[] { 0, 1 }), - getValue(null, Timestamp.valueOf("2007-12-23 09:01:00")), - getValue(null, Date.valueOf("2007-12-23")), getValue(null, 8), - getValue(null, Locale.FRENCH), getValue(null, "test"), - getValue(null, Time.valueOf("09:01:00")), - getValue(null, UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")))); + Arrays.asList("column1", "column2", "column3", "column4", + "column5", "column6", "column7", "column8", + "column9", "column10"), + Arrays.asList(getValue(null, null), getValue(null, true), getValue(null, new byte[]{0, 1}), + getValue(null, Timestamp.valueOf("2007-12-23 09:01:00")), + getValue(null, Date.valueOf("2007-12-23")), getValue(null, 8), + getValue(null, Locale.FRENCH), getValue(null, "test"), + getValue(null, Time.valueOf("09:01:00")), + getValue(null, UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")))); Row row2 = getRow(Arrays.asList("column1", "column5"), - Arrays.asList("column1", "column2", "column3", "column4", - "column5", "column6", "column7", "column8", - "column9", "column10"), - Arrays.asList(getValue(null, null), getValue(null, false), getValue(null, new byte[] { 2, 3 }), - getValue(null, Timestamp.valueOf("2002-07-25 03:30:05")), - getValue(null, Date.valueOf("2002-07-25")), getValue(null, 9), - getValue(null, Locale.ENGLISH), getValue(null, "test2"), - getValue(null, Time.valueOf("03:30:05")), - getValue(null, UUID.fromString("0E2A1269-EFF0-4233-B87B-B53E8B6F164D")))); + Arrays.asList("column1", "column2", "column3", "column4", + "column5", "column6", "column7", "column8", + "column9", "column10"), + Arrays.asList(getValue(null, null), getValue(null, false), getValue(null, new byte[]{2, 3}), + getValue(null, Timestamp.valueOf("2002-07-25 03:30:05")), + getValue(null, Date.valueOf("2002-07-25")), getValue(null, 9), + getValue(null, Locale.ENGLISH), getValue(null, "test2"), + getValue(null, Time.valueOf("03:30:05")), + getValue(null, UUID.fromString("0E2A1269-EFF0-4233-B87B-B53E8B6F164D")))); Row row3 = getRow(Arrays.asList("column1", "column5", "column6"), - Arrays.asList("column1", "column2", "column3", "column4", - "column5", "column6", "column7", "column8", - "column9", "column10"), - Arrays.asList(getValue(null, null), getValue(null, false), getValue(null, new byte[] { 2, 3 }), - getValue(null, Timestamp.valueOf("2002-07-25 03:30:05")), - getValue(null, Date.valueOf("2002-07-25")), getValue(null, 9), - getValue(null, Locale.ENGLISH), getValue(null, "test2"), - getValue(null, Time.valueOf("03:30:05")), - getValue(null, UUID.fromString("0E2A1269-EFF0-4233-B87B-B53E8B6F164D")))); + Arrays.asList("column1", "column2", "column3", "column4", + "column5", "column6", "column7", "column8", + "column9", "column10"), + Arrays.asList(getValue(null, null), getValue(null, false), getValue(null, new byte[]{2, 3}), + getValue(null, Timestamp.valueOf("2002-07-25 03:30:05")), + getValue(null, Date.valueOf("2002-07-25")), getValue(null, 9), + getValue(null, Locale.ENGLISH), getValue(null, "test2"), + getValue(null, Time.valueOf("03:30:05")), + getValue(null, UUID.fromString("0E2A1269-EFF0-4233-B87B-B53E8B6F164D")))); assertThat(HtmlOutput.INSTANCE.getChangesOutput(info, - getChanges(Arrays.asList(getTableCreationChange("table", row3), - getTableModificationChange("table", row1, - row3), - getTableDeletionChange("table", row1), - getChange(DataType.REQUEST, - "select * from table", - ChangeType.MODIFICATION, row1, - row2), - getChange(DataType.REQUEST, - "select id, name, firstname, birth, actor_imdb from actor", - ChangeType.MODIFICATION, row1, - row2))))) - .isEqualTo(htmlTextFromClassPathOf("test_changes_output1.html")); + getChanges(Arrays.asList(getTableCreationChange("table", row3), + getTableModificationChange("table", row1, + row3), + getTableDeletionChange("table", row1), + getChange(DataType.REQUEST, + "select * from table", + ChangeType.MODIFICATION, row1, + row2), + getChange(DataType.REQUEST, + "select id, name, firstname, birth, actor_imdb from actor", + ChangeType.MODIFICATION, row1, + row2))))) + .isEqualTo(htmlTextFromClassPathOf("test_changes_output1.html")); assertThat(HtmlOutput.INSTANCE.getChangesOutput(info, - getChanges(new ArrayList()))) - .isEqualTo(htmlTextFromClassPathOf("test_changes_output2.html")); + getChanges(new ArrayList()))) + .isEqualTo(htmlTextFromClassPathOf("test_changes_output2.html")); } /** @@ -220,46 +220,46 @@ public void test_change_output() throws Exception { WritableAssertionInfo info = new WritableAssertionInfo(); info.description("description"); Row row1 = getRow(Arrays.asList("column1", "column5"), - Arrays.asList("column1", "column2", "column3", "column4", - "column5", "column6", "column7", "column8", - "column9", "column10"), - Arrays.asList(getValue(null, null), getValue(null, true), getValue(null, new byte[] { 0, 1 }), - getValue(null, Timestamp.valueOf("2007-12-23 09:01:00")), - getValue(null, Date.valueOf("2007-12-23")), getValue(null, 8), - getValue(null, Locale.FRENCH), getValue(null, "test"), - getValue(null, Time.valueOf("09:01:00")), - getValue(null, UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")))); + Arrays.asList("column1", "column2", "column3", "column4", + "column5", "column6", "column7", "column8", + "column9", "column10"), + Arrays.asList(getValue(null, null), getValue(null, true), getValue(null, new byte[]{0, 1}), + getValue(null, Timestamp.valueOf("2007-12-23 09:01:00")), + getValue(null, Date.valueOf("2007-12-23")), getValue(null, 8), + getValue(null, Locale.FRENCH), getValue(null, "test"), + getValue(null, Time.valueOf("09:01:00")), + getValue(null, UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")))); Row row2 = getRow(Arrays.asList("column1", "column5"), - Arrays.asList("column1", "column2", "column3", "column4", - "column5", "column6", "column7", "column8", - "column9", "column10"), - Arrays.asList(getValue(null, null), getValue(null, false), getValue(null, new byte[] { 2, 3 }), - getValue(null, Timestamp.valueOf("2002-07-25 03:30:05")), - getValue(null, Date.valueOf("2002-07-25")), getValue(null, 9), - getValue(null, Locale.ENGLISH), getValue(null, "test2"), - getValue(null, Time.valueOf("03:30:05")), - getValue(null, UUID.fromString("0E2A1269-EFF0-4233-B87B-B53E8B6F164D")))); + Arrays.asList("column1", "column2", "column3", "column4", + "column5", "column6", "column7", "column8", + "column9", "column10"), + Arrays.asList(getValue(null, null), getValue(null, false), getValue(null, new byte[]{2, 3}), + getValue(null, Timestamp.valueOf("2002-07-25 03:30:05")), + getValue(null, Date.valueOf("2002-07-25")), getValue(null, 9), + getValue(null, Locale.ENGLISH), getValue(null, "test2"), + getValue(null, Time.valueOf("03:30:05")), + getValue(null, UUID.fromString("0E2A1269-EFF0-4233-B87B-B53E8B6F164D")))); assertThat(HtmlOutput.INSTANCE.getChangeOutput(info, getTableCreationChange("table", row2))) - .as("output1") - .isEqualTo(htmlTextFromClassPathOf("test_change_output1.html")); + .as("output1") + .isEqualTo(htmlTextFromClassPathOf("test_change_output1.html")); assertThat(HtmlOutput.INSTANCE.getChangeOutput(info, getTableModificationChange("table", row1, row2))) - .as("output2") - .isEqualTo(htmlTextFromClassPathOf("test_change_output2.html")); + .as("output2") + .isEqualTo(htmlTextFromClassPathOf("test_change_output2.html")); assertThat(HtmlOutput.INSTANCE.getChangeOutput(info, getTableDeletionChange("table", row1))) - .as("output3") - .isEqualTo(htmlTextFromClassPathOf("test_change_output3.html")); + .as("output3") + .isEqualTo(htmlTextFromClassPathOf("test_change_output3.html")); assertThat(HtmlOutput.INSTANCE.getChangeOutput(info, - getChange(DataType.REQUEST, "select * from table", - ChangeType.MODIFICATION, row1, row2))) - .as("output4") - .isEqualTo(htmlTextFromClassPathOf("test_change_output4.html")); + getChange(DataType.REQUEST, "select * from table", + ChangeType.MODIFICATION, row1, row2))) + .as("output4") + .isEqualTo(htmlTextFromClassPathOf("test_change_output4.html")); assertThat(HtmlOutput.INSTANCE.getChangeOutput(info, - getChange(DataType.REQUEST, - "select id, name, firstname, birth, actor_imdb from actor", - ChangeType.MODIFICATION, row1, row2))) - .as("output5") - .isEqualTo(htmlTextFromClassPathOf("test_change_output5.html")); + getChange(DataType.REQUEST, + "select id, name, firstname, birth, actor_imdb from actor", + ChangeType.MODIFICATION, row1, row2))) + .as("output5") + .isEqualTo(htmlTextFromClassPathOf("test_change_output5.html")); } /** @@ -270,26 +270,26 @@ public void test_row_output() throws Exception { WritableAssertionInfo info = new WritableAssertionInfo(); info.description("description"); assertThat(HtmlOutput.INSTANCE.getRowOutput(info, getRow(Arrays.asList("column1", "column5"), - Arrays.asList("column1", "column2", "column3", - "column4", "column5", "column6", - "column7", "column8", "column9", - "column10"), - Arrays.asList(getValue(null, null), getValue( - null, true), - getValue(null, new byte[] { 0, 1 }), - getValue(null, Timestamp.valueOf( - "2007-12-23 09:01:00")), - getValue(null, Date.valueOf("2007-12-23")), - getValue(null, 8), - getValue(null, Locale.FRENCH), getValue( - null, "test"), - getValue(null, Time.valueOf("09:01:00")), - getValue(null, UUID.fromString( - "30B443AE-C0C9-4790-9BEC-CE1380808435")))))) - .isEqualTo(htmlTextFromClassPathOf("test_row_output.html")); + Arrays.asList("column1", "column2", "column3", + "column4", "column5", "column6", + "column7", "column8", "column9", + "column10"), + Arrays.asList(getValue(null, null), getValue( + null, true), + getValue(null, new byte[]{0, 1}), + getValue(null, Timestamp.valueOf( + "2007-12-23 09:01:00")), + getValue(null, Date.valueOf("2007-12-23")), + getValue(null, 8), + getValue(null, Locale.FRENCH), getValue( + null, "test"), + getValue(null, Time.valueOf("09:01:00")), + getValue(null, UUID.fromString( + "30B443AE-C0C9-4790-9BEC-CE1380808435")))))) + .isEqualTo(htmlTextFromClassPathOf("test_row_output.html")); assertThat(HtmlOutput.INSTANCE.getRowOutput(info, null)) - .isEqualTo("description" - + "

    description

    Row does not exist"); + .isEqualTo("description" + + "

    description

    Row does not exist"); } /** @@ -300,54 +300,54 @@ public void test_column_output() throws Exception { WritableAssertionInfo info = new WritableAssertionInfo(); info.description("description"); assertThat(HtmlOutput.INSTANCE.getColumnOutput(info, getColumn("column", Arrays.asList(getValue( - null, null), getValue(null, null))))) - .isEqualTo(htmlTextFromClassPathOf("test_column_output1.html")); + null, null), getValue(null, null))))) + .isEqualTo(htmlTextFromClassPathOf("test_column_output1.html")); assertThat(HtmlOutput.INSTANCE.getColumnOutput(info, getColumn("column", Arrays.asList(getValue( - null, true), getValue(null, false))))) - .isEqualTo(htmlTextFromClassPathOf("test_column_output2.html")); + null, true), getValue(null, false))))) + .isEqualTo(htmlTextFromClassPathOf("test_column_output2.html")); assertThat(HtmlOutput.INSTANCE.getColumnOutput(info, - getColumn("column", - Arrays.asList(getValue(null, new byte[] { 0, 1 }), - getValue(null, null))))) - .isEqualTo(htmlTextFromClassPathOf("test_column_output3.html")); + getColumn("column", + Arrays.asList(getValue(null, new byte[]{0, 1}), + getValue(null, null))))) + .isEqualTo(htmlTextFromClassPathOf("test_column_output3.html")); assertThat(HtmlOutput.INSTANCE.getColumnOutput(info, - getColumn("column", Arrays.asList(getValue(null, null), - getValue(null, Timestamp.valueOf( - "2007-12-23 09:01:00")), - getValue(null, Timestamp.valueOf( - "2002-07-25 03:30:05")))))) - .isEqualTo(htmlTextFromClassPathOf("test_column_output4.html")); + getColumn("column", Arrays.asList(getValue(null, null), + getValue(null, Timestamp.valueOf( + "2007-12-23 09:01:00")), + getValue(null, Timestamp.valueOf( + "2002-07-25 03:30:05")))))) + .isEqualTo(htmlTextFromClassPathOf("test_column_output4.html")); assertThat(HtmlOutput.INSTANCE.getColumnOutput(info, - getColumn("column", - Arrays.asList(getValue(null, Date.valueOf("2007-12-23")))))) - .isEqualTo(htmlTextFromClassPathOf("test_column_output5.html")); + getColumn("column", + Arrays.asList(getValue(null, Date.valueOf("2007-12-23")))))) + .isEqualTo(htmlTextFromClassPathOf("test_column_output5.html")); assertThat(HtmlOutput.INSTANCE.getColumnOutput(info, - getColumn("column", Arrays.asList(getValue(null, 8), - getValue(null, 1000000000L))))) - .isEqualTo(htmlTextFromClassPathOf("test_column_output6.html")); + getColumn("column", Arrays.asList(getValue(null, 8), + getValue(null, 1000000000L))))) + .isEqualTo(htmlTextFromClassPathOf("test_column_output6.html")); assertThat(HtmlOutput.INSTANCE.getColumnOutput(info, - getColumn("column", Arrays.asList(getValue(null, Locale.FRENCH), - getValue(null, Locale.ENGLISH))))) - .isEqualTo(htmlTextFromClassPathOf("test_column_output7.html")); + getColumn("column", Arrays.asList(getValue(null, Locale.FRENCH), + getValue(null, Locale.ENGLISH))))) + .isEqualTo(htmlTextFromClassPathOf("test_column_output7.html")); assertThat(HtmlOutput.INSTANCE.getColumnOutput(info, - getColumn("column", Arrays.asList(getValue(null, "test"), - getValue(null, "test2"))))) - .isEqualTo(htmlTextFromClassPathOf("test_column_output8.html")); + getColumn("column", Arrays.asList(getValue(null, "test"), + getValue(null, "test2"))))) + .isEqualTo(htmlTextFromClassPathOf("test_column_output8.html")); assertThat(HtmlOutput.INSTANCE.getColumnOutput(info, - getColumn("column", - Arrays.asList(getValue(null, Time.valueOf("09:01:00")), - getValue(null, Time.valueOf("03:30:05")))))) - .isEqualTo(htmlTextFromClassPathOf("test_column_output9.html")); + getColumn("column", + Arrays.asList(getValue(null, Time.valueOf("09:01:00")), + getValue(null, Time.valueOf("03:30:05")))))) + .isEqualTo(htmlTextFromClassPathOf("test_column_output9.html")); assertThat(HtmlOutput.INSTANCE - .getColumnOutput(info, getColumn("column", - Arrays.asList(getValue(null, UUID.fromString( - "30B443AE-C0C9-4790-9BEC-CE1380808435")), - getValue(null, UUID.fromString( - "0E2A1269-EFF0-4233-B87B-B53E8B6F164D")))))) - .isEqualTo(htmlTextFromClassPathOf("test_column_output10.html")); + .getColumnOutput(info, getColumn("column", + Arrays.asList(getValue(null, UUID.fromString( + "30B443AE-C0C9-4790-9BEC-CE1380808435")), + getValue(null, UUID.fromString( + "0E2A1269-EFF0-4233-B87B-B53E8B6F164D")))))) + .isEqualTo(htmlTextFromClassPathOf("test_column_output10.html")); assertThat(HtmlOutput.INSTANCE - .getColumnOutput(info, getColumn("column", new ArrayList()))) - .isEqualTo(htmlTextFromClassPathOf("test_column_output11.html")); + .getColumnOutput(info, getColumn("column", new ArrayList()))) + .isEqualTo(htmlTextFromClassPathOf("test_column_output11.html")); } /** @@ -359,15 +359,15 @@ public void test_change_column_output() throws Exception { info.description("description"); assertThat(HtmlOutput.INSTANCE.getChangeColumnOutput(info, "column2", getValue(null, true), getValue(null, false))) - .isEqualTo(htmlTextFromClassPathOf("test_change_column_output1.html")); + .isEqualTo(htmlTextFromClassPathOf("test_change_column_output1.html")); assertThat(HtmlOutput.INSTANCE.getChangeColumnOutput(info, "column1", getValue(null, null), - getValue(null, null))) - .isEqualTo(htmlTextFromClassPathOf("test_change_column_output2.html")); + getValue(null, null))) + .isEqualTo(htmlTextFromClassPathOf("test_change_column_output2.html")); assertThat(HtmlOutput.INSTANCE.getChangeColumnOutput(info, "column", getValue(null, UUID.fromString( - "30B443AE-C0C9-4790-9BEC-CE1380808435")), - getValue(null, UUID.fromString( - "0E2A1269-EFF0-4233-B87B-B53E8B6F164D")))) - .isEqualTo(htmlTextFromClassPathOf("test_change_column_output3.html")); + "30B443AE-C0C9-4790-9BEC-CE1380808435")), + getValue(null, UUID.fromString( + "0E2A1269-EFF0-4233-B87B-B53E8B6F164D")))) + .isEqualTo(htmlTextFromClassPathOf("test_change_column_output3.html")); } /** @@ -378,25 +378,25 @@ public void test_value_output() throws Exception { WritableAssertionInfo info = new WritableAssertionInfo(); info.description("description"); assertThat(HtmlOutput.INSTANCE.getValueOutput(info, getValue("column", null))) - .isEqualTo(htmlTextFromClassPathOf("test_value_output1.html")); + .isEqualTo(htmlTextFromClassPathOf("test_value_output1.html")); assertThat(HtmlOutput.INSTANCE.getValueOutput(info, getValue("column", true))) - .isEqualTo(htmlTextFromClassPathOf("test_value_output2.html")); - assertThat(HtmlOutput.INSTANCE.getValueOutput(info, getValue("column", new byte[] { 0, 1 }))) - .isEqualTo(htmlTextFromClassPathOf("test_value_output3.html")); + .isEqualTo(htmlTextFromClassPathOf("test_value_output2.html")); + assertThat(HtmlOutput.INSTANCE.getValueOutput(info, getValue("column", new byte[]{0, 1}))) + .isEqualTo(htmlTextFromClassPathOf("test_value_output3.html")); assertThat(HtmlOutput.INSTANCE.getValueOutput(info, getValue("column", Timestamp.valueOf("2007-12-23 09:01:00")))) - .isEqualTo(htmlTextFromClassPathOf("test_value_output4.html")); + .isEqualTo(htmlTextFromClassPathOf("test_value_output4.html")); assertThat(HtmlOutput.INSTANCE.getValueOutput(info, getValue("column", Date.valueOf("2007-12-23")))) - .isEqualTo(htmlTextFromClassPathOf("test_value_output5.html")); + .isEqualTo(htmlTextFromClassPathOf("test_value_output5.html")); assertThat(HtmlOutput.INSTANCE.getValueOutput(info, getValue("column", 8))) - .isEqualTo(htmlTextFromClassPathOf("test_value_output6.html")); + .isEqualTo(htmlTextFromClassPathOf("test_value_output6.html")); assertThat(HtmlOutput.INSTANCE.getValueOutput(info, getValue("column", Locale.FRENCH))) - .isEqualTo(htmlTextFromClassPathOf("test_value_output7.html")); + .isEqualTo(htmlTextFromClassPathOf("test_value_output7.html")); assertThat(HtmlOutput.INSTANCE.getValueOutput(info, getValue("column", "test"))) - .isEqualTo(htmlTextFromClassPathOf("test_value_output8.html")); + .isEqualTo(htmlTextFromClassPathOf("test_value_output8.html")); assertThat(HtmlOutput.INSTANCE.getValueOutput(info, getValue("column", Time.valueOf("09:01:00")))) - .isEqualTo(htmlTextFromClassPathOf("test_value_output9.html")); + .isEqualTo(htmlTextFromClassPathOf("test_value_output9.html")); assertThat(HtmlOutput.INSTANCE.getValueOutput(info, getValue("column", UUID.fromString( - "30B443AE-C0C9-4790-9BEC-CE1380808435")))) - .isEqualTo(htmlTextFromClassPathOf("test_value_output10.html")); + "30B443AE-C0C9-4790-9BEC-CE1380808435")))) + .isEqualTo(htmlTextFromClassPathOf("test_value_output10.html")); } } diff --git a/src/test/java/org/assertj/db/output/impl/HtmlOutput_ValueOf_Test.java b/src/test/java/org/assertj/db/output/impl/HtmlOutput_ValueOf_Test.java index ca2d520f..392934b5 100644 --- a/src/test/java/org/assertj/db/output/impl/HtmlOutput_ValueOf_Test.java +++ b/src/test/java/org/assertj/db/output/impl/HtmlOutput_ValueOf_Test.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.output.impl; @@ -18,9 +18,8 @@ /** * Test on the type got from {@code valueOf} method from {@code HtmlOutput} enum. - * + * * @author Régis Pouiller - * */ public class HtmlOutput_ValueOf_Test { diff --git a/src/test/java/org/assertj/db/output/impl/OutputType_ValueOf_Test.java b/src/test/java/org/assertj/db/output/impl/OutputType_ValueOf_Test.java index 81e0bfd8..37476d35 100644 --- a/src/test/java/org/assertj/db/output/impl/OutputType_ValueOf_Test.java +++ b/src/test/java/org/assertj/db/output/impl/OutputType_ValueOf_Test.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.output.impl; @@ -20,7 +20,6 @@ * Test on the type got from {@code valueOf} method from {@code RepresentationType} enum. * * @author Régis Pouiller - * */ public class OutputType_ValueOf_Test { diff --git a/src/test/java/org/assertj/db/output/impl/PlainOutput_Test.java b/src/test/java/org/assertj/db/output/impl/PlainOutput_Test.java index 079c44c1..c66aecbe 100644 --- a/src/test/java/org/assertj/db/output/impl/PlainOutput_Test.java +++ b/src/test/java/org/assertj/db/output/impl/PlainOutput_Test.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.output.impl; @@ -46,63 +46,63 @@ public void test_table_output() throws Exception { WritableAssertionInfo info = new WritableAssertionInfo(); info.description("description"); Row row1 = getRow(Arrays.asList("column1", "column5"), - Arrays.asList("column1", "column2", "column3", "column4", - "column5", "column6", "column7", "column8", - "column9", "column10"), - Arrays.asList(getValue(null, null), getValue(null, true), getValue(null, new byte[] { 0, 1 }), - getValue(null, Timestamp.valueOf("2007-12-23 09:01:00")), - getValue(null, Date.valueOf("2007-12-23")), getValue(null, 8), - getValue(null, Locale.FRENCH), getValue(null, "test"), - getValue(null, Time.valueOf("09:01:00")), - getValue(null, UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")))); + Arrays.asList("column1", "column2", "column3", "column4", + "column5", "column6", "column7", "column8", + "column9", "column10"), + Arrays.asList(getValue(null, null), getValue(null, true), getValue(null, new byte[]{0, 1}), + getValue(null, Timestamp.valueOf("2007-12-23 09:01:00")), + getValue(null, Date.valueOf("2007-12-23")), getValue(null, 8), + getValue(null, Locale.FRENCH), getValue(null, "test"), + getValue(null, Time.valueOf("09:01:00")), + getValue(null, UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")))); Row row2 = getRow(Arrays.asList("column1", "column5"), - Arrays.asList("column1", "column2", "column3", "column4", - "column5", "column6", "column7", "column8", - "column9", "column10"), - Arrays.asList(getValue(null, null), getValue(null, false), getValue(null, new byte[] { 2, 3 }), - getValue(null, Timestamp.valueOf("2002-07-25 03:30:05")), - getValue(null, Date.valueOf("2002-07-25")), getValue(null, 9), - getValue(null, Locale.ENGLISH), getValue(null, "test2"), - getValue(null, Time.valueOf("03:30:05")), - getValue(null, UUID.fromString("0E2A1269-EFF0-4233-B87B-B53E8B6F164D")))); + Arrays.asList("column1", "column2", "column3", "column4", + "column5", "column6", "column7", "column8", + "column9", "column10"), + Arrays.asList(getValue(null, null), getValue(null, false), getValue(null, new byte[]{2, 3}), + getValue(null, Timestamp.valueOf("2002-07-25 03:30:05")), + getValue(null, Date.valueOf("2002-07-25")), getValue(null, 9), + getValue(null, Locale.ENGLISH), getValue(null, "test2"), + getValue(null, Time.valueOf("03:30:05")), + getValue(null, UUID.fromString("0E2A1269-EFF0-4233-B87B-B53E8B6F164D")))); Row row3 = getRow(Arrays.asList("column1", "column5", "column6"), - Arrays.asList("column1", "column2", "column3", "column4", - "column5", "column6", "column7", "column8", - "column9", "column10"), - Arrays.asList(getValue(null, null), getValue(null, false), getValue(null, new byte[] { 2, 3 }), - getValue(null, Timestamp.valueOf("2002-07-25 03:30:05")), - getValue(null, Date.valueOf("2002-07-25")), getValue(null, 9), - getValue(null, Locale.ENGLISH), getValue(null, "test2"), - getValue(null, Time.valueOf("03:30:05")), - getValue(null, UUID.fromString("0E2A1269-EFF0-4233-B87B-B53E8B6F164D")))); + Arrays.asList("column1", "column2", "column3", "column4", + "column5", "column6", "column7", "column8", + "column9", "column10"), + Arrays.asList(getValue(null, null), getValue(null, false), getValue(null, new byte[]{2, 3}), + getValue(null, Timestamp.valueOf("2002-07-25 03:30:05")), + getValue(null, Date.valueOf("2002-07-25")), getValue(null, 9), + getValue(null, Locale.ENGLISH), getValue(null, "test2"), + getValue(null, Time.valueOf("03:30:05")), + getValue(null, UUID.fromString("0E2A1269-EFF0-4233-B87B-B53E8B6F164D")))); assertThat(PlainOutput.INSTANCE.getTableOutput(info, - getTable(row1.getColumnsNameList(), row1.getPksNameList(), - Arrays.asList(row1, row2, row3)))) - .isEqualTo(String.format( - "[description]%n" - + "|-----------|---------------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n" - + "| | | * | | | | * | | | | | |%n" - + "| | PRIMARY | column1 | column2 | column3 | column4 | column5 | column6 | column7 | column8 | column9 | column10 |%n" - + "| | KEY | (NOT_IDENTIFIED) | (BOOLEAN) | (BYTES) | (DATE_TIME) | (DATE) | (NUMBER) | (NOT_IDENTIFIED : class java.util.Locale) | (TEXT) | (TIME) | (UUID) |%n" - + "| | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 |%n" - + "|-----------|---------------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n" - + "| Index : 0 | null, 2007-12-23 | null | true | ... | 2007-12-23T09:01:00.000000000 | 2007-12-23 | 8 | fr | test | 09:01:00.000000000 | 30b443ae-c0c9-4790-9bec-ce1380808435 |%n" - + "| Index : 1 | null, 2002-07-25 | null | false | ... | 2002-07-25T03:30:05.000000000 | 2002-07-25 | 9 | en | test2 | 03:30:05.000000000 | 0e2a1269-eff0-4233-b87b-b53e8b6f164d |%n" - + "| Index : 2 | null, 2002-07-25, 9 | null | false | ... | 2002-07-25T03:30:05.000000000 | 2002-07-25 | 9 | en | test2 | 03:30:05.000000000 | 0e2a1269-eff0-4233-b87b-b53e8b6f164d |%n" - + "|-----------|---------------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n")); + getTable(row1.getColumnsNameList(), row1.getPksNameList(), + Arrays.asList(row1, row2, row3)))) + .isEqualTo(String.format( + "[description]%n" + + "|-----------|---------------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n" + + "| | | * | | | | * | | | | | |%n" + + "| | PRIMARY | column1 | column2 | column3 | column4 | column5 | column6 | column7 | column8 | column9 | column10 |%n" + + "| | KEY | (NOT_IDENTIFIED) | (BOOLEAN) | (BYTES) | (DATE_TIME) | (DATE) | (NUMBER) | (NOT_IDENTIFIED : class java.util.Locale) | (TEXT) | (TIME) | (UUID) |%n" + + "| | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 |%n" + + "|-----------|---------------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n" + + "| Index : 0 | null, 2007-12-23 | null | true | ... | 2007-12-23T09:01:00.000000000 | 2007-12-23 | 8 | fr | test | 09:01:00.000000000 | 30b443ae-c0c9-4790-9bec-ce1380808435 |%n" + + "| Index : 1 | null, 2002-07-25 | null | false | ... | 2002-07-25T03:30:05.000000000 | 2002-07-25 | 9 | en | test2 | 03:30:05.000000000 | 0e2a1269-eff0-4233-b87b-b53e8b6f164d |%n" + + "| Index : 2 | null, 2002-07-25, 9 | null | false | ... | 2002-07-25T03:30:05.000000000 | 2002-07-25 | 9 | en | test2 | 03:30:05.000000000 | 0e2a1269-eff0-4233-b87b-b53e8b6f164d |%n" + + "|-----------|---------------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n")); assertThat(PlainOutput.INSTANCE.getTableOutput(info, - getTable(row1.getColumnsNameList(), row1.getPksNameList(), - new ArrayList()))) - .isEqualTo(String.format("[description]%n" - + "|------------|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|%n" - + "| | | * | | | | * | | | | | |%n" - + "| | PRIMARY | column1 | column2 | column3 | column4 | column5 | column6 | column7 | column8 | column9 | column10 |%n" - + "| | KEY | | | | | | | | | | |%n" - + "| | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 |%n" - + "|------------|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|%n" - + "|------------|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|%n")); + getTable(row1.getColumnsNameList(), row1.getPksNameList(), + new ArrayList()))) + .isEqualTo(String.format("[description]%n" + + "|------------|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|%n" + + "| | | * | | | | * | | | | | |%n" + + "| | PRIMARY | column1 | column2 | column3 | column4 | column5 | column6 | column7 | column8 | column9 | column10 |%n" + + "| | KEY | | | | | | | | | | |%n" + + "| | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 |%n" + + "|------------|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|%n" + + "|------------|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|%n")); } /** @@ -113,63 +113,63 @@ public void test_request_output() throws Exception { WritableAssertionInfo info = new WritableAssertionInfo(); info.description("description"); Row row1 = getRow(Arrays.asList("column1", "column5"), - Arrays.asList("column1", "column2", "column3", "column4", - "column5", "column6", "column7", "column8", - "column9", "column10"), - Arrays.asList(getValue(null, null), getValue(null, true), getValue(null, new byte[] { 0, 1 }), - getValue(null, Timestamp.valueOf("2007-12-23 09:01:00")), - getValue(null, Date.valueOf("2007-12-23")), getValue(null, 8), - getValue(null, Locale.FRENCH), getValue(null, "test"), - getValue(null, Time.valueOf("09:01:00")), - getValue(null, UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")))); + Arrays.asList("column1", "column2", "column3", "column4", + "column5", "column6", "column7", "column8", + "column9", "column10"), + Arrays.asList(getValue(null, null), getValue(null, true), getValue(null, new byte[]{0, 1}), + getValue(null, Timestamp.valueOf("2007-12-23 09:01:00")), + getValue(null, Date.valueOf("2007-12-23")), getValue(null, 8), + getValue(null, Locale.FRENCH), getValue(null, "test"), + getValue(null, Time.valueOf("09:01:00")), + getValue(null, UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")))); Row row2 = getRow(Arrays.asList("column1", "column5"), - Arrays.asList("column1", "column2", "column3", "column4", - "column5", "column6", "column7", "column8", - "column9", "column10"), - Arrays.asList(getValue(null, null), getValue(null, false), getValue(null, new byte[] { 2, 3 }), - getValue(null, Timestamp.valueOf("2002-07-25 03:30:05")), - getValue(null, Date.valueOf("2002-07-25")), getValue(null, 9), - getValue(null, Locale.ENGLISH), getValue(null, "test2"), - getValue(null, Time.valueOf("03:30:05")), - getValue(null, UUID.fromString("0E2A1269-EFF0-4233-B87B-B53E8B6F164D")))); + Arrays.asList("column1", "column2", "column3", "column4", + "column5", "column6", "column7", "column8", + "column9", "column10"), + Arrays.asList(getValue(null, null), getValue(null, false), getValue(null, new byte[]{2, 3}), + getValue(null, Timestamp.valueOf("2002-07-25 03:30:05")), + getValue(null, Date.valueOf("2002-07-25")), getValue(null, 9), + getValue(null, Locale.ENGLISH), getValue(null, "test2"), + getValue(null, Time.valueOf("03:30:05")), + getValue(null, UUID.fromString("0E2A1269-EFF0-4233-B87B-B53E8B6F164D")))); Row row3 = getRow(Arrays.asList("column1", "column5", "column6"), - Arrays.asList("column1", "column2", "column3", "column4", - "column5", "column6", "column7", "column8", - "column9", "column10"), - Arrays.asList(getValue(null, null), getValue(null, false), getValue(null, new byte[] { 2, 3 }), - getValue(null, Timestamp.valueOf("2002-07-25 03:30:05")), - getValue(null, Date.valueOf("2002-07-25")), getValue(null, 9), - getValue(null, Locale.ENGLISH), getValue(null, "test2"), - getValue(null, Time.valueOf("03:30:05")), - getValue(null, UUID.fromString("0E2A1269-EFF0-4233-B87B-B53E8B6F164D")))); + Arrays.asList("column1", "column2", "column3", "column4", + "column5", "column6", "column7", "column8", + "column9", "column10"), + Arrays.asList(getValue(null, null), getValue(null, false), getValue(null, new byte[]{2, 3}), + getValue(null, Timestamp.valueOf("2002-07-25 03:30:05")), + getValue(null, Date.valueOf("2002-07-25")), getValue(null, 9), + getValue(null, Locale.ENGLISH), getValue(null, "test2"), + getValue(null, Time.valueOf("03:30:05")), + getValue(null, UUID.fromString("0E2A1269-EFF0-4233-B87B-B53E8B6F164D")))); assertThat(PlainOutput.INSTANCE.getRequestOutput(info, - getRequest(row1.getColumnsNameList(), row1.getPksNameList(), - Arrays.asList(row1, row2, row3)))) - .isEqualTo(String.format( - "[description]%n" - + "|-----------|---------------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n" - + "| | | * | | | | * | | | | | |%n" - + "| | PRIMARY | column1 | column2 | column3 | column4 | column5 | column6 | column7 | column8 | column9 | column10 |%n" - + "| | KEY | (NOT_IDENTIFIED) | (BOOLEAN) | (BYTES) | (DATE_TIME) | (DATE) | (NUMBER) | (NOT_IDENTIFIED : class java.util.Locale) | (TEXT) | (TIME) | (UUID) |%n" - + "| | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 |%n" - + "|-----------|---------------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n" - + "| Index : 0 | null, 2007-12-23 | null | true | ... | 2007-12-23T09:01:00.000000000 | 2007-12-23 | 8 | fr | test | 09:01:00.000000000 | 30b443ae-c0c9-4790-9bec-ce1380808435 |%n" - + "| Index : 1 | null, 2002-07-25 | null | false | ... | 2002-07-25T03:30:05.000000000 | 2002-07-25 | 9 | en | test2 | 03:30:05.000000000 | 0e2a1269-eff0-4233-b87b-b53e8b6f164d |%n" - + "| Index : 2 | null, 2002-07-25, 9 | null | false | ... | 2002-07-25T03:30:05.000000000 | 2002-07-25 | 9 | en | test2 | 03:30:05.000000000 | 0e2a1269-eff0-4233-b87b-b53e8b6f164d |%n" - + "|-----------|---------------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n")); + getRequest(row1.getColumnsNameList(), row1.getPksNameList(), + Arrays.asList(row1, row2, row3)))) + .isEqualTo(String.format( + "[description]%n" + + "|-----------|---------------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n" + + "| | | * | | | | * | | | | | |%n" + + "| | PRIMARY | column1 | column2 | column3 | column4 | column5 | column6 | column7 | column8 | column9 | column10 |%n" + + "| | KEY | (NOT_IDENTIFIED) | (BOOLEAN) | (BYTES) | (DATE_TIME) | (DATE) | (NUMBER) | (NOT_IDENTIFIED : class java.util.Locale) | (TEXT) | (TIME) | (UUID) |%n" + + "| | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 |%n" + + "|-----------|---------------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n" + + "| Index : 0 | null, 2007-12-23 | null | true | ... | 2007-12-23T09:01:00.000000000 | 2007-12-23 | 8 | fr | test | 09:01:00.000000000 | 30b443ae-c0c9-4790-9bec-ce1380808435 |%n" + + "| Index : 1 | null, 2002-07-25 | null | false | ... | 2002-07-25T03:30:05.000000000 | 2002-07-25 | 9 | en | test2 | 03:30:05.000000000 | 0e2a1269-eff0-4233-b87b-b53e8b6f164d |%n" + + "| Index : 2 | null, 2002-07-25, 9 | null | false | ... | 2002-07-25T03:30:05.000000000 | 2002-07-25 | 9 | en | test2 | 03:30:05.000000000 | 0e2a1269-eff0-4233-b87b-b53e8b6f164d |%n" + + "|-----------|---------------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n")); assertThat(PlainOutput.INSTANCE.getRequestOutput(info, - getRequest(row1.getColumnsNameList(), row1.getPksNameList(), - new ArrayList()))) - .isEqualTo(String.format("[description]%n" - + "|------------|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|%n" - + "| | | * | | | | * | | | | | |%n" - + "| | PRIMARY | column1 | column2 | column3 | column4 | column5 | column6 | column7 | column8 | column9 | column10 |%n" - + "| | KEY | | | | | | | | | | |%n" - + "| | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 |%n" - + "|------------|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|%n" - + "|------------|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|%n")); + getRequest(row1.getColumnsNameList(), row1.getPksNameList(), + new ArrayList()))) + .isEqualTo(String.format("[description]%n" + + "|------------|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|%n" + + "| | | * | | | | * | | | | | |%n" + + "| | PRIMARY | column1 | column2 | column3 | column4 | column5 | column6 | column7 | column8 | column9 | column10 |%n" + + "| | KEY | | | | | | | | | | |%n" + + "| | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 |%n" + + "|------------|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|%n" + + "|------------|---------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|%n")); } /** @@ -180,105 +180,105 @@ public void test_changes_output() throws Exception { WritableAssertionInfo info = new WritableAssertionInfo(); info.description("description"); Row row1 = getRow(Arrays.asList("column1", "column5"), - Arrays.asList("column1", "column2", "column3", "column4", - "column5", "column6", "column7", "column8", - "column9", "column10"), - Arrays.asList(getValue(null, null), getValue(null, true), getValue(null, new byte[] { 0, 1 }), - getValue(null, Timestamp.valueOf("2007-12-23 09:01:00")), - getValue(null, Date.valueOf("2007-12-23")), getValue(null, 8), - getValue(null, Locale.FRENCH), getValue(null, "test"), - getValue(null, Time.valueOf("09:01:00")), - getValue(null, UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")))); + Arrays.asList("column1", "column2", "column3", "column4", + "column5", "column6", "column7", "column8", + "column9", "column10"), + Arrays.asList(getValue(null, null), getValue(null, true), getValue(null, new byte[]{0, 1}), + getValue(null, Timestamp.valueOf("2007-12-23 09:01:00")), + getValue(null, Date.valueOf("2007-12-23")), getValue(null, 8), + getValue(null, Locale.FRENCH), getValue(null, "test"), + getValue(null, Time.valueOf("09:01:00")), + getValue(null, UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")))); Row row2 = getRow(Arrays.asList("column1", "column5"), - Arrays.asList("column1", "column2", "column3", "column4", - "column5", "column6", "column7", "column8", - "column9", "column10"), - Arrays.asList(getValue(null, null), getValue(null, false), getValue(null, new byte[] { 2, 3 }), - getValue(null, Timestamp.valueOf("2002-07-25 03:30:05")), - getValue(null, Date.valueOf("2002-07-25")), getValue(null, 9), - getValue(null, Locale.ENGLISH), getValue(null, "test2"), - getValue(null, Time.valueOf("03:30:05")), - getValue(null, UUID.fromString("0E2A1269-EFF0-4233-B87B-B53E8B6F164D")))); + Arrays.asList("column1", "column2", "column3", "column4", + "column5", "column6", "column7", "column8", + "column9", "column10"), + Arrays.asList(getValue(null, null), getValue(null, false), getValue(null, new byte[]{2, 3}), + getValue(null, Timestamp.valueOf("2002-07-25 03:30:05")), + getValue(null, Date.valueOf("2002-07-25")), getValue(null, 9), + getValue(null, Locale.ENGLISH), getValue(null, "test2"), + getValue(null, Time.valueOf("03:30:05")), + getValue(null, UUID.fromString("0E2A1269-EFF0-4233-B87B-B53E8B6F164D")))); Row row3 = getRow(Arrays.asList("column1", "column5", "column6"), - Arrays.asList("column1", "column2", "column3", "column4", - "column5", "column6", "column7", "column8", - "column9", "column10"), - Arrays.asList(getValue(null, null), getValue(null, false), getValue(null, new byte[] { 2, 3 }), - getValue(null, Timestamp.valueOf("2002-07-25 03:30:05")), - getValue(null, Date.valueOf("2002-07-25")), getValue(null, 9), - getValue(null, Locale.ENGLISH), getValue(null, "test2"), - getValue(null, Time.valueOf("03:30:05")), - getValue(null, UUID.fromString("0E2A1269-EFF0-4233-B87B-B53E8B6F164D")))); + Arrays.asList("column1", "column2", "column3", "column4", + "column5", "column6", "column7", "column8", + "column9", "column10"), + Arrays.asList(getValue(null, null), getValue(null, false), getValue(null, new byte[]{2, 3}), + getValue(null, Timestamp.valueOf("2002-07-25 03:30:05")), + getValue(null, Date.valueOf("2002-07-25")), getValue(null, 9), + getValue(null, Locale.ENGLISH), getValue(null, "test2"), + getValue(null, Time.valueOf("03:30:05")), + getValue(null, UUID.fromString("0E2A1269-EFF0-4233-B87B-B53E8B6F164D")))); assertThat(PlainOutput.INSTANCE.getChangesOutput(info, - getChanges(Arrays.asList(getTableCreationChange("table", row3), - getTableModificationChange("table", row1, - row3), - getTableDeletionChange("table", row1), - getChange(DataType.REQUEST, - "select * from table", - ChangeType.MODIFICATION, row1, - row2), - getChange(DataType.REQUEST, - "select id, name, firstname, birth, actor_imdb from actor", - ChangeType.MODIFICATION, row1, - row2))))) - .isEqualTo(String.format( - "[description]%n" - + "|-----------|--------------|-----------------------------------|---------------------|----------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n" - + "| | | | | | * | | | | * | * | | | | |%n" - + "| | TYPE | TABLE | PRIMARY | | column1 | column2 | column3 | column4 | column5 | column6 | column7 | column8 | column9 | column10 |%n" - + "| | | | KEY | | (NOT_IDENTIFIED) | (BOOLEAN) | (BYTES) | (DATE_TIME) | (DATE) | (NUMBER) | (NOT_IDENTIFIED : class java.util.Locale) | (TEXT) | (TIME) | (UUID) |%n" - + "| | | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 |%n" - + "|-----------|--------------|-----------------------------------|---------------------|----------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n" - + "| | | | | At start point | | | | | | | | | | |%n" - + "| Index : 0 | CREATION | table | null, 2002-07-25, 9 |----------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n" - + "| | | | | At end point | null | false | ... | 2002-07-25T03:30:05.000000000 | 2002-07-25 | 9 | en | test2 | 03:30:05.000000000 | 0e2a1269-eff0-4233-b87b-b53e8b6f164d |%n" - + "|-----------|--------------|-----------------------------------|---------------------|----------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n" - + "|-----------|--------------|-----------------------------------|---------------------|----------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n" - + "| | | | | | * | | | | * | | | | | |%n" - + "| | TYPE | REQUEST | PRIMARY | | column1 | column2 | column3 | column4 | column5 | column6 | column7 | column8 | column9 | column10 |%n" - + "| | | | KEY | | (NOT_IDENTIFIED) | (BOOLEAN) | (BYTES) | (DATE_TIME) | (DATE) | (NUMBER) | (NOT_IDENTIFIED : class java.util.Locale) | (TEXT) | (TIME) | (UUID) |%n" - + "| | | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 |%n" - + "|-----------|--------------|-----------------------------------|---------------------|----------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n" - + "| | | | | At start point | null | true | ... | 2007-12-23T09:01:00.000000000 | 2007-12-23 | 8 | fr | test | 09:01:00.000000000 | 30b443ae-c0c9-4790-9bec-ce1380808435 |%n" - + "| Index : 1 | MODIFICATION | select * from table | null, 2007-12-23 |----------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n" - + "| | | | | At end point | null | false | ... | 2002-07-25T03:30:05.000000000 | 2002-07-25 | 9 | en | test2 | 03:30:05.000000000 | 0e2a1269-eff0-4233-b87b-b53e8b6f164d |%n" - + "|-----------|--------------|-----------------------------------|---------------------|----------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n" - + "|-----------|--------------|-----------------------------------|---------------------|----------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n" - + "| | | | | | * | | | | * | | | | | |%n" - + "| | TYPE | REQUEST | PRIMARY | | column1 | column2 | column3 | column4 | column5 | column6 | column7 | column8 | column9 | column10 |%n" - + "| | | | KEY | | (NOT_IDENTIFIED) | (BOOLEAN) | (BYTES) | (DATE_TIME) | (DATE) | (NUMBER) | (NOT_IDENTIFIED : class java.util.Locale) | (TEXT) | (TIME) | (UUID) |%n" - + "| | | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 |%n" - + "|-----------|--------------|-----------------------------------|---------------------|----------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n" - + "| | | | | At start point | null | true | ... | 2007-12-23T09:01:00.000000000 | 2007-12-23 | 8 | fr | test | 09:01:00.000000000 | 30b443ae-c0c9-4790-9bec-ce1380808435 |%n" - + "| Index : 2 | MODIFICATION | select id, name, firstname, bi... | null, 2007-12-23 |----------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n" - + "| | | | | At end point | null | false | ... | 2002-07-25T03:30:05.000000000 | 2002-07-25 | 9 | en | test2 | 03:30:05.000000000 | 0e2a1269-eff0-4233-b87b-b53e8b6f164d |%n" - + "|-----------|--------------|-----------------------------------|---------------------|----------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n" - + "|-----------|--------------|-----------------------------------|---------------------|----------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n" - + "| | | | | | * | | | | * | | | | | |%n" - + "| | TYPE | TABLE | PRIMARY | | column1 | column2 | column3 | column4 | column5 | column6 | column7 | column8 | column9 | column10 |%n" - + "| | | | KEY | | (NOT_IDENTIFIED) | (BOOLEAN) | (BYTES) | (DATE_TIME) | (DATE) | (NUMBER) | (NOT_IDENTIFIED : class java.util.Locale) | (TEXT) | (TIME) | (UUID) |%n" - + "| | | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 |%n" - + "|-----------|--------------|-----------------------------------|---------------------|----------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n" - + "| | | | | At start point | null | true | ... | 2007-12-23T09:01:00.000000000 | 2007-12-23 | 8 | fr | test | 09:01:00.000000000 | 30b443ae-c0c9-4790-9bec-ce1380808435 |%n" - + "| Index : 3 | MODIFICATION | table | null, 2007-12-23 |----------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n" - + "| | | | | At end point | null | false | ... | 2002-07-25T03:30:05.000000000 | 2002-07-25 | 9 | en | test2 | 03:30:05.000000000 | 0e2a1269-eff0-4233-b87b-b53e8b6f164d |%n" - + "|-----------|--------------|-----------------------------------|---------------------|----------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n" - + "|-----------|--------------|-----------------------------------|---------------------|----------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n" - + "| | | | | | * | | | | * | | | | | |%n" - + "| | TYPE | TABLE | PRIMARY | | column1 | column2 | column3 | column4 | column5 | column6 | column7 | column8 | column9 | column10 |%n" - + "| | | | KEY | | (NOT_IDENTIFIED) | (BOOLEAN) | (BYTES) | (DATE_TIME) | (DATE) | (NUMBER) | (NOT_IDENTIFIED : class java.util.Locale) | (TEXT) | (TIME) | (UUID) |%n" - + "| | | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 |%n" - + "|-----------|--------------|-----------------------------------|---------------------|----------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n" - + "| | | | | At start point | null | true | ... | 2007-12-23T09:01:00.000000000 | 2007-12-23 | 8 | fr | test | 09:01:00.000000000 | 30b443ae-c0c9-4790-9bec-ce1380808435 |%n" - + "| Index : 4 | DELETION | table | null, 2007-12-23 |----------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n" - + "| | | | | At end point | | | | | | | | | | |%n" - + "|-----------|--------------|-----------------------------------|---------------------|----------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n")); + getChanges(Arrays.asList(getTableCreationChange("table", row3), + getTableModificationChange("table", row1, + row3), + getTableDeletionChange("table", row1), + getChange(DataType.REQUEST, + "select * from table", + ChangeType.MODIFICATION, row1, + row2), + getChange(DataType.REQUEST, + "select id, name, firstname, birth, actor_imdb from actor", + ChangeType.MODIFICATION, row1, + row2))))) + .isEqualTo(String.format( + "[description]%n" + + "|-----------|--------------|-----------------------------------|---------------------|----------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n" + + "| | | | | | * | | | | * | * | | | | |%n" + + "| | TYPE | TABLE | PRIMARY | | column1 | column2 | column3 | column4 | column5 | column6 | column7 | column8 | column9 | column10 |%n" + + "| | | | KEY | | (NOT_IDENTIFIED) | (BOOLEAN) | (BYTES) | (DATE_TIME) | (DATE) | (NUMBER) | (NOT_IDENTIFIED : class java.util.Locale) | (TEXT) | (TIME) | (UUID) |%n" + + "| | | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 |%n" + + "|-----------|--------------|-----------------------------------|---------------------|----------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n" + + "| | | | | At start point | | | | | | | | | | |%n" + + "| Index : 0 | CREATION | table | null, 2002-07-25, 9 |----------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n" + + "| | | | | At end point | null | false | ... | 2002-07-25T03:30:05.000000000 | 2002-07-25 | 9 | en | test2 | 03:30:05.000000000 | 0e2a1269-eff0-4233-b87b-b53e8b6f164d |%n" + + "|-----------|--------------|-----------------------------------|---------------------|----------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n" + + "|-----------|--------------|-----------------------------------|---------------------|----------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n" + + "| | | | | | * | | | | * | | | | | |%n" + + "| | TYPE | REQUEST | PRIMARY | | column1 | column2 | column3 | column4 | column5 | column6 | column7 | column8 | column9 | column10 |%n" + + "| | | | KEY | | (NOT_IDENTIFIED) | (BOOLEAN) | (BYTES) | (DATE_TIME) | (DATE) | (NUMBER) | (NOT_IDENTIFIED : class java.util.Locale) | (TEXT) | (TIME) | (UUID) |%n" + + "| | | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 |%n" + + "|-----------|--------------|-----------------------------------|---------------------|----------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n" + + "| | | | | At start point | null | true | ... | 2007-12-23T09:01:00.000000000 | 2007-12-23 | 8 | fr | test | 09:01:00.000000000 | 30b443ae-c0c9-4790-9bec-ce1380808435 |%n" + + "| Index : 1 | MODIFICATION | select * from table | null, 2007-12-23 |----------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n" + + "| | | | | At end point | null | false | ... | 2002-07-25T03:30:05.000000000 | 2002-07-25 | 9 | en | test2 | 03:30:05.000000000 | 0e2a1269-eff0-4233-b87b-b53e8b6f164d |%n" + + "|-----------|--------------|-----------------------------------|---------------------|----------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n" + + "|-----------|--------------|-----------------------------------|---------------------|----------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n" + + "| | | | | | * | | | | * | | | | | |%n" + + "| | TYPE | REQUEST | PRIMARY | | column1 | column2 | column3 | column4 | column5 | column6 | column7 | column8 | column9 | column10 |%n" + + "| | | | KEY | | (NOT_IDENTIFIED) | (BOOLEAN) | (BYTES) | (DATE_TIME) | (DATE) | (NUMBER) | (NOT_IDENTIFIED : class java.util.Locale) | (TEXT) | (TIME) | (UUID) |%n" + + "| | | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 |%n" + + "|-----------|--------------|-----------------------------------|---------------------|----------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n" + + "| | | | | At start point | null | true | ... | 2007-12-23T09:01:00.000000000 | 2007-12-23 | 8 | fr | test | 09:01:00.000000000 | 30b443ae-c0c9-4790-9bec-ce1380808435 |%n" + + "| Index : 2 | MODIFICATION | select id, name, firstname, bi... | null, 2007-12-23 |----------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n" + + "| | | | | At end point | null | false | ... | 2002-07-25T03:30:05.000000000 | 2002-07-25 | 9 | en | test2 | 03:30:05.000000000 | 0e2a1269-eff0-4233-b87b-b53e8b6f164d |%n" + + "|-----------|--------------|-----------------------------------|---------------------|----------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n" + + "|-----------|--------------|-----------------------------------|---------------------|----------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n" + + "| | | | | | * | | | | * | | | | | |%n" + + "| | TYPE | TABLE | PRIMARY | | column1 | column2 | column3 | column4 | column5 | column6 | column7 | column8 | column9 | column10 |%n" + + "| | | | KEY | | (NOT_IDENTIFIED) | (BOOLEAN) | (BYTES) | (DATE_TIME) | (DATE) | (NUMBER) | (NOT_IDENTIFIED : class java.util.Locale) | (TEXT) | (TIME) | (UUID) |%n" + + "| | | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 |%n" + + "|-----------|--------------|-----------------------------------|---------------------|----------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n" + + "| | | | | At start point | null | true | ... | 2007-12-23T09:01:00.000000000 | 2007-12-23 | 8 | fr | test | 09:01:00.000000000 | 30b443ae-c0c9-4790-9bec-ce1380808435 |%n" + + "| Index : 3 | MODIFICATION | table | null, 2007-12-23 |----------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n" + + "| | | | | At end point | null | false | ... | 2002-07-25T03:30:05.000000000 | 2002-07-25 | 9 | en | test2 | 03:30:05.000000000 | 0e2a1269-eff0-4233-b87b-b53e8b6f164d |%n" + + "|-----------|--------------|-----------------------------------|---------------------|----------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n" + + "|-----------|--------------|-----------------------------------|---------------------|----------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n" + + "| | | | | | * | | | | * | | | | | |%n" + + "| | TYPE | TABLE | PRIMARY | | column1 | column2 | column3 | column4 | column5 | column6 | column7 | column8 | column9 | column10 |%n" + + "| | | | KEY | | (NOT_IDENTIFIED) | (BOOLEAN) | (BYTES) | (DATE_TIME) | (DATE) | (NUMBER) | (NOT_IDENTIFIED : class java.util.Locale) | (TEXT) | (TIME) | (UUID) |%n" + + "| | | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 |%n" + + "|-----------|--------------|-----------------------------------|---------------------|----------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n" + + "| | | | | At start point | null | true | ... | 2007-12-23T09:01:00.000000000 | 2007-12-23 | 8 | fr | test | 09:01:00.000000000 | 30b443ae-c0c9-4790-9bec-ce1380808435 |%n" + + "| Index : 4 | DELETION | table | null, 2007-12-23 |----------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n" + + "| | | | | At end point | | | | | | | | | | |%n" + + "|-----------|--------------|-----------------------------------|---------------------|----------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n")); assertThat(PlainOutput.INSTANCE.getChangesOutput(info, - getChanges(new ArrayList()))) - .isEqualTo(String.format("[description]%n")); + getChanges(new ArrayList()))) + .isEqualTo(String.format("[description]%n")); } /** @@ -289,96 +289,96 @@ public void test_change_output() throws Exception { WritableAssertionInfo info = new WritableAssertionInfo(); info.description("description"); Row row1 = getRow(Arrays.asList("column1", "column5"), - Arrays.asList("column1", "column2", "column3", "column4", - "column5", "column6", "column7", "column8", - "column9", "column10"), - Arrays.asList(getValue(null, null), getValue(null, true), getValue(null, new byte[] { 0, 1 }), - getValue(null, Timestamp.valueOf("2007-12-23 09:01:00")), - getValue(null, Date.valueOf("2007-12-23")), getValue(null, 8), - getValue(null, Locale.FRENCH), getValue(null, "test"), - getValue(null, Time.valueOf("09:01:00")), - getValue(null, UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")))); + Arrays.asList("column1", "column2", "column3", "column4", + "column5", "column6", "column7", "column8", + "column9", "column10"), + Arrays.asList(getValue(null, null), getValue(null, true), getValue(null, new byte[]{0, 1}), + getValue(null, Timestamp.valueOf("2007-12-23 09:01:00")), + getValue(null, Date.valueOf("2007-12-23")), getValue(null, 8), + getValue(null, Locale.FRENCH), getValue(null, "test"), + getValue(null, Time.valueOf("09:01:00")), + getValue(null, UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")))); Row row2 = getRow(Arrays.asList("column1", "column5"), - Arrays.asList("column1", "column2", "column3", "column4", - "column5", "column6", "column7", "column8", - "column9", "column10"), - Arrays.asList(getValue(null, null), getValue(null, false), getValue(null, new byte[] { 2, 3 }), - getValue(null, Timestamp.valueOf("2002-07-25 03:30:05")), - getValue(null, Date.valueOf("2002-07-25")), getValue(null, 9), - getValue(null, Locale.ENGLISH), getValue(null, "test2"), - getValue(null, Time.valueOf("03:30:05")), - getValue(null, UUID.fromString("0E2A1269-EFF0-4233-B87B-B53E8B6F164D")))); + Arrays.asList("column1", "column2", "column3", "column4", + "column5", "column6", "column7", "column8", + "column9", "column10"), + Arrays.asList(getValue(null, null), getValue(null, false), getValue(null, new byte[]{2, 3}), + getValue(null, Timestamp.valueOf("2002-07-25 03:30:05")), + getValue(null, Date.valueOf("2002-07-25")), getValue(null, 9), + getValue(null, Locale.ENGLISH), getValue(null, "test2"), + getValue(null, Time.valueOf("03:30:05")), + getValue(null, UUID.fromString("0E2A1269-EFF0-4233-B87B-B53E8B6F164D")))); assertThat(PlainOutput.INSTANCE.getChangeOutput(info, getTableCreationChange("table", row2))) - .isEqualTo(String.format( - "[description]%n" - + "|----------|-------|------------------|----------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n" - + "| | | | | * | | | | * | | | | | |%n" - + "| TYPE | TABLE | PRIMARY | | column1 | column2 | column3 | column4 | column5 | column6 | column7 | column8 | column9 | column10 |%n" - + "| | | KEY | | (NOT_IDENTIFIED) | (BOOLEAN) | (BYTES) | (DATE_TIME) | (DATE) | (NUMBER) | (NOT_IDENTIFIED : class java.util.Locale) | (TEXT) | (TIME) | (UUID) |%n" - + "| | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 |%n" - + "|----------|-------|------------------|----------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n" - + "| | | | At start point | | | | | | | | | | |%n" - + "| CREATION | table | null, 2002-07-25 |----------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n" - + "| | | | At end point | null | false | ... | 2002-07-25T03:30:05.000000000 | 2002-07-25 | 9 | en | test2 | 03:30:05.000000000 | 0e2a1269-eff0-4233-b87b-b53e8b6f164d |%n" - + "|----------|-------|------------------|----------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n")); + .isEqualTo(String.format( + "[description]%n" + + "|----------|-------|------------------|----------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n" + + "| | | | | * | | | | * | | | | | |%n" + + "| TYPE | TABLE | PRIMARY | | column1 | column2 | column3 | column4 | column5 | column6 | column7 | column8 | column9 | column10 |%n" + + "| | | KEY | | (NOT_IDENTIFIED) | (BOOLEAN) | (BYTES) | (DATE_TIME) | (DATE) | (NUMBER) | (NOT_IDENTIFIED : class java.util.Locale) | (TEXT) | (TIME) | (UUID) |%n" + + "| | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 |%n" + + "|----------|-------|------------------|----------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n" + + "| | | | At start point | | | | | | | | | | |%n" + + "| CREATION | table | null, 2002-07-25 |----------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n" + + "| | | | At end point | null | false | ... | 2002-07-25T03:30:05.000000000 | 2002-07-25 | 9 | en | test2 | 03:30:05.000000000 | 0e2a1269-eff0-4233-b87b-b53e8b6f164d |%n" + + "|----------|-------|------------------|----------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n")); assertThat(PlainOutput.INSTANCE.getChangeOutput(info, getTableModificationChange("table", row1, row2))) - .isEqualTo(String.format( - "[description]%n" - + "|--------------|-------|------------------|----------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n" - + "| | | | | * | | | | * | | | | | |%n" - + "| TYPE | TABLE | PRIMARY | | column1 | column2 | column3 | column4 | column5 | column6 | column7 | column8 | column9 | column10 |%n" - + "| | | KEY | | (NOT_IDENTIFIED) | (BOOLEAN) | (BYTES) | (DATE_TIME) | (DATE) | (NUMBER) | (NOT_IDENTIFIED : class java.util.Locale) | (TEXT) | (TIME) | (UUID) |%n" - + "| | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 |%n" - + "|--------------|-------|------------------|----------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n" - + "| | | | At start point | null | true | ... | 2007-12-23T09:01:00.000000000 | 2007-12-23 | 8 | fr | test | 09:01:00.000000000 | 30b443ae-c0c9-4790-9bec-ce1380808435 |%n" - + "| MODIFICATION | table | null, 2007-12-23 |----------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n" - + "| | | | At end point | null | false | ... | 2002-07-25T03:30:05.000000000 | 2002-07-25 | 9 | en | test2 | 03:30:05.000000000 | 0e2a1269-eff0-4233-b87b-b53e8b6f164d |%n" - + "|--------------|-------|------------------|----------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n")); + .isEqualTo(String.format( + "[description]%n" + + "|--------------|-------|------------------|----------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n" + + "| | | | | * | | | | * | | | | | |%n" + + "| TYPE | TABLE | PRIMARY | | column1 | column2 | column3 | column4 | column5 | column6 | column7 | column8 | column9 | column10 |%n" + + "| | | KEY | | (NOT_IDENTIFIED) | (BOOLEAN) | (BYTES) | (DATE_TIME) | (DATE) | (NUMBER) | (NOT_IDENTIFIED : class java.util.Locale) | (TEXT) | (TIME) | (UUID) |%n" + + "| | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 |%n" + + "|--------------|-------|------------------|----------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n" + + "| | | | At start point | null | true | ... | 2007-12-23T09:01:00.000000000 | 2007-12-23 | 8 | fr | test | 09:01:00.000000000 | 30b443ae-c0c9-4790-9bec-ce1380808435 |%n" + + "| MODIFICATION | table | null, 2007-12-23 |----------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n" + + "| | | | At end point | null | false | ... | 2002-07-25T03:30:05.000000000 | 2002-07-25 | 9 | en | test2 | 03:30:05.000000000 | 0e2a1269-eff0-4233-b87b-b53e8b6f164d |%n" + + "|--------------|-------|------------------|----------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n")); assertThat(PlainOutput.INSTANCE.getChangeOutput(info, getTableDeletionChange("table", row1))) - .isEqualTo(String.format( - "[description]%n" - + "|----------|-------|------------------|----------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n" - + "| | | | | * | | | | * | | | | | |%n" - + "| TYPE | TABLE | PRIMARY | | column1 | column2 | column3 | column4 | column5 | column6 | column7 | column8 | column9 | column10 |%n" - + "| | | KEY | | (NOT_IDENTIFIED) | (BOOLEAN) | (BYTES) | (DATE_TIME) | (DATE) | (NUMBER) | (NOT_IDENTIFIED : class java.util.Locale) | (TEXT) | (TIME) | (UUID) |%n" - + "| | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 |%n" - + "|----------|-------|------------------|----------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n" - + "| | | | At start point | null | true | ... | 2007-12-23T09:01:00.000000000 | 2007-12-23 | 8 | fr | test | 09:01:00.000000000 | 30b443ae-c0c9-4790-9bec-ce1380808435 |%n" - + "| DELETION | table | null, 2007-12-23 |----------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n" - + "| | | | At end point | | | | | | | | | | |%n" - + "|----------|-------|------------------|----------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n")); + .isEqualTo(String.format( + "[description]%n" + + "|----------|-------|------------------|----------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n" + + "| | | | | * | | | | * | | | | | |%n" + + "| TYPE | TABLE | PRIMARY | | column1 | column2 | column3 | column4 | column5 | column6 | column7 | column8 | column9 | column10 |%n" + + "| | | KEY | | (NOT_IDENTIFIED) | (BOOLEAN) | (BYTES) | (DATE_TIME) | (DATE) | (NUMBER) | (NOT_IDENTIFIED : class java.util.Locale) | (TEXT) | (TIME) | (UUID) |%n" + + "| | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 |%n" + + "|----------|-------|------------------|----------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n" + + "| | | | At start point | null | true | ... | 2007-12-23T09:01:00.000000000 | 2007-12-23 | 8 | fr | test | 09:01:00.000000000 | 30b443ae-c0c9-4790-9bec-ce1380808435 |%n" + + "| DELETION | table | null, 2007-12-23 |----------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n" + + "| | | | At end point | | | | | | | | | | |%n" + + "|----------|-------|------------------|----------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n")); assertThat(PlainOutput.INSTANCE.getChangeOutput(info, - getChange(DataType.REQUEST, "select * from table", - ChangeType.MODIFICATION, row1, row2))) - .isEqualTo(String.format( - "[description]%n" - + "|--------------|---------------------|------------------|----------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n" - + "| | | | | * | | | | * | | | | | |%n" - + "| TYPE | REQUEST | PRIMARY | | column1 | column2 | column3 | column4 | column5 | column6 | column7 | column8 | column9 | column10 |%n" - + "| | | KEY | | (NOT_IDENTIFIED) | (BOOLEAN) | (BYTES) | (DATE_TIME) | (DATE) | (NUMBER) | (NOT_IDENTIFIED : class java.util.Locale) | (TEXT) | (TIME) | (UUID) |%n" - + "| | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 |%n" - + "|--------------|---------------------|------------------|----------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n" - + "| | | | At start point | null | true | ... | 2007-12-23T09:01:00.000000000 | 2007-12-23 | 8 | fr | test | 09:01:00.000000000 | 30b443ae-c0c9-4790-9bec-ce1380808435 |%n" - + "| MODIFICATION | select * from table | null, 2007-12-23 |----------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n" - + "| | | | At end point | null | false | ... | 2002-07-25T03:30:05.000000000 | 2002-07-25 | 9 | en | test2 | 03:30:05.000000000 | 0e2a1269-eff0-4233-b87b-b53e8b6f164d |%n" - + "|--------------|---------------------|------------------|----------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n")); + getChange(DataType.REQUEST, "select * from table", + ChangeType.MODIFICATION, row1, row2))) + .isEqualTo(String.format( + "[description]%n" + + "|--------------|---------------------|------------------|----------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n" + + "| | | | | * | | | | * | | | | | |%n" + + "| TYPE | REQUEST | PRIMARY | | column1 | column2 | column3 | column4 | column5 | column6 | column7 | column8 | column9 | column10 |%n" + + "| | | KEY | | (NOT_IDENTIFIED) | (BOOLEAN) | (BYTES) | (DATE_TIME) | (DATE) | (NUMBER) | (NOT_IDENTIFIED : class java.util.Locale) | (TEXT) | (TIME) | (UUID) |%n" + + "| | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 |%n" + + "|--------------|---------------------|------------------|----------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n" + + "| | | | At start point | null | true | ... | 2007-12-23T09:01:00.000000000 | 2007-12-23 | 8 | fr | test | 09:01:00.000000000 | 30b443ae-c0c9-4790-9bec-ce1380808435 |%n" + + "| MODIFICATION | select * from table | null, 2007-12-23 |----------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n" + + "| | | | At end point | null | false | ... | 2002-07-25T03:30:05.000000000 | 2002-07-25 | 9 | en | test2 | 03:30:05.000000000 | 0e2a1269-eff0-4233-b87b-b53e8b6f164d |%n" + + "|--------------|---------------------|------------------|----------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n")); assertThat(PlainOutput.INSTANCE.getChangeOutput(info, - getChange(DataType.REQUEST, - "select id, name, firstname, birth, actor_imdb from actor", - ChangeType.MODIFICATION, row1, row2))) - .isEqualTo(String.format( - "[description]%n" - + "|--------------|-----------------------------------|------------------|----------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n" - + "| | | | | * | | | | * | | | | | |%n" - + "| TYPE | REQUEST | PRIMARY | | column1 | column2 | column3 | column4 | column5 | column6 | column7 | column8 | column9 | column10 |%n" - + "| | | KEY | | (NOT_IDENTIFIED) | (BOOLEAN) | (BYTES) | (DATE_TIME) | (DATE) | (NUMBER) | (NOT_IDENTIFIED : class java.util.Locale) | (TEXT) | (TIME) | (UUID) |%n" - + "| | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 |%n" - + "|--------------|-----------------------------------|------------------|----------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n" - + "| | | | At start point | null | true | ... | 2007-12-23T09:01:00.000000000 | 2007-12-23 | 8 | fr | test | 09:01:00.000000000 | 30b443ae-c0c9-4790-9bec-ce1380808435 |%n" - + "| MODIFICATION | select id, name, firstname, bi... | null, 2007-12-23 |----------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n" - + "| | | | At end point | null | false | ... | 2002-07-25T03:30:05.000000000 | 2002-07-25 | 9 | en | test2 | 03:30:05.000000000 | 0e2a1269-eff0-4233-b87b-b53e8b6f164d |%n" - + "|--------------|-----------------------------------|------------------|----------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n")); + getChange(DataType.REQUEST, + "select id, name, firstname, birth, actor_imdb from actor", + ChangeType.MODIFICATION, row1, row2))) + .isEqualTo(String.format( + "[description]%n" + + "|--------------|-----------------------------------|------------------|----------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n" + + "| | | | | * | | | | * | | | | | |%n" + + "| TYPE | REQUEST | PRIMARY | | column1 | column2 | column3 | column4 | column5 | column6 | column7 | column8 | column9 | column10 |%n" + + "| | | KEY | | (NOT_IDENTIFIED) | (BOOLEAN) | (BYTES) | (DATE_TIME) | (DATE) | (NUMBER) | (NOT_IDENTIFIED : class java.util.Locale) | (TEXT) | (TIME) | (UUID) |%n" + + "| | | | | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 |%n" + + "|--------------|-----------------------------------|------------------|----------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n" + + "| | | | At start point | null | true | ... | 2007-12-23T09:01:00.000000000 | 2007-12-23 | 8 | fr | test | 09:01:00.000000000 | 30b443ae-c0c9-4790-9bec-ce1380808435 |%n" + + "| MODIFICATION | select id, name, firstname, bi... | null, 2007-12-23 |----------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n" + + "| | | | At end point | null | false | ... | 2002-07-25T03:30:05.000000000 | 2002-07-25 | 9 | en | test2 | 03:30:05.000000000 | 0e2a1269-eff0-4233-b87b-b53e8b6f164d |%n" + + "|--------------|-----------------------------------|------------------|----------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n")); } /** @@ -389,36 +389,36 @@ public void test_row_output() throws Exception { WritableAssertionInfo info = new WritableAssertionInfo(); info.description("description"); assertThat(PlainOutput.INSTANCE.getRowOutput(info, getRow(Arrays.asList("column1", "column5"), - Arrays.asList("column1", "column2", "column3", - "column4", "column5", "column6", - "column7", "column8", "column9", - "column10"), - Arrays.asList(getValue(null, null), getValue( - null, true), - getValue(null, new byte[] { 0, 1 }), - getValue(null, Timestamp.valueOf( - "2007-12-23 09:01:00")), - getValue(null, Date.valueOf("2007-12-23")), - getValue(null, 8), - getValue(null, Locale.FRENCH), getValue( - null, "test"), - getValue(null, Time.valueOf("09:01:00")), - getValue(null, UUID.fromString( - "30B443AE-C0C9-4790-9BEC-CE1380808435")))))) - .isEqualTo(String.format( - "[description]%n" - + "|------------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n" - + "| | * | | | | * | | | | | |%n" - + "| PRIMARY | column1 | column2 | column3 | column4 | column5 | column6 | column7 | column8 | column9 | column10 |%n" - + "| KEY | (NOT_IDENTIFIED) | (BOOLEAN) | (BYTES) | (DATE_TIME) | (DATE) | (NUMBER) | (NOT_IDENTIFIED : class java.util.Locale) | (TEXT) | (TIME) | (UUID) |%n" - + "| | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 |%n" - + "|------------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n" - + "| null, 2007-12-23 | null | true | ... | 2007-12-23T09:01:00.000000000 | 2007-12-23 | 8 | fr | test | 09:01:00.000000000 | 30b443ae-c0c9-4790-9bec-ce1380808435 |%n" - + "|------------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n")); + Arrays.asList("column1", "column2", "column3", + "column4", "column5", "column6", + "column7", "column8", "column9", + "column10"), + Arrays.asList(getValue(null, null), getValue( + null, true), + getValue(null, new byte[]{0, 1}), + getValue(null, Timestamp.valueOf( + "2007-12-23 09:01:00")), + getValue(null, Date.valueOf("2007-12-23")), + getValue(null, 8), + getValue(null, Locale.FRENCH), getValue( + null, "test"), + getValue(null, Time.valueOf("09:01:00")), + getValue(null, UUID.fromString( + "30B443AE-C0C9-4790-9BEC-CE1380808435")))))) + .isEqualTo(String.format( + "[description]%n" + + "|------------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n" + + "| | * | | | | * | | | | | |%n" + + "| PRIMARY | column1 | column2 | column3 | column4 | column5 | column6 | column7 | column8 | column9 | column10 |%n" + + "| KEY | (NOT_IDENTIFIED) | (BOOLEAN) | (BYTES) | (DATE_TIME) | (DATE) | (NUMBER) | (NOT_IDENTIFIED : class java.util.Locale) | (TEXT) | (TIME) | (UUID) |%n" + + "| | Index : 0 | Index : 1 | Index : 2 | Index : 3 | Index : 4 | Index : 5 | Index : 6 | Index : 7 | Index : 8 | Index : 9 |%n" + + "|------------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n" + + "| null, 2007-12-23 | null | true | ... | 2007-12-23T09:01:00.000000000 | 2007-12-23 | 8 | fr | test | 09:01:00.000000000 | 30b443ae-c0c9-4790-9bec-ce1380808435 |%n" + + "|------------------|------------------|-----------|-----------|-------------------------------|------------|-----------|-------------------------------------------|-----------|--------------------|--------------------------------------|%n")); assertThat(PlainOutput.INSTANCE.getRowOutput(info, null)) - .isEqualTo(String.format( - "[description]%n" - + "Row does not exist%n")); + .isEqualTo(String.format( + "[description]%n" + + "Row does not exist%n")); } /** @@ -429,130 +429,130 @@ public void test_column_output() throws Exception { WritableAssertionInfo info = new WritableAssertionInfo(); info.description("description"); assertThat(PlainOutput.INSTANCE.getColumnOutput(info, getColumn("column", Arrays.asList(getValue( - null, null), getValue(null, null))))) - .isEqualTo(String.format("[description]%n" - + "|-----------|------------------|%n" - + "| | column |%n" - + "| | (NOT_IDENTIFIED) |%n" - + "|-----------|------------------|%n" - + "| Index : 0 | null |%n" - + "| Index : 1 | null |%n" - + "|-----------|------------------|%n")); + null, null), getValue(null, null))))) + .isEqualTo(String.format("[description]%n" + + "|-----------|------------------|%n" + + "| | column |%n" + + "| | (NOT_IDENTIFIED) |%n" + + "|-----------|------------------|%n" + + "| Index : 0 | null |%n" + + "| Index : 1 | null |%n" + + "|-----------|------------------|%n")); assertThat(PlainOutput.INSTANCE.getColumnOutput(info, getColumn("column", Arrays.asList(getValue( - null, true), getValue(null, false))))) - .isEqualTo(String.format("[description]%n" - + "|-----------|-----------|%n" - + "| | column |%n" - + "| | (BOOLEAN) |%n" - + "|-----------|-----------|%n" - + "| Index : 0 | true |%n" - + "| Index : 1 | false |%n" - + "|-----------|-----------|%n")); + null, true), getValue(null, false))))) + .isEqualTo(String.format("[description]%n" + + "|-----------|-----------|%n" + + "| | column |%n" + + "| | (BOOLEAN) |%n" + + "|-----------|-----------|%n" + + "| Index : 0 | true |%n" + + "| Index : 1 | false |%n" + + "|-----------|-----------|%n")); assertThat(PlainOutput.INSTANCE.getColumnOutput(info, - getColumn("column", - Arrays.asList(getValue(null, new byte[] { 0, 1 }), - getValue(null, null))))) - .isEqualTo(String.format("[description]%n" - + "|-----------|---------|%n" - + "| | column |%n" - + "| | (BYTES) |%n" - + "|-----------|---------|%n" - + "| Index : 0 | ... |%n" - + "| Index : 1 | null |%n" - + "|-----------|---------|%n")); + getColumn("column", + Arrays.asList(getValue(null, new byte[]{0, 1}), + getValue(null, null))))) + .isEqualTo(String.format("[description]%n" + + "|-----------|---------|%n" + + "| | column |%n" + + "| | (BYTES) |%n" + + "|-----------|---------|%n" + + "| Index : 0 | ... |%n" + + "| Index : 1 | null |%n" + + "|-----------|---------|%n")); assertThat(PlainOutput.INSTANCE.getColumnOutput(info, - getColumn("column", Arrays.asList(getValue(null, null), - getValue(null, Timestamp.valueOf( - "2007-12-23 09:01:00")), - getValue(null, Timestamp.valueOf( - "2002-07-25 03:30:05")))))) - .isEqualTo(String.format("[description]%n" - + "|-----------|-------------------------------|%n" - + "| | column |%n" - + "| | (DATE_TIME) |%n" - + "|-----------|-------------------------------|%n" - + "| Index : 0 | null |%n" - + "| Index : 1 | 2007-12-23T09:01:00.000000000 |%n" - + "| Index : 2 | 2002-07-25T03:30:05.000000000 |%n" - + "|-----------|-------------------------------|%n")); + getColumn("column", Arrays.asList(getValue(null, null), + getValue(null, Timestamp.valueOf( + "2007-12-23 09:01:00")), + getValue(null, Timestamp.valueOf( + "2002-07-25 03:30:05")))))) + .isEqualTo(String.format("[description]%n" + + "|-----------|-------------------------------|%n" + + "| | column |%n" + + "| | (DATE_TIME) |%n" + + "|-----------|-------------------------------|%n" + + "| Index : 0 | null |%n" + + "| Index : 1 | 2007-12-23T09:01:00.000000000 |%n" + + "| Index : 2 | 2002-07-25T03:30:05.000000000 |%n" + + "|-----------|-------------------------------|%n")); assertThat(PlainOutput.INSTANCE.getColumnOutput(info, - getColumn("column", Arrays.asList( - getValue(null, Date.valueOf("2007-12-23")))))) - .isEqualTo(String.format("[description]%n" - + "|-----------|------------|%n" - + "| | column |%n" - + "| | (DATE) |%n" - + "|-----------|------------|%n" - + "| Index : 0 | 2007-12-23 |%n" - + "|-----------|------------|%n")); + getColumn("column", Arrays.asList( + getValue(null, Date.valueOf("2007-12-23")))))) + .isEqualTo(String.format("[description]%n" + + "|-----------|------------|%n" + + "| | column |%n" + + "| | (DATE) |%n" + + "|-----------|------------|%n" + + "| Index : 0 | 2007-12-23 |%n" + + "|-----------|------------|%n")); assertThat(PlainOutput.INSTANCE.getColumnOutput(info, - getColumn("column", Arrays.asList(getValue(null, 8), - getValue(null, 1000000000L))))) - .isEqualTo(String.format("[description]%n" - + "|-----------|------------|%n" - + "| | column |%n" - + "| | (NUMBER) |%n" - + "|-----------|------------|%n" - + "| Index : 0 | 8 |%n" - + "| Index : 1 | 1000000000 |%n" - + "|-----------|------------|%n")); + getColumn("column", Arrays.asList(getValue(null, 8), + getValue(null, 1000000000L))))) + .isEqualTo(String.format("[description]%n" + + "|-----------|------------|%n" + + "| | column |%n" + + "| | (NUMBER) |%n" + + "|-----------|------------|%n" + + "| Index : 0 | 8 |%n" + + "| Index : 1 | 1000000000 |%n" + + "|-----------|------------|%n")); assertThat(PlainOutput.INSTANCE.getColumnOutput(info, - getColumn("column", Arrays.asList(getValue(null, Locale.FRENCH), - getValue(null, Locale.ENGLISH))))) - .isEqualTo(String.format( - "[description]%n" - + "|-----------|-------------------------------------------|%n" - + "| | column |%n" - + "| | (NOT_IDENTIFIED : class java.util.Locale) |%n" - + "|-----------|-------------------------------------------|%n" - + "| Index : 0 | fr |%n" - + "| Index : 1 | en |%n" - + "|-----------|-------------------------------------------|%n")); + getColumn("column", Arrays.asList(getValue(null, Locale.FRENCH), + getValue(null, Locale.ENGLISH))))) + .isEqualTo(String.format( + "[description]%n" + + "|-----------|-------------------------------------------|%n" + + "| | column |%n" + + "| | (NOT_IDENTIFIED : class java.util.Locale) |%n" + + "|-----------|-------------------------------------------|%n" + + "| Index : 0 | fr |%n" + + "| Index : 1 | en |%n" + + "|-----------|-------------------------------------------|%n")); assertThat(PlainOutput.INSTANCE.getColumnOutput(info, - getColumn("column", Arrays.asList(getValue(null, "test"), - getValue(null, "test2"))))) - .isEqualTo(String.format("[description]%n" - + "|-----------|--------|%n" - + "| | column |%n" - + "| | (TEXT) |%n" - + "|-----------|--------|%n" - + "| Index : 0 | test |%n" - + "| Index : 1 | test2 |%n" - + "|-----------|--------|%n")); + getColumn("column", Arrays.asList(getValue(null, "test"), + getValue(null, "test2"))))) + .isEqualTo(String.format("[description]%n" + + "|-----------|--------|%n" + + "| | column |%n" + + "| | (TEXT) |%n" + + "|-----------|--------|%n" + + "| Index : 0 | test |%n" + + "| Index : 1 | test2 |%n" + + "|-----------|--------|%n")); assertThat(PlainOutput.INSTANCE.getColumnOutput(info, - getColumn("column", - Arrays.asList(getValue(null, Time.valueOf("09:01:00")), - getValue(null, Time.valueOf("03:30:05")))))) - .isEqualTo(String.format("[description]%n" - + "|-----------|--------------------|%n" - + "| | column |%n" - + "| | (TIME) |%n" - + "|-----------|--------------------|%n" - + "| Index : 0 | 09:01:00.000000000 |%n" - + "| Index : 1 | 03:30:05.000000000 |%n" - + "|-----------|--------------------|%n")); + getColumn("column", + Arrays.asList(getValue(null, Time.valueOf("09:01:00")), + getValue(null, Time.valueOf("03:30:05")))))) + .isEqualTo(String.format("[description]%n" + + "|-----------|--------------------|%n" + + "| | column |%n" + + "| | (TIME) |%n" + + "|-----------|--------------------|%n" + + "| Index : 0 | 09:01:00.000000000 |%n" + + "| Index : 1 | 03:30:05.000000000 |%n" + + "|-----------|--------------------|%n")); assertThat(PlainOutput.INSTANCE - .getColumnOutput(info, getColumn("column", - Arrays.asList(getValue(null, UUID.fromString( - "30B443AE-C0C9-4790-9BEC-CE1380808435")), - getValue(null, UUID.fromString( - "0E2A1269-EFF0-4233-B87B-B53E8B6F164D")))))) - .isEqualTo(String.format("[description]%n" - + "|-----------|--------------------------------------|%n" - + "| | column |%n" - + "| | (UUID) |%n" - + "|-----------|--------------------------------------|%n" - + "| Index : 0 | 30b443ae-c0c9-4790-9bec-ce1380808435 |%n" - + "| Index : 1 | 0e2a1269-eff0-4233-b87b-b53e8b6f164d |%n" - + "|-----------|--------------------------------------|%n")); + .getColumnOutput(info, getColumn("column", + Arrays.asList(getValue(null, UUID.fromString( + "30B443AE-C0C9-4790-9BEC-CE1380808435")), + getValue(null, UUID.fromString( + "0E2A1269-EFF0-4233-B87B-B53E8B6F164D")))))) + .isEqualTo(String.format("[description]%n" + + "|-----------|--------------------------------------|%n" + + "| | column |%n" + + "| | (UUID) |%n" + + "|-----------|--------------------------------------|%n" + + "| Index : 0 | 30b443ae-c0c9-4790-9bec-ce1380808435 |%n" + + "| Index : 1 | 0e2a1269-eff0-4233-b87b-b53e8b6f164d |%n" + + "|-----------|--------------------------------------|%n")); assertThat(PlainOutput.INSTANCE - .getColumnOutput(info, getColumn("column", new ArrayList()))) - .isEqualTo(String.format("[description]%n" - + "|------------|------------------|%n" - + "| | column |%n" - + "| | (NOT_IDENTIFIED) |%n" - + "|------------|------------------|%n" - + "|------------|------------------|%n")); + .getColumnOutput(info, getColumn("column", new ArrayList()))) + .isEqualTo(String.format("[description]%n" + + "|------------|------------------|%n" + + "| | column |%n" + + "| | (NOT_IDENTIFIED) |%n" + + "|------------|------------------|%n" + + "|------------|------------------|%n")); } /** @@ -564,42 +564,42 @@ public void test_change_column_output() throws Exception { info.description("description"); assertThat(PlainOutput.INSTANCE.getChangeColumnOutput(info, "column2", getValue(null, true), getValue(null, false))) - .isEqualTo(String.format( - "[description]%n" - + "|----------------|-----------|%n" - + "| | column2 |%n" - + "| | (BOOLEAN) |%n" - + "|----------------|-----------|%n" - + "| At start point | true |%n" - + "|----------------|-----------|%n" - + "| At end point | false |%n" - + "|----------------|-----------|%n")); + .isEqualTo(String.format( + "[description]%n" + + "|----------------|-----------|%n" + + "| | column2 |%n" + + "| | (BOOLEAN) |%n" + + "|----------------|-----------|%n" + + "| At start point | true |%n" + + "|----------------|-----------|%n" + + "| At end point | false |%n" + + "|----------------|-----------|%n")); assertThat(PlainOutput.INSTANCE.getChangeColumnOutput(info, "column1", getValue(null, null), - getValue(null, null))) - .isEqualTo(String.format( - "[description]%n" - + "|----------------|------------------|%n" - + "| | column1 |%n" - + "| | (NOT_IDENTIFIED) |%n" - + "|----------------|------------------|%n" - + "| At start point | null |%n" - + "|----------------|------------------|%n" - + "| At end point | null |%n" - + "|----------------|------------------|%n")); + getValue(null, null))) + .isEqualTo(String.format( + "[description]%n" + + "|----------------|------------------|%n" + + "| | column1 |%n" + + "| | (NOT_IDENTIFIED) |%n" + + "|----------------|------------------|%n" + + "| At start point | null |%n" + + "|----------------|------------------|%n" + + "| At end point | null |%n" + + "|----------------|------------------|%n")); assertThat(PlainOutput.INSTANCE.getChangeColumnOutput(info, "column", getValue(null, UUID.fromString( - "30B443AE-C0C9-4790-9BEC-CE1380808435")), - getValue(null, UUID.fromString( - "0E2A1269-EFF0-4233-B87B-B53E8B6F164D")))) - .isEqualTo(String.format( - "[description]%n" - + "|----------------|--------------------------------------|%n" - + "| | column |%n" - + "| | (UUID) |%n" - + "|----------------|--------------------------------------|%n" - + "| At start point | 30b443ae-c0c9-4790-9bec-ce1380808435 |%n" - + "|----------------|--------------------------------------|%n" - + "| At end point | 0e2a1269-eff0-4233-b87b-b53e8b6f164d |%n" - + "|----------------|--------------------------------------|%n")); + "30B443AE-C0C9-4790-9BEC-CE1380808435")), + getValue(null, UUID.fromString( + "0E2A1269-EFF0-4233-B87B-B53E8B6F164D")))) + .isEqualTo(String.format( + "[description]%n" + + "|----------------|--------------------------------------|%n" + + "| | column |%n" + + "| | (UUID) |%n" + + "|----------------|--------------------------------------|%n" + + "| At start point | 30b443ae-c0c9-4790-9bec-ce1380808435 |%n" + + "|----------------|--------------------------------------|%n" + + "| At end point | 0e2a1269-eff0-4233-b87b-b53e8b6f164d |%n" + + "|----------------|--------------------------------------|%n")); } /** @@ -610,85 +610,85 @@ public void test_value_output() throws Exception { WritableAssertionInfo info = new WritableAssertionInfo(); info.description("description"); assertThat(PlainOutput.INSTANCE.getValueOutput(info, getValue("column", null))) - .isEqualTo(String.format("[description]%n" - + "|------------------|%n" - + "| column |%n" - + "| (NOT_IDENTIFIED) |%n" - + "|------------------|%n" - + "| null |%n" - + "|------------------|%n")); + .isEqualTo(String.format("[description]%n" + + "|------------------|%n" + + "| column |%n" + + "| (NOT_IDENTIFIED) |%n" + + "|------------------|%n" + + "| null |%n" + + "|------------------|%n")); assertThat(PlainOutput.INSTANCE.getValueOutput(info, getValue("column", true))) - .isEqualTo(String.format("[description]%n" - + "|-----------|%n" - + "| column |%n" - + "| (BOOLEAN) |%n" - + "|-----------|%n" - + "| true |%n" - + "|-----------|%n")); - assertThat(PlainOutput.INSTANCE.getValueOutput(info, getValue("column", new byte[] { 0, 1 }))) - .isEqualTo(String.format("[description]%n" - + "|---------|%n" - + "| column |%n" - + "| (BYTES) |%n" - + "|---------|%n" - + "| ... |%n" - + "|---------|%n")); + .isEqualTo(String.format("[description]%n" + + "|-----------|%n" + + "| column |%n" + + "| (BOOLEAN) |%n" + + "|-----------|%n" + + "| true |%n" + + "|-----------|%n")); + assertThat(PlainOutput.INSTANCE.getValueOutput(info, getValue("column", new byte[]{0, 1}))) + .isEqualTo(String.format("[description]%n" + + "|---------|%n" + + "| column |%n" + + "| (BYTES) |%n" + + "|---------|%n" + + "| ... |%n" + + "|---------|%n")); assertThat(PlainOutput.INSTANCE.getValueOutput(info, getValue("column", Timestamp.valueOf("2007-12-23 09:01:00")))) - .isEqualTo(String.format("[description]%n" - + "|-------------------------------|%n" - + "| column |%n" - + "| (DATE_TIME) |%n" - + "|-------------------------------|%n" - + "| 2007-12-23T09:01:00.000000000 |%n" - + "|-------------------------------|%n")); + .isEqualTo(String.format("[description]%n" + + "|-------------------------------|%n" + + "| column |%n" + + "| (DATE_TIME) |%n" + + "|-------------------------------|%n" + + "| 2007-12-23T09:01:00.000000000 |%n" + + "|-------------------------------|%n")); assertThat(PlainOutput.INSTANCE.getValueOutput(info, getValue("column", Date.valueOf("2007-12-23")))) - .isEqualTo(String.format("[description]%n" - + "|------------|%n" - + "| column |%n" - + "| (DATE) |%n" - + "|------------|%n" - + "| 2007-12-23 |%n" - + "|------------|%n")); + .isEqualTo(String.format("[description]%n" + + "|------------|%n" + + "| column |%n" + + "| (DATE) |%n" + + "|------------|%n" + + "| 2007-12-23 |%n" + + "|------------|%n")); assertThat(PlainOutput.INSTANCE.getValueOutput(info, getValue("column", 8))) - .isEqualTo(String.format("[description]%n" - + "|----------|%n" - + "| column |%n" - + "| (NUMBER) |%n" - + "|----------|%n" - + "| 8 |%n" - + "|----------|%n")); + .isEqualTo(String.format("[description]%n" + + "|----------|%n" + + "| column |%n" + + "| (NUMBER) |%n" + + "|----------|%n" + + "| 8 |%n" + + "|----------|%n")); assertThat(PlainOutput.INSTANCE.getValueOutput(info, getValue("column", Locale.FRENCH))) - .isEqualTo(String.format("[description]%n" - + "|-------------------------------------------|%n" - + "| column |%n" - + "| (NOT_IDENTIFIED : class java.util.Locale) |%n" - + "|-------------------------------------------|%n" - + "| fr |%n" - + "|-------------------------------------------|%n")); + .isEqualTo(String.format("[description]%n" + + "|-------------------------------------------|%n" + + "| column |%n" + + "| (NOT_IDENTIFIED : class java.util.Locale) |%n" + + "|-------------------------------------------|%n" + + "| fr |%n" + + "|-------------------------------------------|%n")); assertThat(PlainOutput.INSTANCE.getValueOutput(info, getValue("column", "test"))) - .isEqualTo(String.format("[description]%n" - + "|--------|%n" - + "| column |%n" - + "| (TEXT) |%n" - + "|--------|%n" - + "| test |%n" - + "|--------|%n")); + .isEqualTo(String.format("[description]%n" + + "|--------|%n" + + "| column |%n" + + "| (TEXT) |%n" + + "|--------|%n" + + "| test |%n" + + "|--------|%n")); assertThat(PlainOutput.INSTANCE.getValueOutput(info, getValue("column", Time.valueOf("09:01:00")))) - .isEqualTo(String.format("[description]%n" - + "|--------------------|%n" - + "| column |%n" - + "| (TIME) |%n" - + "|--------------------|%n" - + "| 09:01:00.000000000 |%n" - + "|--------------------|%n")); + .isEqualTo(String.format("[description]%n" + + "|--------------------|%n" + + "| column |%n" + + "| (TIME) |%n" + + "|--------------------|%n" + + "| 09:01:00.000000000 |%n" + + "|--------------------|%n")); assertThat(PlainOutput.INSTANCE.getValueOutput(info, getValue("column", UUID.fromString( - "30B443AE-C0C9-4790-9BEC-CE1380808435")))) - .isEqualTo(String.format("[description]%n" - + "|--------------------------------------|%n" - + "| column |%n" - + "| (UUID) |%n" - + "|--------------------------------------|%n" - + "| 30b443ae-c0c9-4790-9bec-ce1380808435 |%n" - + "|--------------------------------------|%n")); + "30B443AE-C0C9-4790-9BEC-CE1380808435")))) + .isEqualTo(String.format("[description]%n" + + "|--------------------------------------|%n" + + "| column |%n" + + "| (UUID) |%n" + + "|--------------------------------------|%n" + + "| 30b443ae-c0c9-4790-9bec-ce1380808435 |%n" + + "|--------------------------------------|%n")); } } diff --git a/src/test/java/org/assertj/db/output/impl/PlainOutput_ValueOf_Test.java b/src/test/java/org/assertj/db/output/impl/PlainOutput_ValueOf_Test.java index 7f7c8f7c..17d700df 100644 --- a/src/test/java/org/assertj/db/output/impl/PlainOutput_ValueOf_Test.java +++ b/src/test/java/org/assertj/db/output/impl/PlainOutput_ValueOf_Test.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.output.impl; @@ -18,9 +18,8 @@ /** * Test on the type got from {@code valueOf} method from {@code PlainOutput} enum. - * + * * @author Régis Pouiller - * */ public class PlainOutput_ValueOf_Test { diff --git a/src/test/java/org/assertj/db/type/AbstractDbElement_Exception_Test.java b/src/test/java/org/assertj/db/type/AbstractDbElement_Exception_Test.java index 05d27ec2..8e47f1b9 100644 --- a/src/test/java/org/assertj/db/type/AbstractDbElement_Exception_Test.java +++ b/src/test/java/org/assertj/db/type/AbstractDbElement_Exception_Test.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.type; @@ -23,9 +23,8 @@ /** * Tests on the exceptions of {@code AbstractDbElement} - * + * * @author Régis Pouiller - * */ public class AbstractDbElement_Exception_Test extends AbstractTest { @@ -40,7 +39,7 @@ public void should_fail_because_getCatalog_throws_an_SQLException() { @Override public String getCatalog() throws SQLException { throw new SQLException("test"); - } + } }); fail("An exception must be raised"); } catch (SQLException exception) { @@ -50,17 +49,18 @@ public String getCatalog() throws SQLException { /** * Tests if returns {@code null} because {@code getCatalog} throws an Exception. - * @throws SQLException + * + * @throws SQLException */ @Test public void test_if_returns_null_because_getCatalog_throws_an_Exception() throws SQLException { String catalog = AbstractDbElement.getCatalog(new DefaultConnection(null) { - @Override - public String getCatalog() throws SQLException { - throw new RuntimeException("test"); - } - }); + @Override + public String getCatalog() throws SQLException { + throw new RuntimeException("test"); + } + }); assertThat(catalog).isNull(); } @@ -75,7 +75,7 @@ public void should_fail_because_getSchema_throws_an_SQLException() { @Override public String getSchema() throws SQLException { throw new SQLException("test"); - } + } }); fail("An exception must be raised"); } catch (SQLException exception) { @@ -85,17 +85,18 @@ public String getSchema() throws SQLException { /** * Tests if returns {@code null} because {@code getSchema} throws an Exception. - * @throws SQLException + * + * @throws SQLException */ @Test public void test_if_returns_null_because_getSchema_throws_an_Exception() throws SQLException { String schema = AbstractDbElement.getSchema(new DefaultConnection(null) { - @Override - public String getCatalog() throws SQLException { - throw new RuntimeException("test"); - } - }); + @Override + public String getCatalog() throws SQLException { + throw new RuntimeException("test"); + } + }); assertThat(schema).isNull(); } } diff --git a/src/test/java/org/assertj/db/type/ChangeType_ValueOf_Test.java b/src/test/java/org/assertj/db/type/ChangeType_ValueOf_Test.java index d7394187..c3d687b3 100644 --- a/src/test/java/org/assertj/db/type/ChangeType_ValueOf_Test.java +++ b/src/test/java/org/assertj/db/type/ChangeType_ValueOf_Test.java @@ -8,19 +8,18 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.type; -import org.junit.Test; - import static org.assertj.core.api.Assertions.assertThat; +import org.junit.Test; + /** * Test on the type got from {@code valueOf} method from {@code ChangeType} enum. - * + * * @author Régis Pouiller - * */ public class ChangeType_ValueOf_Test { diff --git a/src/test/java/org/assertj/db/type/Change_Exception_Test.java b/src/test/java/org/assertj/db/type/Change_Exception_Test.java index 38aea01f..5fbf6054 100644 --- a/src/test/java/org/assertj/db/type/Change_Exception_Test.java +++ b/src/test/java/org/assertj/db/type/Change_Exception_Test.java @@ -8,21 +8,20 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.type; -import org.assertj.db.common.AbstractTest; -import org.junit.Test; - import static java.util.Collections.singletonList; import static org.assertj.core.api.Assertions.assertThatThrownBy; +import org.assertj.db.common.AbstractTest; +import org.junit.Test; + /** * Tests on the exceptions of Change * * @author Régis Pouiller - * */ public class Change_Exception_Test extends AbstractTest { @@ -36,9 +35,9 @@ public void should_fail_because_datatype_must_be_not_null() throws Exception { Row end = getRow(singletonList(""), singletonList(""), singletonList(getValue(null, null))); assertThatThrownBy(() -> getChange(null, "name", ChangeType.CREATION, start, end)) - .isInstanceOf(Exception.class) - .getCause() - .hasMessage("The type of the data must be not null"); + .isInstanceOf(Exception.class) + .getCause() + .hasMessage("The type of the data must be not null"); } /** @@ -51,8 +50,8 @@ public void should_fail_because_dataname_must_be_not_null() throws Exception { Row end = getRow(singletonList(""), singletonList(""), singletonList(getValue(null, null))); assertThatThrownBy(() -> getChange(DataType.TABLE, null, ChangeType.CREATION, start, end)) - .isInstanceOf(Exception.class) - .getCause() - .hasMessage("The name of the data must be not null"); + .isInstanceOf(Exception.class) + .getCause() + .hasMessage("The name of the data must be not null"); } } diff --git a/src/test/java/org/assertj/db/type/Change_GetDataType_Test.java b/src/test/java/org/assertj/db/type/Change_GetDataType_Test.java index 887485e5..f15a8855 100644 --- a/src/test/java/org/assertj/db/type/Change_GetDataType_Test.java +++ b/src/test/java/org/assertj/db/type/Change_GetDataType_Test.java @@ -8,21 +8,20 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.type; +import static org.assertj.core.api.Assertions.assertThat; + import org.assertj.db.common.AbstractTest; import org.assertj.db.common.NeedReload; import org.junit.Test; -import static org.assertj.core.api.Assertions.assertThat; - /** * Tests on the {@code getDataType} method. * * @author Régis Pouiller. - * */ public class Change_GetDataType_Test extends AbstractTest { diff --git a/src/test/java/org/assertj/db/type/Changes_Constructor_Test.java b/src/test/java/org/assertj/db/type/Changes_Constructor_Test.java index da6e7802..9790b047 100644 --- a/src/test/java/org/assertj/db/type/Changes_Constructor_Test.java +++ b/src/test/java/org/assertj/db/type/Changes_Constructor_Test.java @@ -8,20 +8,19 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.type; +import static org.assertj.core.api.Assertions.assertThat; + import org.assertj.db.common.AbstractTest; import org.junit.Test; -import static org.assertj.core.api.Assertions.assertThat; - /** * Tests on the constructors of Changes - * + * * @author Régis Pouiller - * */ public class Changes_Constructor_Test extends AbstractTest { diff --git a/src/test/java/org/assertj/db/type/Changes_Exception_Test.java b/src/test/java/org/assertj/db/type/Changes_Exception_Test.java index 5fd20ac0..d3976a17 100644 --- a/src/test/java/org/assertj/db/type/Changes_Exception_Test.java +++ b/src/test/java/org/assertj/db/type/Changes_Exception_Test.java @@ -8,10 +8,17 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.type; +import java.sql.Connection; +import java.sql.DatabaseMetaData; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import javax.sql.DataSource; + import org.assertj.db.common.AbstractTest; import org.assertj.db.common.DefaultConnection; import org.assertj.db.common.DefaultDataSource; @@ -19,14 +26,10 @@ import org.assertj.db.exception.AssertJDBException; import org.junit.Test; -import javax.sql.DataSource; -import java.sql.*; - /** * Tests on the exceptions of Changes - * + * * @author Régis Pouiller - * */ public class Changes_Exception_Test extends AbstractTest { @@ -51,7 +54,7 @@ public void should_fail_because_connection_throws_exception_when_getting_tables( public Connection getConnection() throws SQLException { return new DefaultConnection(thisDataSource.getConnection()) { - + @Override public DatabaseMetaData getMetaData() throws SQLException { throw new SQLException(); diff --git a/src/test/java/org/assertj/db/type/Changes_GetChangesOfTable_Test.java b/src/test/java/org/assertj/db/type/Changes_GetChangesOfTable_Test.java index 73a6bc44..2f15ca14 100644 --- a/src/test/java/org/assertj/db/type/Changes_GetChangesOfTable_Test.java +++ b/src/test/java/org/assertj/db/type/Changes_GetChangesOfTable_Test.java @@ -8,25 +8,24 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.type; -import org.assertj.db.common.AbstractTest; -import org.assertj.db.common.NeedReload; -import org.junit.Test; +import static org.assertj.core.api.Assertions.assertThat; import java.math.BigDecimal; import java.sql.Date; import java.util.UUID; -import static org.assertj.core.api.Assertions.assertThat; +import org.assertj.db.common.AbstractTest; +import org.assertj.db.common.NeedReload; +import org.junit.Test; /** * Tests on the {@code getChangesOfTable} method. - * + * * @author Régis Pouiller. - * */ public class Changes_GetChangesOfTable_Test extends AbstractTest { @@ -38,9 +37,9 @@ public class Changes_GetChangesOfTable_Test extends AbstractTest { public void test_getChangesOfTable() { Changes changesSource = new Changes(source); Changes changesRequest = new Changes(new Request(source, - "select interpretation.id, character, movie.title, actor.name " - + " from interpretation, movie, actor " + " where interpretation.id_movie = movie.id " - + " and interpretation.id_actor = actor.id ").setPksName("id")); + "select interpretation.id, character, movie.title, actor.name " + + " from interpretation, movie, actor " + " where interpretation.id_movie = movie.id " + + " and interpretation.id_actor = actor.id ").setPksName("id")); changesRequest.setStartPointNow(); changesSource.setStartPointNow(); @@ -78,7 +77,7 @@ public void test_getChangesOfTable() { assertThat(changesActor.getChangesList().get(0).getDataName()).isEqualTo("ACTOR"); assertThat(changesActor.getChangesList().get(0).getChangeType()).isEqualTo(ChangeType.CREATION); assertThat(changesActor.getChangesList().get(0).getColumnsNameList()).containsExactly("ID", "NAME", "FIRSTNAME", - "BIRTH", "ACTOR_IMDB"); + "BIRTH", "ACTOR_IMDB"); assertThat(changesActor.getChangesList().get(0).getRowAtStartPoint()).isNull(); assertThat(changesActor.getChangesList().get(0).getRowAtEndPoint().getValuesList().get(0).getValue()).isEqualTo(new BigDecimal(4)); assertThat(changesActor.getChangesList().get(0).getRowAtEndPoint().getValuesList().get(1).getValue()).isEqualTo("Murray"); @@ -88,7 +87,7 @@ public void test_getChangesOfTable() { assertThat(changesActor.getChangesList().get(1).getDataName()).isEqualTo("ACTOR"); assertThat(changesActor.getChangesList().get(1).getChangeType()).isEqualTo(ChangeType.MODIFICATION); assertThat(changesActor.getChangesList().get(1).getColumnsNameList()).containsExactly("ID", "NAME", "FIRSTNAME", - "BIRTH", "ACTOR_IMDB"); + "BIRTH", "ACTOR_IMDB"); assertThat(changesActor.getChangesList().get(1).getRowAtStartPoint().getValuesList().get(0).getValue()).isEqualTo(new BigDecimal(1)); assertThat(changesActor.getChangesList().get(1).getRowAtStartPoint().getValuesList().get(1).getValue()).isEqualTo("Weaver"); assertThat(changesActor.getChangesList().get(1).getRowAtStartPoint().getValuesList().get(2).getValue()).isEqualTo("Sigourney"); @@ -102,7 +101,7 @@ public void test_getChangesOfTable() { assertThat(changesActor.getChangesList().get(2).getDataName()).isEqualTo("ACTOR"); assertThat(changesActor.getChangesList().get(2).getChangeType()).isEqualTo(ChangeType.DELETION); assertThat(changesActor.getChangesList().get(2).getColumnsNameList()).containsExactly("ID", "NAME", "FIRSTNAME", - "BIRTH", "ACTOR_IMDB"); + "BIRTH", "ACTOR_IMDB"); assertThat(changesActor.getChangesList().get(2).getRowAtStartPoint().getValuesList().get(0).getValue()).isEqualTo(new BigDecimal(3)); assertThat(changesActor.getChangesList().get(2).getRowAtStartPoint().getValuesList().get(1).getValue()).isEqualTo("Worthington"); assertThat(changesActor.getChangesList().get(2).getRowAtStartPoint().getValuesList().get(2).getValue()).isEqualTo("Sam"); @@ -110,35 +109,35 @@ public void test_getChangesOfTable() { assertThat(changesActor.getChangesList().get(2).getRowAtStartPoint().getValuesList().get(4).getValue()).isEqualTo(UUID.fromString("d735221b-5de5-4112-aa1e-49090cb75ada")); assertThat(changesActor.getChangesList().get(2).getRowAtEndPoint()).isNull(); - Changes changesInterpretation = changesSource.getChangesOfTable("interpretation"); - assertThat(changesInterpretation.getChangesList()).hasSize(3); - assertThat(changesInterpretation.getChangesList().get(0).getDataName()).isEqualTo("INTERPRETATION"); - assertThat(changesInterpretation.getChangesList().get(0).getChangeType()).isEqualTo(ChangeType.CREATION); - assertThat(changesInterpretation.getChangesList().get(0).getColumnsNameList()).containsExactly("ID", "ID_MOVIE", "ID_ACTOR", "CHARACTER"); - assertThat(changesInterpretation.getChangesList().get(0).getRowAtStartPoint()).isNull(); - assertThat(changesInterpretation.getChangesList().get(0).getRowAtEndPoint().getValuesList().get(0).getValue()).isEqualTo(new BigDecimal(6)); + Changes changesInterpretation = changesSource.getChangesOfTable("interpretation"); + assertThat(changesInterpretation.getChangesList()).hasSize(3); + assertThat(changesInterpretation.getChangesList().get(0).getDataName()).isEqualTo("INTERPRETATION"); + assertThat(changesInterpretation.getChangesList().get(0).getChangeType()).isEqualTo(ChangeType.CREATION); + assertThat(changesInterpretation.getChangesList().get(0).getColumnsNameList()).containsExactly("ID", "ID_MOVIE", "ID_ACTOR", "CHARACTER"); + assertThat(changesInterpretation.getChangesList().get(0).getRowAtStartPoint()).isNull(); + assertThat(changesInterpretation.getChangesList().get(0).getRowAtEndPoint().getValuesList().get(0).getValue()).isEqualTo(new BigDecimal(6)); assertThat(changesInterpretation.getChangesList().get(0).getRowAtEndPoint().getValuesList().get(1).getValue()).isEqualTo(new BigDecimal(4)); assertThat(changesInterpretation.getChangesList().get(0).getRowAtEndPoint().getValuesList().get(2).getValue()).isEqualTo(new BigDecimal(4)); assertThat(changesInterpretation.getChangesList().get(0).getRowAtEndPoint().getValuesList().get(3).getValue()).isEqualTo("Dr Peter Venkman"); - assertThat(changesInterpretation.getChangesList().get(1).getDataName()).isEqualTo("INTERPRETATION"); - assertThat(changesInterpretation.getChangesList().get(1).getChangeType()).isEqualTo(ChangeType.MODIFICATION); - assertThat(changesInterpretation.getChangesList().get(1).getColumnsNameList()).containsExactly("ID", "ID_MOVIE", "ID_ACTOR", "CHARACTER"); - assertThat(changesInterpretation.getChangesList().get(1).getRowAtStartPoint().getValuesList().get(0).getValue()).isEqualTo(new BigDecimal(3)); + assertThat(changesInterpretation.getChangesList().get(1).getDataName()).isEqualTo("INTERPRETATION"); + assertThat(changesInterpretation.getChangesList().get(1).getChangeType()).isEqualTo(ChangeType.MODIFICATION); + assertThat(changesInterpretation.getChangesList().get(1).getColumnsNameList()).containsExactly("ID", "ID_MOVIE", "ID_ACTOR", "CHARACTER"); + assertThat(changesInterpretation.getChangesList().get(1).getRowAtStartPoint().getValuesList().get(0).getValue()).isEqualTo(new BigDecimal(3)); assertThat(changesInterpretation.getChangesList().get(1).getRowAtStartPoint().getValuesList().get(1).getValue()).isEqualTo(new BigDecimal(3)); assertThat(changesInterpretation.getChangesList().get(1).getRowAtStartPoint().getValuesList().get(2).getValue()).isEqualTo(new BigDecimal(1)); assertThat(changesInterpretation.getChangesList().get(1).getRowAtStartPoint().getValuesList().get(3).getValue()).isEqualTo("Dr Grace Augustine"); - assertThat(changesInterpretation.getChangesList().get(1).getRowAtEndPoint().getValuesList().get(0).getValue()).isEqualTo(new BigDecimal(3)); + assertThat(changesInterpretation.getChangesList().get(1).getRowAtEndPoint().getValuesList().get(0).getValue()).isEqualTo(new BigDecimal(3)); assertThat(changesInterpretation.getChangesList().get(1).getRowAtEndPoint().getValuesList().get(1).getValue()).isEqualTo(new BigDecimal(3)); assertThat(changesInterpretation.getChangesList().get(1).getRowAtEndPoint().getValuesList().get(2).getValue()).isEqualTo(new BigDecimal(1)); assertThat(changesInterpretation.getChangesList().get(1).getRowAtEndPoint().getValuesList().get(3).getValue()).isEqualTo("Doctor Grace Augustine"); - assertThat(changesInterpretation.getChangesList().get(2).getDataName()).isEqualTo("INTERPRETATION"); - assertThat(changesInterpretation.getChangesList().get(2).getChangeType()).isEqualTo(ChangeType.DELETION); - assertThat(changesInterpretation.getChangesList().get(2).getColumnsNameList()).containsExactly("ID", "ID_MOVIE", "ID_ACTOR", "CHARACTER"); - assertThat(changesInterpretation.getChangesList().get(2).getRowAtStartPoint().getValuesList().get(0).getValue()).isEqualTo(new BigDecimal(5)); + assertThat(changesInterpretation.getChangesList().get(2).getDataName()).isEqualTo("INTERPRETATION"); + assertThat(changesInterpretation.getChangesList().get(2).getChangeType()).isEqualTo(ChangeType.DELETION); + assertThat(changesInterpretation.getChangesList().get(2).getColumnsNameList()).containsExactly("ID", "ID_MOVIE", "ID_ACTOR", "CHARACTER"); + assertThat(changesInterpretation.getChangesList().get(2).getRowAtStartPoint().getValuesList().get(0).getValue()).isEqualTo(new BigDecimal(5)); assertThat(changesInterpretation.getChangesList().get(2).getRowAtStartPoint().getValuesList().get(1).getValue()).isEqualTo(new BigDecimal(3)); assertThat(changesInterpretation.getChangesList().get(2).getRowAtStartPoint().getValuesList().get(2).getValue()).isEqualTo(new BigDecimal(3)); assertThat(changesInterpretation.getChangesList().get(2).getRowAtStartPoint().getValuesList().get(3).getValue()).isEqualTo("Jake Sully"); - assertThat(changesInterpretation.getChangesList().get(2).getRowAtEndPoint()).isNull(); + assertThat(changesInterpretation.getChangesList().get(2).getRowAtEndPoint()).isNull(); assertThat(changesRequest.getChangesOfTable("movie").getChangesList()).hasSize(0); } diff --git a/src/test/java/org/assertj/db/type/Changes_GetChangesOfType_Test.java b/src/test/java/org/assertj/db/type/Changes_GetChangesOfType_Test.java index 199b9690..d95f5d4d 100644 --- a/src/test/java/org/assertj/db/type/Changes_GetChangesOfType_Test.java +++ b/src/test/java/org/assertj/db/type/Changes_GetChangesOfType_Test.java @@ -8,179 +8,178 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.type; -import org.assertj.db.common.AbstractTest; -import org.assertj.db.common.NeedReload; -import org.junit.Test; +import static org.assertj.core.api.Assertions.assertThat; import java.math.BigDecimal; import java.sql.Date; import java.util.UUID; -import static org.assertj.core.api.Assertions.assertThat; +import org.assertj.db.common.AbstractTest; +import org.assertj.db.common.NeedReload; +import org.junit.Test; /** * Tests on the {@code getChangesOfType} method. - * + * * @author Régis Pouiller. - * */ public class Changes_GetChangesOfType_Test extends AbstractTest { - /** - * This method test when getting changes of table. - */ - @Test - @NeedReload - public void test_getChangesOfTable() { - Changes changesSource = new Changes(source); - Changes changesRequest = new Changes(new Request(source, - "select interpretation.id, character, movie.title, actor.name " - + " from interpretation, movie, actor " + " where interpretation.id_movie = movie.id " - + " and interpretation.id_actor = actor.id ").setPksName("id")); + /** + * This method test when getting changes of table. + */ + @Test + @NeedReload + public void test_getChangesOfTable() { + Changes changesSource = new Changes(source); + Changes changesRequest = new Changes(new Request(source, + "select interpretation.id, character, movie.title, actor.name " + + " from interpretation, movie, actor " + " where interpretation.id_movie = movie.id " + + " and interpretation.id_actor = actor.id ").setPksName("id")); - changesRequest.setStartPointNow(); - changesSource.setStartPointNow(); - updateChangesForTests(); - changesRequest.setEndPointNow(); - changesSource.setEndPointNow(); + changesRequest.setStartPointNow(); + changesSource.setStartPointNow(); + updateChangesForTests(); + changesRequest.setEndPointNow(); + changesSource.setEndPointNow(); - assertThat(changesSource.getChangesList()).hasSize(8); + assertThat(changesSource.getChangesList()).hasSize(8); - Changes changesCreation = changesSource.getChangesOfType(ChangeType.CREATION); - assertThat(changesCreation.getChangesList()).hasSize(3); - assertThat(changesCreation.getChangesList().get(0).getDataName()).isEqualTo("ACTOR"); - assertThat(changesCreation.getChangesList().get(0).getChangeType()).isEqualTo(ChangeType.CREATION); - assertThat(changesCreation.getChangesList().get(0).getColumnsNameList()).containsExactly("ID", "NAME", "FIRSTNAME", - "BIRTH", "ACTOR_IMDB"); - assertThat(changesCreation.getChangesList().get(0).getRowAtStartPoint()).isNull(); - assertThat(changesCreation.getChangesList().get(0).getRowAtEndPoint().getValuesList().get(0).getValue()).isEqualTo(new BigDecimal(4)); - assertThat(changesCreation.getChangesList().get(0).getRowAtEndPoint().getValuesList().get(1).getValue()).isEqualTo("Murray"); - assertThat(changesCreation.getChangesList().get(0).getRowAtEndPoint().getValuesList().get(2).getValue()).isEqualTo("Bill"); - assertThat(changesCreation.getChangesList().get(0).getRowAtEndPoint().getValuesList().get(3).getValue()).isEqualTo(Date.valueOf("1950-09-21")); - assertThat(changesCreation.getChangesList().get(0).getRowAtEndPoint().getValuesList().get(4).getValue()).isEqualTo(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")); - assertThat(changesCreation.getChangesList().get(1).getDataName()).isEqualTo("INTERPRETATION"); - assertThat(changesCreation.getChangesList().get(1).getChangeType()).isEqualTo(ChangeType.CREATION); - assertThat(changesCreation.getChangesList().get(1).getColumnsNameList()).containsExactly("ID", "ID_MOVIE", "ID_ACTOR", "CHARACTER"); - assertThat(changesCreation.getChangesList().get(1).getRowAtStartPoint()).isNull(); - assertThat(changesCreation.getChangesList().get(1).getRowAtEndPoint().getValuesList().get(0).getValue()).isEqualTo(new BigDecimal(6)); - assertThat(changesCreation.getChangesList().get(1).getRowAtEndPoint().getValuesList().get(1).getValue()).isEqualTo(new BigDecimal(4)); - assertThat(changesCreation.getChangesList().get(1).getRowAtEndPoint().getValuesList().get(2).getValue()).isEqualTo(new BigDecimal(4)); - assertThat(changesCreation.getChangesList().get(1).getRowAtEndPoint().getValuesList().get(3).getValue()).isEqualTo("Dr Peter Venkman"); - assertThat(changesCreation.getChangesList().get(2).getDataName()).isEqualTo("MOVIE"); - assertThat(changesCreation.getChangesList().get(2).getChangeType()).isEqualTo(ChangeType.CREATION); - assertThat(changesCreation.getChangesList().get(2).getColumnsNameList()).containsExactly("ID", "TITLE", "YEAR", "MOVIE_IMDB"); - assertThat(changesCreation.getChangesList().get(2).getRowAtStartPoint()).isNull(); - assertThat(changesCreation.getChangesList().get(2).getRowAtEndPoint().getValuesList().get(0).getValue()).isEqualTo(new BigDecimal(4)); - assertThat(changesCreation.getChangesList().get(2).getRowAtEndPoint().getValuesList().get(1).getValue()).isEqualTo("Ghostbusters"); - assertThat(changesCreation.getChangesList().get(2).getRowAtEndPoint().getValuesList().get(2).getValue()).isEqualTo(new BigDecimal(1984)); - assertThat(changesCreation.getChangesList().get(2).getRowAtEndPoint().getValuesList().get(3).getValue()).isEqualTo(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")); + Changes changesCreation = changesSource.getChangesOfType(ChangeType.CREATION); + assertThat(changesCreation.getChangesList()).hasSize(3); + assertThat(changesCreation.getChangesList().get(0).getDataName()).isEqualTo("ACTOR"); + assertThat(changesCreation.getChangesList().get(0).getChangeType()).isEqualTo(ChangeType.CREATION); + assertThat(changesCreation.getChangesList().get(0).getColumnsNameList()).containsExactly("ID", "NAME", "FIRSTNAME", + "BIRTH", "ACTOR_IMDB"); + assertThat(changesCreation.getChangesList().get(0).getRowAtStartPoint()).isNull(); + assertThat(changesCreation.getChangesList().get(0).getRowAtEndPoint().getValuesList().get(0).getValue()).isEqualTo(new BigDecimal(4)); + assertThat(changesCreation.getChangesList().get(0).getRowAtEndPoint().getValuesList().get(1).getValue()).isEqualTo("Murray"); + assertThat(changesCreation.getChangesList().get(0).getRowAtEndPoint().getValuesList().get(2).getValue()).isEqualTo("Bill"); + assertThat(changesCreation.getChangesList().get(0).getRowAtEndPoint().getValuesList().get(3).getValue()).isEqualTo(Date.valueOf("1950-09-21")); + assertThat(changesCreation.getChangesList().get(0).getRowAtEndPoint().getValuesList().get(4).getValue()).isEqualTo(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")); + assertThat(changesCreation.getChangesList().get(1).getDataName()).isEqualTo("INTERPRETATION"); + assertThat(changesCreation.getChangesList().get(1).getChangeType()).isEqualTo(ChangeType.CREATION); + assertThat(changesCreation.getChangesList().get(1).getColumnsNameList()).containsExactly("ID", "ID_MOVIE", "ID_ACTOR", "CHARACTER"); + assertThat(changesCreation.getChangesList().get(1).getRowAtStartPoint()).isNull(); + assertThat(changesCreation.getChangesList().get(1).getRowAtEndPoint().getValuesList().get(0).getValue()).isEqualTo(new BigDecimal(6)); + assertThat(changesCreation.getChangesList().get(1).getRowAtEndPoint().getValuesList().get(1).getValue()).isEqualTo(new BigDecimal(4)); + assertThat(changesCreation.getChangesList().get(1).getRowAtEndPoint().getValuesList().get(2).getValue()).isEqualTo(new BigDecimal(4)); + assertThat(changesCreation.getChangesList().get(1).getRowAtEndPoint().getValuesList().get(3).getValue()).isEqualTo("Dr Peter Venkman"); + assertThat(changesCreation.getChangesList().get(2).getDataName()).isEqualTo("MOVIE"); + assertThat(changesCreation.getChangesList().get(2).getChangeType()).isEqualTo(ChangeType.CREATION); + assertThat(changesCreation.getChangesList().get(2).getColumnsNameList()).containsExactly("ID", "TITLE", "YEAR", "MOVIE_IMDB"); + assertThat(changesCreation.getChangesList().get(2).getRowAtStartPoint()).isNull(); + assertThat(changesCreation.getChangesList().get(2).getRowAtEndPoint().getValuesList().get(0).getValue()).isEqualTo(new BigDecimal(4)); + assertThat(changesCreation.getChangesList().get(2).getRowAtEndPoint().getValuesList().get(1).getValue()).isEqualTo("Ghostbusters"); + assertThat(changesCreation.getChangesList().get(2).getRowAtEndPoint().getValuesList().get(2).getValue()).isEqualTo(new BigDecimal(1984)); + assertThat(changesCreation.getChangesList().get(2).getRowAtEndPoint().getValuesList().get(3).getValue()).isEqualTo(UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")); - Changes changesModification = changesSource.getChangesOfType(ChangeType.MODIFICATION); - assertThat(changesModification.getChangesList()).hasSize(3); - assertThat(changesModification.getChangesList().get(0).getDataName()).isEqualTo("ACTOR"); - assertThat(changesModification.getChangesList().get(0).getChangeType()).isEqualTo(ChangeType.MODIFICATION); - assertThat(changesModification.getChangesList().get(0).getColumnsNameList()).containsExactly("ID", "NAME", "FIRSTNAME", - "BIRTH", "ACTOR_IMDB"); - assertThat(changesModification.getChangesList().get(0).getRowAtStartPoint().getValuesList().get(0).getValue()).isEqualTo(new BigDecimal(1)); - assertThat(changesModification.getChangesList().get(0).getRowAtStartPoint().getValuesList().get(1).getValue()).isEqualTo("Weaver"); - assertThat(changesModification.getChangesList().get(0).getRowAtStartPoint().getValuesList().get(2).getValue()).isEqualTo("Sigourney"); - assertThat(changesModification.getChangesList().get(0).getRowAtStartPoint().getValuesList().get(3).getValue()).isEqualTo(Date.valueOf("1949-10-08")); - assertThat(changesModification.getChangesList().get(0).getRowAtStartPoint().getValuesList().get(4).getValue()).isEqualTo(UUID.fromString("30b443ae-c0c9-4790-9bec-ce1380808435")); - assertThat(changesModification.getChangesList().get(0).getRowAtEndPoint().getValuesList().get(0).getValue()).isEqualTo(new BigDecimal(1)); - assertThat(changesModification.getChangesList().get(0).getRowAtEndPoint().getValuesList().get(1).getValue()).isEqualTo("Weaver"); - assertThat(changesModification.getChangesList().get(0).getRowAtEndPoint().getValuesList().get(2).getValue()).isEqualTo("Susan Alexandra"); - assertThat(changesModification.getChangesList().get(0).getRowAtEndPoint().getValuesList().get(3).getValue()).isEqualTo(Date.valueOf("1949-10-08")); - assertThat(changesModification.getChangesList().get(0).getRowAtEndPoint().getValuesList().get(4).getValue()).isEqualTo(UUID.fromString("30b443ae-c0c9-4790-9bec-ce1380808435")); - assertThat(changesModification.getChangesList().get(1).getDataName()).isEqualTo("INTERPRETATION"); - assertThat(changesModification.getChangesList().get(1).getChangeType()).isEqualTo(ChangeType.MODIFICATION); - assertThat(changesModification.getChangesList().get(1).getColumnsNameList()).containsExactly("ID", "ID_MOVIE", "ID_ACTOR", "CHARACTER"); - assertThat(changesModification.getChangesList().get(1).getRowAtStartPoint().getValuesList().get(0).getValue()).isEqualTo(new BigDecimal(3)); - assertThat(changesModification.getChangesList().get(1).getRowAtStartPoint().getValuesList().get(1).getValue()).isEqualTo(new BigDecimal(3)); - assertThat(changesModification.getChangesList().get(1).getRowAtStartPoint().getValuesList().get(2).getValue()).isEqualTo(new BigDecimal(1)); - assertThat(changesModification.getChangesList().get(1).getRowAtStartPoint().getValuesList().get(3).getValue()).isEqualTo("Dr Grace Augustine"); - assertThat(changesModification.getChangesList().get(1).getRowAtEndPoint().getValuesList().get(0).getValue()).isEqualTo(new BigDecimal(3)); - assertThat(changesModification.getChangesList().get(1).getRowAtEndPoint().getValuesList().get(0).getValue()).isEqualTo(new BigDecimal(3)); - assertThat(changesModification.getChangesList().get(1).getRowAtEndPoint().getValuesList().get(2).getValue()).isEqualTo(new BigDecimal(1)); - assertThat(changesModification.getChangesList().get(1).getRowAtEndPoint().getValuesList().get(3).getValue()).isEqualTo("Doctor Grace Augustine"); - assertThat(changesModification.getChangesList().get(2).getDataName()).isEqualTo("MOVIE"); - assertThat(changesModification.getChangesList().get(2).getChangeType()).isEqualTo(ChangeType.MODIFICATION); - assertThat(changesModification.getChangesList().get(2).getColumnsNameList()).containsExactly("ID", "TITLE", "YEAR", "MOVIE_IMDB"); - assertThat(changesModification.getChangesList().get(2).getRowAtStartPoint().getValuesList().get(0).getValue()).isEqualTo(new BigDecimal(3)); - assertThat(changesModification.getChangesList().get(2).getRowAtStartPoint().getValuesList().get(1).getValue()).isEqualTo("Avatar"); - assertThat(changesModification.getChangesList().get(2).getRowAtStartPoint().getValuesList().get(2).getValue()).isEqualTo(new BigDecimal(2009)); - assertThat(changesModification.getChangesList().get(2).getRowAtStartPoint().getValuesList().get(3).getValue()).isEqualTo(UUID.fromString("D735221B-5DE5-4112-AA1E-49090CB75ADA")); - assertThat(changesModification.getChangesList().get(2).getRowAtEndPoint().getValuesList().get(0).getValue()).isEqualTo(new BigDecimal(3)); - assertThat(changesModification.getChangesList().get(2).getRowAtEndPoint().getValuesList().get(1).getValue()).isEqualTo("The Avatar"); - assertThat(changesModification.getChangesList().get(2).getRowAtEndPoint().getValuesList().get(2).getValue()).isEqualTo(new BigDecimal(2009)); - assertThat(changesModification.getChangesList().get(2).getRowAtEndPoint().getValuesList().get(3).getValue()).isEqualTo(UUID.fromString("D735221B-5DE5-4112-AA1E-49090CB75ADA")); + Changes changesModification = changesSource.getChangesOfType(ChangeType.MODIFICATION); + assertThat(changesModification.getChangesList()).hasSize(3); + assertThat(changesModification.getChangesList().get(0).getDataName()).isEqualTo("ACTOR"); + assertThat(changesModification.getChangesList().get(0).getChangeType()).isEqualTo(ChangeType.MODIFICATION); + assertThat(changesModification.getChangesList().get(0).getColumnsNameList()).containsExactly("ID", "NAME", "FIRSTNAME", + "BIRTH", "ACTOR_IMDB"); + assertThat(changesModification.getChangesList().get(0).getRowAtStartPoint().getValuesList().get(0).getValue()).isEqualTo(new BigDecimal(1)); + assertThat(changesModification.getChangesList().get(0).getRowAtStartPoint().getValuesList().get(1).getValue()).isEqualTo("Weaver"); + assertThat(changesModification.getChangesList().get(0).getRowAtStartPoint().getValuesList().get(2).getValue()).isEqualTo("Sigourney"); + assertThat(changesModification.getChangesList().get(0).getRowAtStartPoint().getValuesList().get(3).getValue()).isEqualTo(Date.valueOf("1949-10-08")); + assertThat(changesModification.getChangesList().get(0).getRowAtStartPoint().getValuesList().get(4).getValue()).isEqualTo(UUID.fromString("30b443ae-c0c9-4790-9bec-ce1380808435")); + assertThat(changesModification.getChangesList().get(0).getRowAtEndPoint().getValuesList().get(0).getValue()).isEqualTo(new BigDecimal(1)); + assertThat(changesModification.getChangesList().get(0).getRowAtEndPoint().getValuesList().get(1).getValue()).isEqualTo("Weaver"); + assertThat(changesModification.getChangesList().get(0).getRowAtEndPoint().getValuesList().get(2).getValue()).isEqualTo("Susan Alexandra"); + assertThat(changesModification.getChangesList().get(0).getRowAtEndPoint().getValuesList().get(3).getValue()).isEqualTo(Date.valueOf("1949-10-08")); + assertThat(changesModification.getChangesList().get(0).getRowAtEndPoint().getValuesList().get(4).getValue()).isEqualTo(UUID.fromString("30b443ae-c0c9-4790-9bec-ce1380808435")); + assertThat(changesModification.getChangesList().get(1).getDataName()).isEqualTo("INTERPRETATION"); + assertThat(changesModification.getChangesList().get(1).getChangeType()).isEqualTo(ChangeType.MODIFICATION); + assertThat(changesModification.getChangesList().get(1).getColumnsNameList()).containsExactly("ID", "ID_MOVIE", "ID_ACTOR", "CHARACTER"); + assertThat(changesModification.getChangesList().get(1).getRowAtStartPoint().getValuesList().get(0).getValue()).isEqualTo(new BigDecimal(3)); + assertThat(changesModification.getChangesList().get(1).getRowAtStartPoint().getValuesList().get(1).getValue()).isEqualTo(new BigDecimal(3)); + assertThat(changesModification.getChangesList().get(1).getRowAtStartPoint().getValuesList().get(2).getValue()).isEqualTo(new BigDecimal(1)); + assertThat(changesModification.getChangesList().get(1).getRowAtStartPoint().getValuesList().get(3).getValue()).isEqualTo("Dr Grace Augustine"); + assertThat(changesModification.getChangesList().get(1).getRowAtEndPoint().getValuesList().get(0).getValue()).isEqualTo(new BigDecimal(3)); + assertThat(changesModification.getChangesList().get(1).getRowAtEndPoint().getValuesList().get(0).getValue()).isEqualTo(new BigDecimal(3)); + assertThat(changesModification.getChangesList().get(1).getRowAtEndPoint().getValuesList().get(2).getValue()).isEqualTo(new BigDecimal(1)); + assertThat(changesModification.getChangesList().get(1).getRowAtEndPoint().getValuesList().get(3).getValue()).isEqualTo("Doctor Grace Augustine"); + assertThat(changesModification.getChangesList().get(2).getDataName()).isEqualTo("MOVIE"); + assertThat(changesModification.getChangesList().get(2).getChangeType()).isEqualTo(ChangeType.MODIFICATION); + assertThat(changesModification.getChangesList().get(2).getColumnsNameList()).containsExactly("ID", "TITLE", "YEAR", "MOVIE_IMDB"); + assertThat(changesModification.getChangesList().get(2).getRowAtStartPoint().getValuesList().get(0).getValue()).isEqualTo(new BigDecimal(3)); + assertThat(changesModification.getChangesList().get(2).getRowAtStartPoint().getValuesList().get(1).getValue()).isEqualTo("Avatar"); + assertThat(changesModification.getChangesList().get(2).getRowAtStartPoint().getValuesList().get(2).getValue()).isEqualTo(new BigDecimal(2009)); + assertThat(changesModification.getChangesList().get(2).getRowAtStartPoint().getValuesList().get(3).getValue()).isEqualTo(UUID.fromString("D735221B-5DE5-4112-AA1E-49090CB75ADA")); + assertThat(changesModification.getChangesList().get(2).getRowAtEndPoint().getValuesList().get(0).getValue()).isEqualTo(new BigDecimal(3)); + assertThat(changesModification.getChangesList().get(2).getRowAtEndPoint().getValuesList().get(1).getValue()).isEqualTo("The Avatar"); + assertThat(changesModification.getChangesList().get(2).getRowAtEndPoint().getValuesList().get(2).getValue()).isEqualTo(new BigDecimal(2009)); + assertThat(changesModification.getChangesList().get(2).getRowAtEndPoint().getValuesList().get(3).getValue()).isEqualTo(UUID.fromString("D735221B-5DE5-4112-AA1E-49090CB75ADA")); - Changes changesDeletion = changesSource.getChangesOfType(ChangeType.DELETION); - assertThat(changesDeletion.getChangesList()).hasSize(2); - assertThat(changesDeletion.getChangesList().get(0).getDataName()).isEqualTo("ACTOR"); - assertThat(changesDeletion.getChangesList().get(0).getChangeType()).isEqualTo(ChangeType.DELETION); - assertThat(changesDeletion.getChangesList().get(0).getColumnsNameList()).containsExactly("ID", "NAME", "FIRSTNAME", - "BIRTH", "ACTOR_IMDB"); - assertThat(changesDeletion.getChangesList().get(0).getRowAtStartPoint().getValuesList().get(0).getValue()).isEqualTo(new BigDecimal(3)); - assertThat(changesDeletion.getChangesList().get(0).getRowAtStartPoint().getValuesList().get(1).getValue()).isEqualTo("Worthington"); - assertThat(changesDeletion.getChangesList().get(0).getRowAtStartPoint().getValuesList().get(2).getValue()).isEqualTo("Sam"); - assertThat(changesDeletion.getChangesList().get(0).getRowAtStartPoint().getValuesList().get(3).getValue()).isEqualTo(Date.valueOf("1976-08-02")); - assertThat(changesDeletion.getChangesList().get(0).getRowAtStartPoint().getValuesList().get(4).getValue()).isEqualTo(UUID.fromString("d735221b-5de5-4112-aa1e-49090cb75ada")); - assertThat(changesDeletion.getChangesList().get(0).getRowAtEndPoint()).isNull(); - assertThat(changesDeletion.getChangesList().get(1).getDataName()).isEqualTo("INTERPRETATION"); - assertThat(changesDeletion.getChangesList().get(1).getChangeType()).isEqualTo(ChangeType.DELETION); - assertThat(changesDeletion.getChangesList().get(1).getColumnsNameList()).containsExactly("ID", "ID_MOVIE", "ID_ACTOR", "CHARACTER"); - assertThat(changesDeletion.getChangesList().get(1).getRowAtStartPoint().getValuesList().get(0).getValue()) - .isEqualTo(new BigDecimal(5)); - assertThat(changesDeletion.getChangesList().get(1).getRowAtStartPoint().getValuesList().get(1).getValue()) - .isEqualTo(new BigDecimal(3)); - assertThat(changesDeletion.getChangesList().get(1).getRowAtStartPoint().getValuesList().get(2).getValue()) - .isEqualTo(new BigDecimal(3)); - assertThat(changesDeletion.getChangesList().get(1).getRowAtStartPoint().getValuesList().get(3).getValue()) - .isEqualTo("Jake Sully"); - assertThat(changesDeletion.getChangesList().get(1).getRowAtEndPoint()).isNull(); + Changes changesDeletion = changesSource.getChangesOfType(ChangeType.DELETION); + assertThat(changesDeletion.getChangesList()).hasSize(2); + assertThat(changesDeletion.getChangesList().get(0).getDataName()).isEqualTo("ACTOR"); + assertThat(changesDeletion.getChangesList().get(0).getChangeType()).isEqualTo(ChangeType.DELETION); + assertThat(changesDeletion.getChangesList().get(0).getColumnsNameList()).containsExactly("ID", "NAME", "FIRSTNAME", + "BIRTH", "ACTOR_IMDB"); + assertThat(changesDeletion.getChangesList().get(0).getRowAtStartPoint().getValuesList().get(0).getValue()).isEqualTo(new BigDecimal(3)); + assertThat(changesDeletion.getChangesList().get(0).getRowAtStartPoint().getValuesList().get(1).getValue()).isEqualTo("Worthington"); + assertThat(changesDeletion.getChangesList().get(0).getRowAtStartPoint().getValuesList().get(2).getValue()).isEqualTo("Sam"); + assertThat(changesDeletion.getChangesList().get(0).getRowAtStartPoint().getValuesList().get(3).getValue()).isEqualTo(Date.valueOf("1976-08-02")); + assertThat(changesDeletion.getChangesList().get(0).getRowAtStartPoint().getValuesList().get(4).getValue()).isEqualTo(UUID.fromString("d735221b-5de5-4112-aa1e-49090cb75ada")); + assertThat(changesDeletion.getChangesList().get(0).getRowAtEndPoint()).isNull(); + assertThat(changesDeletion.getChangesList().get(1).getDataName()).isEqualTo("INTERPRETATION"); + assertThat(changesDeletion.getChangesList().get(1).getChangeType()).isEqualTo(ChangeType.DELETION); + assertThat(changesDeletion.getChangesList().get(1).getColumnsNameList()).containsExactly("ID", "ID_MOVIE", "ID_ACTOR", "CHARACTER"); + assertThat(changesDeletion.getChangesList().get(1).getRowAtStartPoint().getValuesList().get(0).getValue()) + .isEqualTo(new BigDecimal(5)); + assertThat(changesDeletion.getChangesList().get(1).getRowAtStartPoint().getValuesList().get(1).getValue()) + .isEqualTo(new BigDecimal(3)); + assertThat(changesDeletion.getChangesList().get(1).getRowAtStartPoint().getValuesList().get(2).getValue()) + .isEqualTo(new BigDecimal(3)); + assertThat(changesDeletion.getChangesList().get(1).getRowAtStartPoint().getValuesList().get(3).getValue()) + .isEqualTo("Jake Sully"); + assertThat(changesDeletion.getChangesList().get(1).getRowAtEndPoint()).isNull(); - Changes changesRequestCreation = changesRequest.getChangesOfType(ChangeType.CREATION); - assertThat(changesRequestCreation.getChangesList()).hasSize(1); - assertThat(changesRequestCreation.getChangesList().get(0).getDataName()).isEqualTo("select interpretation.id, character, movie.title, actor.name from interpretation, movie, actor where interpretation.id_movie = movie.id and interpretation.id_actor = actor.id "); - assertThat(changesRequestCreation.getChangesList().get(0).getChangeType()).isEqualTo(ChangeType.CREATION); - assertThat(changesRequestCreation.getChangesList().get(0).getColumnsNameList()).containsExactly("ID", "CHARACTER", "TITLE", - "NAME"); - assertThat(changesRequestCreation.getChangesList().get(0).getRowAtStartPoint()).isNull(); - assertThat(changesRequestCreation.getChangesList().get(0).getRowAtEndPoint().getValuesList().get(0).getValue()).isEqualTo(new BigDecimal(6)); - assertThat(changesRequestCreation.getChangesList().get(0).getRowAtEndPoint().getValuesList().get(1).getValue()).isEqualTo("Dr Peter Venkman"); - assertThat(changesRequestCreation.getChangesList().get(0).getRowAtEndPoint().getValuesList().get(2).getValue()).isEqualTo("Ghostbusters"); - assertThat(changesRequestCreation.getChangesList().get(0).getRowAtEndPoint().getValuesList().get(3).getValue()).isEqualTo("Murray"); + Changes changesRequestCreation = changesRequest.getChangesOfType(ChangeType.CREATION); + assertThat(changesRequestCreation.getChangesList()).hasSize(1); + assertThat(changesRequestCreation.getChangesList().get(0).getDataName()).isEqualTo("select interpretation.id, character, movie.title, actor.name from interpretation, movie, actor where interpretation.id_movie = movie.id and interpretation.id_actor = actor.id "); + assertThat(changesRequestCreation.getChangesList().get(0).getChangeType()).isEqualTo(ChangeType.CREATION); + assertThat(changesRequestCreation.getChangesList().get(0).getColumnsNameList()).containsExactly("ID", "CHARACTER", "TITLE", + "NAME"); + assertThat(changesRequestCreation.getChangesList().get(0).getRowAtStartPoint()).isNull(); + assertThat(changesRequestCreation.getChangesList().get(0).getRowAtEndPoint().getValuesList().get(0).getValue()).isEqualTo(new BigDecimal(6)); + assertThat(changesRequestCreation.getChangesList().get(0).getRowAtEndPoint().getValuesList().get(1).getValue()).isEqualTo("Dr Peter Venkman"); + assertThat(changesRequestCreation.getChangesList().get(0).getRowAtEndPoint().getValuesList().get(2).getValue()).isEqualTo("Ghostbusters"); + assertThat(changesRequestCreation.getChangesList().get(0).getRowAtEndPoint().getValuesList().get(3).getValue()).isEqualTo("Murray"); - Changes changesRequestModification = changesRequest.getChangesOfType(ChangeType.MODIFICATION); - assertThat(changesRequestModification.getChangesList()).hasSize(1); - assertThat(changesRequestModification.getChangesList().get(0).getDataName()).isEqualTo("select interpretation.id, character, movie.title, actor.name from interpretation, movie, actor where interpretation.id_movie = movie.id and interpretation.id_actor = actor.id "); - assertThat(changesRequestModification.getChangesList().get(0).getChangeType()).isEqualTo(ChangeType.MODIFICATION); - assertThat(changesRequestModification.getChangesList().get(0).getColumnsNameList()).containsExactly("ID", "CHARACTER", "TITLE", - "NAME"); - assertThat(changesRequestModification.getChangesList().get(0).getRowAtStartPoint().getValuesList().get(0).getValue()).isEqualTo(new BigDecimal(3)); - assertThat(changesRequestModification.getChangesList().get(0).getRowAtStartPoint().getValuesList().get(1).getValue()).isEqualTo("Dr Grace Augustine"); - assertThat(changesRequestModification.getChangesList().get(0).getRowAtStartPoint().getValuesList().get(2).getValue()).isEqualTo("Avatar"); - assertThat(changesRequestModification.getChangesList().get(0).getRowAtStartPoint().getValuesList().get(3).getValue()).isEqualTo("Weaver"); - assertThat(changesRequestModification.getChangesList().get(0).getRowAtEndPoint().getValuesList().get(0).getValue()).isEqualTo(new BigDecimal(3)); - assertThat(changesRequestModification.getChangesList().get(0).getRowAtEndPoint().getValuesList().get(1).getValue()).isEqualTo("Doctor Grace Augustine"); - assertThat(changesRequestModification.getChangesList().get(0).getRowAtEndPoint().getValuesList().get(2).getValue()).isEqualTo("The Avatar"); - assertThat(changesRequestModification.getChangesList().get(0).getRowAtEndPoint().getValuesList().get(3).getValue()).isEqualTo("Weaver"); + Changes changesRequestModification = changesRequest.getChangesOfType(ChangeType.MODIFICATION); + assertThat(changesRequestModification.getChangesList()).hasSize(1); + assertThat(changesRequestModification.getChangesList().get(0).getDataName()).isEqualTo("select interpretation.id, character, movie.title, actor.name from interpretation, movie, actor where interpretation.id_movie = movie.id and interpretation.id_actor = actor.id "); + assertThat(changesRequestModification.getChangesList().get(0).getChangeType()).isEqualTo(ChangeType.MODIFICATION); + assertThat(changesRequestModification.getChangesList().get(0).getColumnsNameList()).containsExactly("ID", "CHARACTER", "TITLE", + "NAME"); + assertThat(changesRequestModification.getChangesList().get(0).getRowAtStartPoint().getValuesList().get(0).getValue()).isEqualTo(new BigDecimal(3)); + assertThat(changesRequestModification.getChangesList().get(0).getRowAtStartPoint().getValuesList().get(1).getValue()).isEqualTo("Dr Grace Augustine"); + assertThat(changesRequestModification.getChangesList().get(0).getRowAtStartPoint().getValuesList().get(2).getValue()).isEqualTo("Avatar"); + assertThat(changesRequestModification.getChangesList().get(0).getRowAtStartPoint().getValuesList().get(3).getValue()).isEqualTo("Weaver"); + assertThat(changesRequestModification.getChangesList().get(0).getRowAtEndPoint().getValuesList().get(0).getValue()).isEqualTo(new BigDecimal(3)); + assertThat(changesRequestModification.getChangesList().get(0).getRowAtEndPoint().getValuesList().get(1).getValue()).isEqualTo("Doctor Grace Augustine"); + assertThat(changesRequestModification.getChangesList().get(0).getRowAtEndPoint().getValuesList().get(2).getValue()).isEqualTo("The Avatar"); + assertThat(changesRequestModification.getChangesList().get(0).getRowAtEndPoint().getValuesList().get(3).getValue()).isEqualTo("Weaver"); - Changes changesRequestDeletion = changesRequest.getChangesOfType(ChangeType.DELETION); - assertThat(changesRequestDeletion.getChangesList()).hasSize(1); - assertThat(changesRequestDeletion.getChangesList().get(0).getDataName()).isEqualTo("select interpretation.id, character, movie.title, actor.name from interpretation, movie, actor where interpretation.id_movie = movie.id and interpretation.id_actor = actor.id "); - assertThat(changesRequestDeletion.getChangesList().get(0).getChangeType()).isEqualTo(ChangeType.DELETION); - assertThat(changesRequestDeletion.getChangesList().get(0).getColumnsNameList()).containsExactly("ID", "CHARACTER", "TITLE", - "NAME"); - assertThat(changesRequestDeletion.getChangesList().get(0).getRowAtStartPoint().getValuesList().get(0).getValue()).isEqualTo(new BigDecimal(5)); - assertThat(changesRequestDeletion.getChangesList().get(0).getRowAtStartPoint().getValuesList().get(1).getValue()).isEqualTo("Jake Sully"); - assertThat(changesRequestDeletion.getChangesList().get(0).getRowAtStartPoint().getValuesList().get(2).getValue()).isEqualTo("Avatar"); - assertThat(changesRequestDeletion.getChangesList().get(0).getRowAtStartPoint().getValuesList().get(3).getValue()).isEqualTo("Worthington"); - assertThat(changesRequestDeletion.getChangesList().get(0).getRowAtEndPoint()).isNull(); - } + Changes changesRequestDeletion = changesRequest.getChangesOfType(ChangeType.DELETION); + assertThat(changesRequestDeletion.getChangesList()).hasSize(1); + assertThat(changesRequestDeletion.getChangesList().get(0).getDataName()).isEqualTo("select interpretation.id, character, movie.title, actor.name from interpretation, movie, actor where interpretation.id_movie = movie.id and interpretation.id_actor = actor.id "); + assertThat(changesRequestDeletion.getChangesList().get(0).getChangeType()).isEqualTo(ChangeType.DELETION); + assertThat(changesRequestDeletion.getChangesList().get(0).getColumnsNameList()).containsExactly("ID", "CHARACTER", "TITLE", + "NAME"); + assertThat(changesRequestDeletion.getChangesList().get(0).getRowAtStartPoint().getValuesList().get(0).getValue()).isEqualTo(new BigDecimal(5)); + assertThat(changesRequestDeletion.getChangesList().get(0).getRowAtStartPoint().getValuesList().get(1).getValue()).isEqualTo("Jake Sully"); + assertThat(changesRequestDeletion.getChangesList().get(0).getRowAtStartPoint().getValuesList().get(2).getValue()).isEqualTo("Avatar"); + assertThat(changesRequestDeletion.getChangesList().get(0).getRowAtStartPoint().getValuesList().get(3).getValue()).isEqualTo("Worthington"); + assertThat(changesRequestDeletion.getChangesList().get(0).getRowAtEndPoint()).isNull(); + } } diff --git a/src/test/java/org/assertj/db/type/Changes_GetChanges_Test.java b/src/test/java/org/assertj/db/type/Changes_GetChanges_Test.java index e218536e..fd3aab9e 100644 --- a/src/test/java/org/assertj/db/type/Changes_GetChanges_Test.java +++ b/src/test/java/org/assertj/db/type/Changes_GetChanges_Test.java @@ -8,24 +8,23 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.type; -import org.assertj.db.common.AbstractTest; -import org.assertj.db.common.NeedReload; -import org.junit.Test; +import static org.assertj.core.api.Assertions.assertThat; import java.math.BigDecimal; import java.util.UUID; -import static org.assertj.core.api.Assertions.assertThat; +import org.assertj.db.common.AbstractTest; +import org.assertj.db.common.NeedReload; +import org.junit.Test; /** * Tests on the {@code getChangesOfTable} and {@code getChangesOfType} methods together. - * + * * @author Régis Pouiller. - * */ public class Changes_GetChanges_Test extends AbstractTest { @@ -51,13 +50,13 @@ public void test_getChangesOfTableAndType() { assertThat(changesMovieCreation.getChangesList().get(0).getColumnsNameList()).containsExactly("ID", "TITLE", "YEAR", "MOVIE_IMDB"); assertThat(changesMovieCreation.getChangesList().get(0).getRowAtStartPoint()).isNull(); assertThat(changesMovieCreation.getChangesList().get(0).getRowAtEndPoint().getValuesList().get(0).getValue()).isEqualTo( - new BigDecimal(4)); + new BigDecimal(4)); assertThat(changesMovieCreation.getChangesList().get(0).getRowAtEndPoint().getValuesList().get(1).getValue()).isEqualTo( - "Ghostbusters"); + "Ghostbusters"); assertThat(changesMovieCreation.getChangesList().get(0).getRowAtEndPoint().getValuesList().get(2).getValue()).isEqualTo( - new BigDecimal(1984)); + new BigDecimal(1984)); assertThat(changesMovieCreation.getChangesList().get(0).getRowAtEndPoint().getValuesList().get(3).getValue()).isEqualTo( - UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")); + UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")); } /** @@ -82,12 +81,12 @@ public void test_getChangesOfTypeAndTable() { assertThat(changesCreationMovie.getChangesList().get(0).getColumnsNameList()).containsExactly("ID", "TITLE", "YEAR", "MOVIE_IMDB"); assertThat(changesCreationMovie.getChangesList().get(0).getRowAtStartPoint()).isNull(); assertThat(changesCreationMovie.getChangesList().get(0).getRowAtEndPoint().getValuesList().get(0).getValue()).isEqualTo( - new BigDecimal(4)); + new BigDecimal(4)); assertThat(changesCreationMovie.getChangesList().get(0).getRowAtEndPoint().getValuesList().get(1).getValue()).isEqualTo( - "Ghostbusters"); + "Ghostbusters"); assertThat(changesCreationMovie.getChangesList().get(0).getRowAtEndPoint().getValuesList().get(2).getValue()).isEqualTo( - new BigDecimal(1984)); + new BigDecimal(1984)); assertThat(changesCreationMovie.getChangesList().get(0).getRowAtEndPoint().getValuesList().get(3).getValue()).isEqualTo( - UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")); + UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")); } } diff --git a/src/test/java/org/assertj/db/type/Changes_Request_GetChangesList_Test.java b/src/test/java/org/assertj/db/type/Changes_Request_GetChangesList_Test.java index 18b599e9..b7a158f2 100644 --- a/src/test/java/org/assertj/db/type/Changes_Request_GetChangesList_Test.java +++ b/src/test/java/org/assertj/db/type/Changes_Request_GetChangesList_Test.java @@ -8,14 +8,11 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.type; -import org.assertj.db.api.Assertions; -import org.assertj.db.common.AbstractTest; -import org.assertj.db.common.NeedReload; -import org.junit.Test; +import static org.assertj.core.api.Assertions.assertThat; import java.math.BigDecimal; import java.sql.Date; @@ -24,13 +21,15 @@ import java.sql.Timestamp; import java.util.UUID; -import static org.assertj.core.api.Assertions.assertThat; +import org.assertj.db.api.Assertions; +import org.assertj.db.common.AbstractTest; +import org.assertj.db.common.NeedReload; +import org.junit.Test; /** * Tests on the list of changes on request. - * + * * @author Régis Pouiller. - * */ public class Changes_Request_GetChangesList_Test extends AbstractTest { @@ -47,7 +46,7 @@ public void test_when_there_is_no_change() { /** * This method test when there is no change found because it is another table. - * + * * @throws SQLException */ @Test @@ -62,7 +61,7 @@ public void test_when_there_is_no_change_found() throws SQLException { /** * This method test when there is a deletion change. - * + * * @throws SQLException */ @Test @@ -78,7 +77,7 @@ public void test_when_there_is_deletion_change() throws SQLException { assertThat(change.getDataName()).isEqualTo("select * from test2"); assertThat(change.getChangeType()).isEqualTo(ChangeType.DELETION); assertThat(change.getColumnsNameList()).containsExactly("VAR1", "VAR2", "VAR3", "VAR4", "VAR5", "VAR6", "VAR7", - "VAR8", "VAR9", "VAR10", "VAR11", "VAR12", "VAR13", "VAR14", "VAR15", "VAR16", "VAR17"); + "VAR8", "VAR9", "VAR10", "VAR11", "VAR12", "VAR13", "VAR14", "VAR15", "VAR16", "VAR17"); assertThat(change.getRowAtStartPoint().getValuesList().get(0).getValue()).isNull(); assertThat(change.getRowAtStartPoint().getValuesList().get(1).getValue()).isNull(); assertThat(change.getRowAtStartPoint().getValuesList().get(2).getValue()).isNull(); @@ -101,7 +100,7 @@ public void test_when_there_is_deletion_change() throws SQLException { /** * This method test when there is a creation change. - * + * * @throws SQLException */ @Test @@ -117,7 +116,7 @@ public void test_when_there_is_creation_change() throws SQLException { assertThat(change.getDataName()).isEqualTo("select * from test2"); assertThat(change.getChangeType()).isEqualTo(ChangeType.CREATION); assertThat(change.getColumnsNameList()).containsExactly("VAR1", "VAR2", "VAR3", "VAR4", "VAR5", "VAR6", "VAR7", - "VAR8", "VAR9", "VAR10", "VAR11", "VAR12", "VAR13", "VAR14", "VAR15", "VAR16", "VAR17"); + "VAR8", "VAR9", "VAR10", "VAR11", "VAR12", "VAR13", "VAR14", "VAR15", "VAR16", "VAR17"); assertThat(change.getRowAtStartPoint()).isNull(); assertThat(change.getRowAtEndPoint().getValuesList().get(0).getValue()).isEqualTo(200); assertThat(change.getRowAtEndPoint().getValuesList().get(1).getValue()).isNull(); @@ -140,7 +139,7 @@ public void test_when_there_is_creation_change() throws SQLException { /** * This method test when there is a modification change without primary key. - * + * * @throws SQLException */ @Test @@ -156,7 +155,7 @@ public void test_when_there_is_modification_change_without_primary_key() throws assertThat(change.getDataName()).isEqualTo("select * from test2"); assertThat(change.getChangeType()).isEqualTo(ChangeType.CREATION); assertThat(change.getColumnsNameList()).containsExactly("VAR1", "VAR2", "VAR3", "VAR4", "VAR5", "VAR6", "VAR7", - "VAR8", "VAR9", "VAR10", "VAR11", "VAR12", "VAR13", "VAR14", "VAR15", "VAR16", "VAR17"); + "VAR8", "VAR9", "VAR10", "VAR11", "VAR12", "VAR13", "VAR14", "VAR15", "VAR16", "VAR17"); assertThat(change.getRowAtStartPoint()).isNull(); assertThat(change.getRowAtEndPoint().getValuesList().get(0).getValue()).isEqualTo(1); assertThat(change.getRowAtEndPoint().getValuesList().get(1).getValue()).isEqualTo(true); @@ -169,20 +168,20 @@ public void test_when_there_is_modification_change_without_primary_key() throws assertThat(change.getRowAtEndPoint().getValuesList().get(8).getValue()).isEqualTo(Date.valueOf("2014-05-24")); assertThat(change.getRowAtEndPoint().getValuesList().get(9).getValue()).isEqualTo(Timestamp.valueOf("2014-05-24 09:46:30")); assertThat(change.getRowAtEndPoint().getValuesList().get(10).getValue()).isEqualTo(Assertions - .bytesContentFromClassPathOf( - "h2-logo-2.png")); + .bytesContentFromClassPathOf( + "h2-logo-2.png")); assertThat(change.getRowAtEndPoint().getValuesList().get(11).getValue()).isEqualTo("modification"); assertThat(change.getRowAtEndPoint().getValuesList().get(12).getValue()).isEqualTo(new BigDecimal("5.00")); assertThat(change.getRowAtEndPoint().getValuesList().get(13).getValue()).isEqualTo(7f); assertThat(change.getRowAtEndPoint().getValuesList().get(14).getValue()).isEqualTo(null); assertThat(change.getRowAtEndPoint().getValuesList().get(15).getValue()).isEqualTo(UUID.fromString( - "30b443ae-c0c9-4790-9bec-ce1380808435")); + "30b443ae-c0c9-4790-9bec-ce1380808435")); assertThat(change.getRowAtEndPoint().getValuesList().get(16).getValue()).isEqualTo("T"); Change change1 = changes.getChangesList().get(1); assertThat(change1.getDataName()).isEqualTo("select * from test2"); assertThat(change1.getChangeType()).isEqualTo(ChangeType.DELETION); assertThat(change1.getColumnsNameList()).containsExactly("VAR1", "VAR2", "VAR3", "VAR4", "VAR5", "VAR6", "VAR7", - "VAR8", "VAR9", "VAR10", "VAR11", "VAR12", "VAR13", "VAR14", "VAR15", "VAR16", "VAR17"); + "VAR8", "VAR9", "VAR10", "VAR11", "VAR12", "VAR13", "VAR14", "VAR15", "VAR16", "VAR17"); assertThat(change1.getRowAtStartPoint().getValuesList().get(0).getValue()).isEqualTo(1); assertThat(change1.getRowAtStartPoint().getValuesList().get(1).getValue()).isEqualTo(true); assertThat(change1.getRowAtStartPoint().getValuesList().get(2).getValue()).isEqualTo((byte) 2); @@ -194,20 +193,20 @@ public void test_when_there_is_modification_change_without_primary_key() throws assertThat(change1.getRowAtStartPoint().getValuesList().get(8).getValue()).isEqualTo(Date.valueOf("2014-05-24")); assertThat(change1.getRowAtStartPoint().getValuesList().get(9).getValue()).isEqualTo(Timestamp.valueOf("2014-05-24 09:46:30")); assertThat(change1.getRowAtStartPoint().getValuesList().get(10).getValue()).isEqualTo(Assertions.bytesContentFromClassPathOf( - "h2-logo-2.png")); + "h2-logo-2.png")); assertThat(change1.getRowAtStartPoint().getValuesList().get(11).getValue()).isEqualTo("text"); assertThat(change1.getRowAtStartPoint().getValuesList().get(12).getValue()).isEqualTo(new BigDecimal("5.00")); assertThat(change1.getRowAtStartPoint().getValuesList().get(13).getValue()).isEqualTo(7f); assertThat(change1.getRowAtStartPoint().getValuesList().get(14).getValue()).isEqualTo(null); assertThat(change1.getRowAtStartPoint().getValuesList().get(15).getValue()).isEqualTo(UUID.fromString( - "30b443ae-c0c9-4790-9bec-ce1380808435")); + "30b443ae-c0c9-4790-9bec-ce1380808435")); assertThat(change1.getRowAtStartPoint().getValuesList().get(16).getValue()).isEqualTo("T"); assertThat(change1.getRowAtEndPoint()).isNull(); } /** * This method test when there is a modification change with primary key. - * + * * @throws SQLException */ @Test @@ -235,7 +234,7 @@ public void test_when_there_is_modification_change_with_primary_key() throws SQL /** * This method test when there is a creation change with primary key. - * + * * @throws SQLException */ @Test @@ -257,12 +256,12 @@ public void test_when_there_is_creation_change_with_primary_key() throws SQLExce assertThat(change.getRowAtEndPoint().getValuesList().get(1).getValue()).isEqualTo("Ghostbusters"); assertThat(change.getRowAtEndPoint().getValuesList().get(2).getValue()).isEqualTo(new BigDecimal(1984)); assertThat(change.getRowAtEndPoint().getValuesList().get(3).getValue()).isEqualTo(UUID.fromString( - "16319617-AE95-4087-9264-D3D21BF611B6")); + "16319617-AE95-4087-9264-D3D21BF611B6")); } /** * This method test when there is a deletion change with primary key. - * + * * @throws SQLException */ @Test diff --git a/src/test/java/org/assertj/db/type/Changes_SetTables_Test.java b/src/test/java/org/assertj/db/type/Changes_SetTables_Test.java index 772101ea..b1f7e3bf 100644 --- a/src/test/java/org/assertj/db/type/Changes_SetTables_Test.java +++ b/src/test/java/org/assertj/db/type/Changes_SetTables_Test.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.type; @@ -17,9 +17,8 @@ /** * Tests on the setTables method. - * + * * @author Régis Pouiller - * */ public class Changes_SetTables_Test extends AbstractTest { diff --git a/src/test/java/org/assertj/db/type/Changes_Table_GetChangesList_Test.java b/src/test/java/org/assertj/db/type/Changes_Table_GetChangesList_Test.java index 5c802279..b0cff50f 100644 --- a/src/test/java/org/assertj/db/type/Changes_Table_GetChangesList_Test.java +++ b/src/test/java/org/assertj/db/type/Changes_Table_GetChangesList_Test.java @@ -8,14 +8,11 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.type; -import org.assertj.db.api.Assertions; -import org.assertj.db.common.AbstractTest; -import org.assertj.db.common.NeedReload; -import org.junit.Test; +import static org.assertj.core.api.Assertions.assertThat; import java.math.BigDecimal; import java.sql.Date; @@ -24,13 +21,15 @@ import java.sql.Timestamp; import java.util.UUID; -import static org.assertj.core.api.Assertions.assertThat; +import org.assertj.db.api.Assertions; +import org.assertj.db.common.AbstractTest; +import org.assertj.db.common.NeedReload; +import org.junit.Test; /** * Tests on the list of changes on tables. - * + * * @author Régis Pouiller. - * */ public class Changes_Table_GetChangesList_Test extends AbstractTest { @@ -47,7 +46,7 @@ public void test_when_there_is_no_change() { /** * This method test when there is no change found because it is another table. - * + * * @throws SQLException */ @Test @@ -62,7 +61,7 @@ public void test_when_there_is_no_change_found() throws SQLException { /** * This method test when there is a deletion change. - * + * * @throws SQLException */ @Test @@ -78,7 +77,7 @@ public void test_when_there_is_deletion_change() throws SQLException { assertThat(change.getDataName()).isEqualTo("TEST2"); assertThat(change.getChangeType()).isEqualTo(ChangeType.DELETION); assertThat(change.getColumnsNameList()).containsExactly("VAR1", "VAR2", "VAR3", "VAR4", "VAR5", "VAR6", "VAR7", - "VAR8", "VAR9", "VAR10", "VAR11", "VAR12", "VAR13", "VAR14", "VAR15", "VAR16", "VAR17"); + "VAR8", "VAR9", "VAR10", "VAR11", "VAR12", "VAR13", "VAR14", "VAR15", "VAR16", "VAR17"); assertThat(change.getRowAtStartPoint().getValuesList().get(0).getValue()).isNull(); assertThat(change.getRowAtStartPoint().getValuesList().get(1).getValue()).isNull(); assertThat(change.getRowAtStartPoint().getValuesList().get(2).getValue()).isNull(); @@ -101,7 +100,7 @@ public void test_when_there_is_deletion_change() throws SQLException { /** * This method test when there is a creation change. - * + * * @throws SQLException */ @Test @@ -117,8 +116,8 @@ public void test_when_there_is_creation_change() throws SQLException { assertThat(change.getDataName()).isEqualTo("TEST2"); assertThat(change.getChangeType()).isEqualTo(ChangeType.CREATION); assertThat(change.getColumnsNameList()).containsExactly("VAR1", "VAR2", "VAR3", "VAR4", "VAR5", "VAR6", "VAR7", - "VAR8", "VAR9", "VAR10", "VAR11", "VAR12", "VAR13", "VAR14", - "VAR15", "VAR16", "VAR17"); + "VAR8", "VAR9", "VAR10", "VAR11", "VAR12", "VAR13", "VAR14", + "VAR15", "VAR16", "VAR17"); assertThat(change.getRowAtStartPoint()).isNull(); assertThat(change.getRowAtEndPoint().getValuesList().get(0).getValue()).isEqualTo(200); assertThat(change.getRowAtEndPoint().getValuesList().get(1).getValue()).isNull(); @@ -141,7 +140,7 @@ public void test_when_there_is_creation_change() throws SQLException { /** * This method test when there is a modification change without primary key. - * + * * @throws SQLException */ @Test @@ -157,8 +156,8 @@ public void test_when_there_is_modification_change_without_primary_key() throws assertThat(change.getDataName()).isEqualTo("TEST2"); assertThat(change.getChangeType()).isEqualTo(ChangeType.CREATION); assertThat(change.getColumnsNameList()).containsExactly("VAR1", "VAR2", "VAR3", "VAR4", "VAR5", "VAR6", "VAR7", - "VAR8", "VAR9", "VAR10", "VAR11", "VAR12", "VAR13", "VAR14", - "VAR15", "VAR16", "VAR17"); + "VAR8", "VAR9", "VAR10", "VAR11", "VAR12", "VAR13", "VAR14", + "VAR15", "VAR16", "VAR17"); assertThat(change.getRowAtStartPoint()).isNull(); assertThat(change.getRowAtEndPoint().getValuesList().get(0).getValue()).isEqualTo(1); assertThat(change.getRowAtEndPoint().getValuesList().get(1).getValue()).isEqualTo(true); @@ -170,23 +169,23 @@ public void test_when_there_is_modification_change_without_primary_key() throws assertThat(change.getRowAtEndPoint().getValuesList().get(7).getValue()).isEqualTo(Time.valueOf("09:46:30")); assertThat(change.getRowAtEndPoint().getValuesList().get(8).getValue()).isEqualTo(Date.valueOf("2014-05-24")); assertThat(change.getRowAtEndPoint().getValuesList().get(9).getValue()).isEqualTo(Timestamp.valueOf( - "2014-05-24 09:46:30")); + "2014-05-24 09:46:30")); assertThat(change.getRowAtEndPoint().getValuesList().get(10).getValue()).isEqualTo(Assertions - .bytesContentFromClassPathOf( - "h2-logo-2.png")); + .bytesContentFromClassPathOf( + "h2-logo-2.png")); assertThat(change.getRowAtEndPoint().getValuesList().get(11).getValue()).isEqualTo("modification"); assertThat(change.getRowAtEndPoint().getValuesList().get(12).getValue()).isEqualTo(new BigDecimal("5.00")); assertThat(change.getRowAtEndPoint().getValuesList().get(13).getValue()).isEqualTo(7f); assertThat(change.getRowAtEndPoint().getValuesList().get(14).getValue()).isEqualTo(null); assertThat(change.getRowAtEndPoint().getValuesList().get(15).getValue()).isEqualTo(UUID.fromString( - "30b443ae-c0c9-4790-9bec-ce1380808435")); + "30b443ae-c0c9-4790-9bec-ce1380808435")); assertThat(change.getRowAtEndPoint().getValuesList().get(16).getValue()).isEqualTo("T"); Change change1 = changes.getChangesList().get(1); assertThat(change1.getDataName()).isEqualTo("TEST2"); assertThat(change1.getChangeType()).isEqualTo(ChangeType.DELETION); assertThat(change1.getColumnsNameList()).containsExactly("VAR1", "VAR2", "VAR3", "VAR4", "VAR5", "VAR6", "VAR7", - "VAR8", "VAR9", "VAR10", "VAR11", "VAR12", "VAR13", - "VAR14", "VAR15", "VAR16", "VAR17"); + "VAR8", "VAR9", "VAR10", "VAR11", "VAR12", "VAR13", + "VAR14", "VAR15", "VAR16", "VAR17"); assertThat(change1.getRowAtStartPoint().getValuesList().get(0).getValue()).isEqualTo(1); assertThat(change1.getRowAtStartPoint().getValuesList().get(1).getValue()).isEqualTo(true); assertThat(change1.getRowAtStartPoint().getValuesList().get(2).getValue()).isEqualTo((byte) 2); @@ -197,23 +196,23 @@ public void test_when_there_is_modification_change_without_primary_key() throws assertThat(change1.getRowAtStartPoint().getValuesList().get(7).getValue()).isEqualTo(Time.valueOf("09:46:30")); assertThat(change1.getRowAtStartPoint().getValuesList().get(8).getValue()).isEqualTo(Date.valueOf("2014-05-24")); assertThat(change1.getRowAtStartPoint().getValuesList().get(9).getValue()).isEqualTo(Timestamp.valueOf( - "2014-05-24 09:46:30")); + "2014-05-24 09:46:30")); assertThat(change1.getRowAtStartPoint().getValuesList().get(10).getValue()).isEqualTo(Assertions - .bytesContentFromClassPathOf( - "h2-logo-2.png")); + .bytesContentFromClassPathOf( + "h2-logo-2.png")); assertThat(change1.getRowAtStartPoint().getValuesList().get(11).getValue()).isEqualTo("text"); assertThat(change1.getRowAtStartPoint().getValuesList().get(12).getValue()).isEqualTo(new BigDecimal("5.00")); assertThat(change1.getRowAtStartPoint().getValuesList().get(13).getValue()).isEqualTo(7f); assertThat(change1.getRowAtStartPoint().getValuesList().get(14).getValue()).isEqualTo(null); assertThat(change1.getRowAtStartPoint().getValuesList().get(15).getValue()).isEqualTo(UUID.fromString( - "30b443ae-c0c9-4790-9bec-ce1380808435")); + "30b443ae-c0c9-4790-9bec-ce1380808435")); assertThat(change1.getRowAtStartPoint().getValuesList().get(16).getValue()).isEqualTo("T"); assertThat(change1.getRowAtEndPoint()).isNull(); } /** * This method test when there is a modification change with primary key. - * + * * @throws SQLException */ @Test @@ -241,7 +240,7 @@ public void test_when_there_is_modification_change_with_primary_key() throws SQL /** * This method test when there is a creation change with primary key. - * + * * @throws SQLException */ @Test @@ -263,12 +262,12 @@ public void test_when_there_is_creation_change_with_primary_key() throws SQLExce assertThat(change.getRowAtEndPoint().getValuesList().get(1).getValue()).isEqualTo("Ghostbusters"); assertThat(change.getRowAtEndPoint().getValuesList().get(2).getValue()).isEqualTo(new BigDecimal(1984)); assertThat(change.getRowAtEndPoint().getValuesList().get(3).getValue()) - .isEqualTo(UUID.fromString("16319617-AE95-4087-9264-D3D21BF611B6")); + .isEqualTo(UUID.fromString("16319617-AE95-4087-9264-D3D21BF611B6")); } /** * This method test when there is a deletion change with primary key. - * + * * @throws SQLException */ @Test diff --git a/src/test/java/org/assertj/db/type/DataSourceWithLetterCase_Test.java b/src/test/java/org/assertj/db/type/DataSourceWithLetterCase_Test.java index ccd95d74..4727575d 100644 --- a/src/test/java/org/assertj/db/type/DataSourceWithLetterCase_Test.java +++ b/src/test/java/org/assertj/db/type/DataSourceWithLetterCase_Test.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.type; @@ -19,7 +19,6 @@ import java.sql.SQLException; import java.sql.SQLFeatureNotSupportedException; import java.util.logging.Logger; - import javax.sql.DataSource; import org.assertj.db.common.AbstractTest; @@ -30,84 +29,14 @@ /** * Tests on the {@code DataSourceWithLetterCase_Test}. - * + * * @author Régis Pouiller - * */ public class DataSourceWithLetterCase_Test extends AbstractTest { - private static class MyDataSource implements DataSource { - - private Connection connection; - private int loginTimeout; - private PrintWriter printWriter; - private Logger logger; - - private MyDataSource(DataSource dataSource) throws SQLException { - connection = new DefaultConnection(dataSource.getConnection()); - loginTimeout = 0; - printWriter = new PrintWriter(System.out); - logger = Logger.getGlobal(); - } - - @Override - public PrintWriter getLogWriter() throws SQLException { - return printWriter; - } - - @Override - public int getLoginTimeout() throws SQLException { - return loginTimeout; - } - - @Override - public Logger getParentLogger() throws SQLFeatureNotSupportedException { - return logger; - } - - @Override - public void setLogWriter(PrintWriter arg0) throws SQLException { - printWriter = arg0; - } - - @Override - public void setLoginTimeout(int arg0) throws SQLException { - loginTimeout = arg0; - } - - @Override - public boolean isWrapperFor(Class arg0) throws SQLException { - if (Boolean.class.equals(arg0)) { - return true; - } - return false; - } - - @SuppressWarnings("unchecked") - @Override - public T unwrap(Class iface) throws SQLException { - if (Boolean.class.equals(iface)) { - return (T) Boolean.TRUE; - } - else if (String.class.equals(iface)) { - return (T) "test"; - } - return null; - } - - @Override - public Connection getConnection() throws SQLException { - return connection; - } - - @Override - public Connection getConnection(String arg0, String arg1) throws SQLException { - return connection; - } - - }; - private DataSource delegate; + + ; private DataSourceWithLetterCase dataSourceWithLetterCase; @Before @@ -118,7 +47,8 @@ public void init() throws SQLException { /** * This method test the {@code getConnection} method. - * @throws SQLException + * + * @throws SQLException */ @Test public void test_getConnection() throws SQLException { @@ -128,7 +58,8 @@ public void test_getConnection() throws SQLException { /** * This method test the {@code getLogWriter} and {@code setLogWriter} method. - * @throws SQLException + * + * @throws SQLException */ @Test public void test_LogWriter() throws SQLException { @@ -140,7 +71,8 @@ public void test_LogWriter() throws SQLException { /** * This method test the {@code getLoginTimeout} and {@code setLoginTimeout} method. - * @throws SQLException + * + * @throws SQLException */ @Test public void test_LoginTimeout() throws SQLException { @@ -151,7 +83,8 @@ public void test_LoginTimeout() throws SQLException { /** * This method test the {@code getParentLogger} method. - * @throws SQLException + * + * @throws SQLException */ @Test public void test_getParentLogger() throws SQLException { @@ -160,7 +93,8 @@ public void test_getParentLogger() throws SQLException { /** * This method test the {@code isWrapperFor} method. - * @throws SQLException + * + * @throws SQLException */ @Test public void test_isWrapperFor() throws SQLException { @@ -170,7 +104,8 @@ public void test_isWrapperFor() throws SQLException { /** * This method test the {@code unwrap} method. - * @throws SQLException + * + * @throws SQLException */ @Test public void test_unwrap() throws SQLException { @@ -178,4 +113,74 @@ public void test_unwrap() throws SQLException { assertThat(dataSourceWithLetterCase.unwrap(String.class)).isEqualTo(delegate.unwrap(String.class)).isEqualTo("test"); assertThat(dataSourceWithLetterCase.unwrap(Integer.class)).isEqualTo(delegate.unwrap(Integer.class)).isNull(); } + + private static class MyDataSource implements DataSource { + + private Connection connection; + private int loginTimeout; + private PrintWriter printWriter; + private Logger logger; + + private MyDataSource(DataSource dataSource) throws SQLException { + connection = new DefaultConnection(dataSource.getConnection()); + loginTimeout = 0; + printWriter = new PrintWriter(System.out); + logger = Logger.getGlobal(); + } + + @Override + public PrintWriter getLogWriter() throws SQLException { + return printWriter; + } + + @Override + public void setLogWriter(PrintWriter arg0) throws SQLException { + printWriter = arg0; + } + + @Override + public int getLoginTimeout() throws SQLException { + return loginTimeout; + } + + @Override + public void setLoginTimeout(int arg0) throws SQLException { + loginTimeout = arg0; + } + + @Override + public Logger getParentLogger() throws SQLFeatureNotSupportedException { + return logger; + } + + @Override + public boolean isWrapperFor(Class arg0) throws SQLException { + if (Boolean.class.equals(arg0)) { + return true; + } + return false; + } + + @SuppressWarnings("unchecked") + @Override + public T unwrap(Class iface) throws SQLException { + if (Boolean.class.equals(iface)) { + return (T) Boolean.TRUE; + } else if (String.class.equals(iface)) { + return (T) "test"; + } + return null; + } + + @Override + public Connection getConnection() throws SQLException { + return connection; + } + + @Override + public Connection getConnection(String arg0, String arg1) throws SQLException { + return connection; + } + + } } diff --git a/src/test/java/org/assertj/db/type/DataType_ValueOf_Test.java b/src/test/java/org/assertj/db/type/DataType_ValueOf_Test.java index 990082ad..e447800d 100644 --- a/src/test/java/org/assertj/db/type/DataType_ValueOf_Test.java +++ b/src/test/java/org/assertj/db/type/DataType_ValueOf_Test.java @@ -8,19 +8,18 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.type; -import org.junit.Test; - import static org.assertj.core.api.Assertions.assertThat; +import org.junit.Test; + /** * Test on the type got from {@code valueOf} method from {@code DataType} enum. * * @author Régis Pouiller - * */ public class DataType_ValueOf_Test { diff --git a/src/test/java/org/assertj/db/type/DateTimeValue_Test.java b/src/test/java/org/assertj/db/type/DateTimeValue_Test.java index 2b18f39d..724d305a 100644 --- a/src/test/java/org/assertj/db/type/DateTimeValue_Test.java +++ b/src/test/java/org/assertj/db/type/DateTimeValue_Test.java @@ -8,25 +8,24 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.type; -import org.assertj.db.common.AbstractTest; -import org.junit.Test; +import static org.assertj.core.api.Assertions.assertThat; import java.sql.Timestamp; import java.text.ParseException; import java.time.LocalDateTime; import java.util.Calendar; -import static org.assertj.core.api.Assertions.assertThat; +import org.assertj.db.common.AbstractTest; +import org.junit.Test; /** * Tests on the date/time value. * * @author Régis Pouiller - * */ public class DateTimeValue_Test extends AbstractTest { @@ -332,54 +331,48 @@ public void test_now() throws ParseException { DateTimeValue dateTimeValue = DateTimeValue.now(); Calendar calendarSecond = Calendar.getInstance(); assertThat(dateTimeValue.getDate().getYear()).isBetween(calendarFirst.get(Calendar.YEAR), - calendarSecond.get(Calendar.YEAR)); + calendarSecond.get(Calendar.YEAR)); if (calendarFirst.get(Calendar.YEAR) == calendarSecond.get(Calendar.YEAR)) { assertThat(dateTimeValue.getDate().getMonth()).isBetween(calendarFirst.get(Calendar.MONTH) + 1, - calendarSecond.get(Calendar.MONTH) + 1); - } - else { + calendarSecond.get(Calendar.MONTH) + 1); + } else { assertThat(dateTimeValue.getDate().getMonth()).isBetween(calendarFirst.get(Calendar.MONTH) + 1 - 12, - calendarSecond.get(Calendar.MONTH) + 1 + 12); + calendarSecond.get(Calendar.MONTH) + 1 + 12); } if (calendarFirst.get(Calendar.MONTH) == calendarSecond.get(Calendar.MONTH)) { assertThat(dateTimeValue.getDate().getDayOfTheMonth()).isBetween(calendarFirst.get(Calendar.DAY_OF_MONTH), - calendarSecond.get(Calendar.DAY_OF_MONTH)); - } - else { + calendarSecond.get(Calendar.DAY_OF_MONTH)); + } else { assertThat(dateTimeValue.getDate().getDayOfTheMonth()).isBetween(calendarFirst.get(Calendar.DAY_OF_MONTH) - 31, - calendarSecond.get(Calendar.DAY_OF_MONTH) + 31); + calendarSecond.get(Calendar.DAY_OF_MONTH) + 31); } if (calendarFirst.get(Calendar.DAY_OF_MONTH) == calendarSecond.get(Calendar.DAY_OF_MONTH)) { assertThat(dateTimeValue.getTime().getHours()).isBetween(calendarFirst.get(Calendar.HOUR_OF_DAY), - calendarSecond.get(Calendar.HOUR_OF_DAY)); - } - else { + calendarSecond.get(Calendar.HOUR_OF_DAY)); + } else { assertThat(dateTimeValue.getTime().getHours()).isBetween(calendarFirst.get(Calendar.HOUR_OF_DAY) - 24, - calendarSecond.get(Calendar.HOUR_OF_DAY) + 24); + calendarSecond.get(Calendar.HOUR_OF_DAY) + 24); } if (calendarFirst.get(Calendar.HOUR_OF_DAY) == calendarSecond.get(Calendar.HOUR_OF_DAY)) { assertThat(dateTimeValue.getTime().getMinutes()).isBetween(calendarFirst.get(Calendar.MINUTE), - calendarSecond.get(Calendar.MINUTE)); - } - else { + calendarSecond.get(Calendar.MINUTE)); + } else { assertThat(dateTimeValue.getTime().getMinutes()).isBetween(calendarFirst.get(Calendar.MINUTE) - 60, - calendarSecond.get(Calendar.MINUTE) + 60); + calendarSecond.get(Calendar.MINUTE) + 60); } if (calendarFirst.get(Calendar.MINUTE) == calendarSecond.get(Calendar.MINUTE)) { assertThat(dateTimeValue.getTime().getSeconds()).isBetween(calendarFirst.get(Calendar.SECOND), - calendarSecond.get(Calendar.SECOND)); - } - else { + calendarSecond.get(Calendar.SECOND)); + } else { assertThat(dateTimeValue.getTime().getSeconds()).isBetween(calendarFirst.get(Calendar.SECOND) - 60, - calendarSecond.get(Calendar.SECOND) + 60); + calendarSecond.get(Calendar.SECOND) + 60); } if (calendarFirst.get(Calendar.SECOND) == calendarSecond.get(Calendar.SECOND)) { assertThat(dateTimeValue.getTime().getNanoSeconds()).isBetween(calendarFirst.get(Calendar.MILLISECOND) * 1000000, - calendarSecond.get(Calendar.MILLISECOND) * 1000000); - } - else { + calendarSecond.get(Calendar.MILLISECOND) * 1000000); + } else { assertThat(dateTimeValue.getTime().getNanoSeconds()).isBetween(calendarFirst.get(Calendar.MILLISECOND) * 1000000 - 1000000000, - calendarSecond.get(Calendar.MILLISECOND) * 1000000 + 1000000000); + calendarSecond.get(Calendar.MILLISECOND) * 1000000 + 1000000000); } } @@ -482,9 +475,9 @@ public void test_of() throws ParseException { @Test public void test_toString() { assertThat(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)).toString()).isEqualTo( - "2007-12-23T09:01:06.000000003"); + "2007-12-23T09:01:06.000000003"); assertThat(DateTimeValue.of(DateValue.of(2007, 2, 3), TimeValue.of(9, 1, 6, 3)).toString()).isEqualTo( - "2007-02-03T09:01:06.000000003"); + "2007-02-03T09:01:06.000000003"); } /** @@ -493,49 +486,49 @@ public void test_toString() { @Test public void test_equals() { assertThat(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(0, 0)).equals(DateValue.of(2007, 12, 23))) - .isTrue(); + .isTrue(); assertThat( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)).equals( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)))).isTrue(); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)).equals( + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)))).isTrue(); assertThat( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6)).equals( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6)))).isTrue(); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6)).equals( + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6)))).isTrue(); assertThat( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)).equals( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)))).isTrue(); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)).equals( + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)))).isTrue(); assertThat(DateTimeValue.of(DateValue.of(2007, 12, 23)).equals(DateValue.of(2007, 12, 24))).isFalse(); assertThat(DateTimeValue.of(DateValue.of(2007, 12, 23)).equals(DateValue.of(2007, 12, 23))).isTrue(); assertThat(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 0)).equals(DateValue.of(2007, 12, 23))) - .isFalse(); + .isFalse(); assertThat(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(0, 1)).equals(DateValue.of(2007, 12, 23))) - .isFalse(); + .isFalse(); assertThat(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(0, 0, 6)).equals(DateValue.of(2007, 12, 23))) - .isFalse(); + .isFalse(); assertThat( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(0, 0, 0, 3)).equals(DateValue.of(2007, 12, 23))) - .isFalse(); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(0, 0, 0, 3)).equals(DateValue.of(2007, 12, 23))) + .isFalse(); assertThat( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)).equals( - DateTimeValue.of(DateValue.of(2008, 12, 23), TimeValue.of(9, 1)))).isFalse(); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)).equals( + DateTimeValue.of(DateValue.of(2008, 12, 23), TimeValue.of(9, 1)))).isFalse(); assertThat( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)).equals( - DateTimeValue.of(DateValue.of(2007, 11, 23), TimeValue.of(9, 1)))).isFalse(); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)).equals( + DateTimeValue.of(DateValue.of(2007, 11, 23), TimeValue.of(9, 1)))).isFalse(); assertThat( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)).equals( - DateTimeValue.of(DateValue.of(2007, 12, 24), TimeValue.of(9, 1)))).isFalse(); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)).equals( + DateTimeValue.of(DateValue.of(2007, 12, 24), TimeValue.of(9, 1)))).isFalse(); assertThat( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)).equals( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(10, 1)))).isFalse(); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)).equals( + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(10, 1)))).isFalse(); assertThat( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)).equals( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 2)))).isFalse(); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)).equals( + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 2)))).isFalse(); assertThat( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6)).equals( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 7)))).isFalse(); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6)).equals( + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 7)))).isFalse(); assertThat( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)).equals( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 4)))).isFalse(); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)).equals( + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 4)))).isFalse(); assertThat(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)).equals("")).isFalse(); } @@ -561,52 +554,52 @@ public void test_hashCode() { @Test public void test_compareTo() { assertThat( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)).compareTo( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 2)))).isEqualTo(1); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)).compareTo( + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 2)))).isEqualTo(1); assertThat( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)).compareTo( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 5, 3)))).isEqualTo(1); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)).compareTo( + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 5, 3)))).isEqualTo(1); assertThat( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)).compareTo( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 0, 6, 3)))).isEqualTo(1); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)).compareTo( + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 0, 6, 3)))).isEqualTo(1); assertThat( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)).compareTo( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(8, 1, 6, 3)))).isEqualTo(1); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)).compareTo( + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(8, 1, 6, 3)))).isEqualTo(1); assertThat( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)).compareTo( - DateTimeValue.of(DateValue.of(2007, 12, 22), TimeValue.of(9, 1, 6, 3)))).isEqualTo(1); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)).compareTo( + DateTimeValue.of(DateValue.of(2007, 12, 22), TimeValue.of(9, 1, 6, 3)))).isEqualTo(1); assertThat( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)).compareTo( - DateTimeValue.of(DateValue.of(2007, 11, 23), TimeValue.of(9, 1, 6, 3)))).isEqualTo(1); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)).compareTo( + DateTimeValue.of(DateValue.of(2007, 11, 23), TimeValue.of(9, 1, 6, 3)))).isEqualTo(1); assertThat( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)).compareTo( - DateTimeValue.of(DateValue.of(2006, 12, 23), TimeValue.of(9, 1, 6, 3)))).isEqualTo(1); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)).compareTo( + DateTimeValue.of(DateValue.of(2006, 12, 23), TimeValue.of(9, 1, 6, 3)))).isEqualTo(1); assertThat( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)).compareTo( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)))).isEqualTo(0); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)).compareTo( + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)))).isEqualTo(0); assertThat( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)).compareTo( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 4)))).isEqualTo(-1); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)).compareTo( + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 4)))).isEqualTo(-1); assertThat( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)).compareTo( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 7, 3)))).isEqualTo(-1); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)).compareTo( + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 7, 3)))).isEqualTo(-1); assertThat( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)).compareTo( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 2, 6, 3)))).isEqualTo(-1); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)).compareTo( + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 2, 6, 3)))).isEqualTo(-1); assertThat( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)).compareTo( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(10, 1, 6, 3)))).isEqualTo(-1); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)).compareTo( + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(10, 1, 6, 3)))).isEqualTo(-1); assertThat( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)).compareTo( - DateTimeValue.of(DateValue.of(2007, 12, 24), TimeValue.of(9, 1, 6, 3)))).isEqualTo(-1); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)).compareTo( + DateTimeValue.of(DateValue.of(2007, 12, 24), TimeValue.of(9, 1, 6, 3)))).isEqualTo(-1); assertThat( - DateTimeValue.of(DateValue.of(2007, 11, 23), TimeValue.of(9, 1, 6, 3)).compareTo( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)))).isEqualTo(-1); + DateTimeValue.of(DateValue.of(2007, 11, 23), TimeValue.of(9, 1, 6, 3)).compareTo( + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)))).isEqualTo(-1); assertThat( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)).compareTo( - DateTimeValue.of(DateValue.of(2008, 12, 23), TimeValue.of(9, 1, 6, 3)))).isEqualTo(-1); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)).compareTo( + DateTimeValue.of(DateValue.of(2008, 12, 23), TimeValue.of(9, 1, 6, 3)))).isEqualTo(-1); } /** @@ -615,52 +608,52 @@ public void test_compareTo() { @Test public void test_isBefore() { assertThat( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)).isBefore( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 2)))).isFalse(); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)).isBefore( + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 2)))).isFalse(); assertThat( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)).isBefore( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 5, 3)))).isFalse(); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)).isBefore( + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 5, 3)))).isFalse(); assertThat( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)).isBefore( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 0, 6, 3)))).isFalse(); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)).isBefore( + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 0, 6, 3)))).isFalse(); assertThat( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)).isBefore( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(8, 1, 6, 3)))).isFalse(); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)).isBefore( + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(8, 1, 6, 3)))).isFalse(); assertThat( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)).isBefore( - DateTimeValue.of(DateValue.of(2007, 12, 22), TimeValue.of(9, 1, 6, 3)))).isFalse(); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)).isBefore( + DateTimeValue.of(DateValue.of(2007, 12, 22), TimeValue.of(9, 1, 6, 3)))).isFalse(); assertThat( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)).isBefore( - DateTimeValue.of(DateValue.of(2007, 11, 23), TimeValue.of(9, 1, 6, 3)))).isFalse(); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)).isBefore( + DateTimeValue.of(DateValue.of(2007, 11, 23), TimeValue.of(9, 1, 6, 3)))).isFalse(); assertThat( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)).isBefore( - DateTimeValue.of(DateValue.of(2006, 12, 23), TimeValue.of(9, 1, 6, 3)))).isFalse(); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)).isBefore( + DateTimeValue.of(DateValue.of(2006, 12, 23), TimeValue.of(9, 1, 6, 3)))).isFalse(); assertThat( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)).isBefore( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)))).isFalse(); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)).isBefore( + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)))).isFalse(); assertThat( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)).isBefore( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 4)))).isTrue(); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)).isBefore( + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 4)))).isTrue(); assertThat( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)).isBefore( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 7, 3)))).isTrue(); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)).isBefore( + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 7, 3)))).isTrue(); assertThat( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)).isBefore( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 2, 6, 3)))).isTrue(); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)).isBefore( + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 2, 6, 3)))).isTrue(); assertThat( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)).isBefore( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(10, 1, 6, 3)))).isTrue(); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)).isBefore( + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(10, 1, 6, 3)))).isTrue(); assertThat( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)).isBefore( - DateTimeValue.of(DateValue.of(2007, 12, 24), TimeValue.of(9, 1, 6, 3)))).isTrue(); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)).isBefore( + DateTimeValue.of(DateValue.of(2007, 12, 24), TimeValue.of(9, 1, 6, 3)))).isTrue(); assertThat( - DateTimeValue.of(DateValue.of(2007, 11, 23), TimeValue.of(9, 1, 6, 3)).isBefore( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)))).isTrue(); + DateTimeValue.of(DateValue.of(2007, 11, 23), TimeValue.of(9, 1, 6, 3)).isBefore( + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)))).isTrue(); assertThat( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)).isBefore( - DateTimeValue.of(DateValue.of(2008, 12, 23), TimeValue.of(9, 1, 6, 3)))).isTrue(); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)).isBefore( + DateTimeValue.of(DateValue.of(2008, 12, 23), TimeValue.of(9, 1, 6, 3)))).isTrue(); } /** @@ -669,52 +662,52 @@ public void test_isBefore() { @Test public void test_isAfter() { assertThat( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)).isAfter( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 2)))).isTrue(); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)).isAfter( + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 2)))).isTrue(); assertThat( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)).isAfter( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 5, 3)))).isTrue(); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)).isAfter( + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 5, 3)))).isTrue(); assertThat( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)).isAfter( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 0, 6, 3)))).isTrue(); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)).isAfter( + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 0, 6, 3)))).isTrue(); assertThat( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)).isAfter( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(8, 1, 6, 3)))).isTrue(); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)).isAfter( + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(8, 1, 6, 3)))).isTrue(); assertThat( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)).isAfter( - DateTimeValue.of(DateValue.of(2007, 12, 22), TimeValue.of(9, 1, 6, 3)))).isTrue(); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)).isAfter( + DateTimeValue.of(DateValue.of(2007, 12, 22), TimeValue.of(9, 1, 6, 3)))).isTrue(); assertThat( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)).isAfter( - DateTimeValue.of(DateValue.of(2007, 11, 23), TimeValue.of(9, 1, 6, 3)))).isTrue(); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)).isAfter( + DateTimeValue.of(DateValue.of(2007, 11, 23), TimeValue.of(9, 1, 6, 3)))).isTrue(); assertThat( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)).isAfter( - DateTimeValue.of(DateValue.of(2006, 12, 23), TimeValue.of(9, 1, 6, 3)))).isTrue(); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)).isAfter( + DateTimeValue.of(DateValue.of(2006, 12, 23), TimeValue.of(9, 1, 6, 3)))).isTrue(); assertThat( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)).isAfter( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)))).isFalse(); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)).isAfter( + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)))).isFalse(); assertThat( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)).isAfter( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 4)))).isFalse(); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)).isAfter( + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 4)))).isFalse(); assertThat( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)).isAfter( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 7, 3)))).isFalse(); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)).isAfter( + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 7, 3)))).isFalse(); assertThat( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)).isAfter( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 2, 6, 3)))).isFalse(); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)).isAfter( + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 2, 6, 3)))).isFalse(); assertThat( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)).isAfter( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(10, 1, 6, 3)))).isFalse(); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)).isAfter( + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(10, 1, 6, 3)))).isFalse(); assertThat( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)).isAfter( - DateTimeValue.of(DateValue.of(2007, 12, 24), TimeValue.of(9, 1, 6, 3)))).isFalse(); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)).isAfter( + DateTimeValue.of(DateValue.of(2007, 12, 24), TimeValue.of(9, 1, 6, 3)))).isFalse(); assertThat( - DateTimeValue.of(DateValue.of(2007, 11, 23), TimeValue.of(9, 1, 6, 3)).isAfter( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)))).isFalse(); + DateTimeValue.of(DateValue.of(2007, 11, 23), TimeValue.of(9, 1, 6, 3)).isAfter( + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)))).isFalse(); assertThat( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)).isAfter( - DateTimeValue.of(DateValue.of(2008, 12, 23), TimeValue.of(9, 1, 6, 3)))).isFalse(); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)).isAfter( + DateTimeValue.of(DateValue.of(2008, 12, 23), TimeValue.of(9, 1, 6, 3)))).isFalse(); } /** @@ -723,15 +716,15 @@ public void test_isAfter() { @Test public void test_isMidnight() { assertThat( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)).isMidnight()).isFalse(); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)).isMidnight()).isFalse(); assertThat( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6)).isMidnight()).isFalse(); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6)).isMidnight()).isFalse(); assertThat( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)).isMidnight()).isFalse(); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)).isMidnight()).isFalse(); assertThat( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(0, 0)).isMidnight()).isTrue(); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(0, 0)).isMidnight()).isTrue(); assertThat( - DateTimeValue.of(DateValue.of(2007, 12, 23)).isMidnight()).isTrue(); + DateTimeValue.of(DateValue.of(2007, 12, 23)).isMidnight()).isTrue(); } /** @@ -740,44 +733,44 @@ public void test_isMidnight() { @Test public void test_move_date() { assertThat(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)).move(DateValue.of(0, 0, 1))).as("add 1 day").isEqualTo( - DateTimeValue.of(DateValue.of(2007, 12, 24), TimeValue.of(9, 1))); + DateTimeValue.of(DateValue.of(2007, 12, 24), TimeValue.of(9, 1))); assertThat(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)).move(DateValue.of(0, 0, 2))).as("add 2 days").isEqualTo( - DateTimeValue.of(DateValue.of(2007, 12, 25), TimeValue.of(9, 1))); + DateTimeValue.of(DateValue.of(2007, 12, 25), TimeValue.of(9, 1))); assertThat(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)).move(DateValue.of(0, 0, -1))).as("substract 1 day").isEqualTo( - DateTimeValue.of(DateValue.of(2007, 12, 22), TimeValue.of(9, 1))); + DateTimeValue.of(DateValue.of(2007, 12, 22), TimeValue.of(9, 1))); assertThat(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)).move(DateValue.of(0, 0, -2))).as("substract 2 days").isEqualTo( - DateTimeValue.of(DateValue.of(2007, 12, 21), TimeValue.of(9, 1))); + DateTimeValue.of(DateValue.of(2007, 12, 21), TimeValue.of(9, 1))); assertThat(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)).move(DateValue.of(0, 1, 0))).as("add 1 month").isEqualTo( - DateTimeValue.of(DateValue.of(2008, 1, 23), TimeValue.of(9, 1))); + DateTimeValue.of(DateValue.of(2008, 1, 23), TimeValue.of(9, 1))); assertThat(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)).move(DateValue.of(0, 2, 0))).as("add 2 months").isEqualTo( - DateTimeValue.of(DateValue.of(2008, 2, 23), TimeValue.of(9, 1))); + DateTimeValue.of(DateValue.of(2008, 2, 23), TimeValue.of(9, 1))); assertThat(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)).move(DateValue.of(0, -1, 0))).as("substract 1 month").isEqualTo( - DateTimeValue.of(DateValue.of(2007, 11, 23), TimeValue.of(9, 1))); + DateTimeValue.of(DateValue.of(2007, 11, 23), TimeValue.of(9, 1))); assertThat(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)).move(DateValue.of(0, -2, 0))).as("substract 2 months").isEqualTo( - DateTimeValue.of(DateValue.of(2007, 10, 23), TimeValue.of(9, 1))); + DateTimeValue.of(DateValue.of(2007, 10, 23), TimeValue.of(9, 1))); assertThat(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)).move(DateValue.of(1, 0, 0))).as("add 1 year").isEqualTo( - DateTimeValue.of(DateValue.of(2008, 12, 23), TimeValue.of(9, 1))); + DateTimeValue.of(DateValue.of(2008, 12, 23), TimeValue.of(9, 1))); assertThat(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)).move(DateValue.of(2, 0, 0))).as("add 2 years").isEqualTo( - DateTimeValue.of(DateValue.of(2009, 12, 23), TimeValue.of(9, 1))); + DateTimeValue.of(DateValue.of(2009, 12, 23), TimeValue.of(9, 1))); assertThat(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)).move(DateValue.of(-1, 0, 0))).as("substract 1 year").isEqualTo( - DateTimeValue.of(DateValue.of(2006, 12, 23), TimeValue.of(9, 1))); + DateTimeValue.of(DateValue.of(2006, 12, 23), TimeValue.of(9, 1))); assertThat(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)).move(DateValue.of(-2, 0, 0))).as("substract 2 years").isEqualTo( - DateTimeValue.of(DateValue.of(2005, 12, 23), TimeValue.of(9, 1))); + DateTimeValue.of(DateValue.of(2005, 12, 23), TimeValue.of(9, 1))); assertThat(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)).move(DateValue.of(1, 1, 1))).as("add 1 all").isEqualTo( - DateTimeValue.of(DateValue.of(2009, 1, 24), TimeValue.of(9, 1))); + DateTimeValue.of(DateValue.of(2009, 1, 24), TimeValue.of(9, 1))); assertThat(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)).move(DateValue.of(2, 2, 2))).as("add 2 all").isEqualTo( - DateTimeValue.of(DateValue.of(2010, 2, 25), TimeValue.of(9, 1))); + DateTimeValue.of(DateValue.of(2010, 2, 25), TimeValue.of(9, 1))); assertThat(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)).move(DateValue.of(-1, -1, -1))).as("substract 1 all").isEqualTo( - DateTimeValue.of(DateValue.of(2006, 11, 22), TimeValue.of(9, 1))); + DateTimeValue.of(DateValue.of(2006, 11, 22), TimeValue.of(9, 1))); assertThat(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)).move(DateValue.of(-2, -2, -2))).as("substract 2 all").isEqualTo( - DateTimeValue.of(DateValue.of(2005, 10, 21), TimeValue.of(9, 1))); + DateTimeValue.of(DateValue.of(2005, 10, 21), TimeValue.of(9, 1))); } /** @@ -786,64 +779,64 @@ public void test_move_date() { @Test public void test_move_time() { assertThat(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)).move(TimeValue.of(0, 0, 0, 1))).as("add 1 nano").isEqualTo( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 0, 1))); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 0, 1))); assertThat(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)).move(TimeValue.of(0, 0, 0, 2))).as("add 2 nanos").isEqualTo( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 0, 2))); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 0, 2))); assertThat(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)).move(TimeValue.of(0, 0, 0, -1))).as("substract 1 nano").isEqualTo( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 0, 59, 999999999))); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 0, 59, 999999999))); assertThat(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)).move(TimeValue.of(0, 0, 0, -2))).as("substract 2 nanos").isEqualTo( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 0, 59, 999999998))); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 0, 59, 999999998))); assertThat(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)).move(TimeValue.of(0, 0, 0, 1000000))).as("add 1 milli").isEqualTo( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 0, 1000000))); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 0, 1000000))); assertThat(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)).move(TimeValue.of(0, 0, 0, 2000000))).as("add 2 millis").isEqualTo( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 0, 2000000))); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 0, 2000000))); assertThat(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)).move(TimeValue.of(0, 0, 0, -1000000))).as("substract 1 milli").isEqualTo( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 0, 59, 999000000))); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 0, 59, 999000000))); assertThat(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)).move(TimeValue.of(0, 0, 0, -2000000))).as("substract 2 millis").isEqualTo( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 0, 59, 998000000))); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 0, 59, 998000000))); assertThat(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)).move(TimeValue.of(0, 0, 1))).as("add 1 second").isEqualTo( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 1))); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 1))); assertThat(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)).move(TimeValue.of(0, 0, 2))).as("add 2 seconds").isEqualTo( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 2))); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 2))); assertThat(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)).move(TimeValue.of(0, 0, -1))).as("substract 1 second").isEqualTo( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 0, 59, 0))); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 0, 59, 0))); assertThat(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)).move(TimeValue.of(0, 0, -2))).as("substract 2 seconds").isEqualTo( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 0, 58, 0))); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 0, 58, 0))); assertThat(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)).move(TimeValue.of(0, 1, 0))).as("add 1 minute").isEqualTo( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 2))); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 2))); assertThat(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)).move(TimeValue.of(0, 2, 0))).as("add 2 minutes").isEqualTo( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 3))); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 3))); assertThat(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)).move(TimeValue.of(0, -1, 0))).as("substract 1 minute").isEqualTo( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 0, 0, 0))); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 0, 0, 0))); assertThat(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)).move(TimeValue.of(0, -2, 0))).as("substract 2 minutes").isEqualTo( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(8, 59, 0, 0))); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(8, 59, 0, 0))); assertThat(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)).move(TimeValue.of(1, 0, 0))).as("add 1 hour").isEqualTo( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(10, 1))); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(10, 1))); assertThat(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)).move(TimeValue.of(2, 0, 0))).as("add 2 hours").isEqualTo( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(11, 1))); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(11, 1))); assertThat(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)).move(TimeValue.of(-1, 0, 0))).as("substract 1 hour").isEqualTo( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(8, 1, 0, 0))); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(8, 1, 0, 0))); assertThat(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)).move(TimeValue.of(-2, 0, 0))).as("substract 2 hours").isEqualTo( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(7, 1, 0, 0))); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(7, 1, 0, 0))); assertThat(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)).move(TimeValue.of(1, 1, 1, 1000000))).as("add 1 all").isEqualTo( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(10, 2, 1, 1000000))); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(10, 2, 1, 1000000))); assertThat(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)).move(TimeValue.of(2, 2, 2, 2000000))).as("add 2 all").isEqualTo( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(11, 3, 2, 2000000))); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(11, 3, 2, 2000000))); assertThat(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)).move(TimeValue.of(-1, -1, -1, -1000000))).as("substract 1 all").isEqualTo( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(7, 59, 58, 999000000))); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(7, 59, 58, 999000000))); assertThat(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)).move(TimeValue.of(-2, -2, -2, -2000000))).as("substract 2 all").isEqualTo( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(6, 58, 57, 998000000))); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(6, 58, 57, 998000000))); } /** @@ -852,128 +845,128 @@ public void test_move_time() { @Test public void test_move_datetime() { assertThat(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)) - .move(DateTimeValue.of(DateValue.of(0, 0, 0), TimeValue.of(0, 0, 0, 1)))).as("add 1 nano") - .isEqualTo( - DateTimeValue.of(DateValue.of(2007, 12, 23), - TimeValue.of(9, 1, 0, 1))); + .move(DateTimeValue.of(DateValue.of(0, 0, 0), TimeValue.of(0, 0, 0, 1)))).as("add 1 nano") + .isEqualTo( + DateTimeValue.of(DateValue.of(2007, 12, 23), + TimeValue.of(9, 1, 0, 1))); assertThat(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)).move(DateTimeValue.of(DateValue.of(0, 0, 0), TimeValue.of(0, 0, 0, 2)))).as( - "add 2 millis").isEqualTo( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 0, 2))); + "add 2 millis").isEqualTo( + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 0, 2))); assertThat(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)).move(DateTimeValue.of(DateValue.of(0, 0, 0), TimeValue.of(0, 0, 0, -1)))).as( - "substract 1 nanos").isEqualTo( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 0, 59, 999999999))); + "substract 1 nanos").isEqualTo( + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 0, 59, 999999999))); assertThat(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)).move(DateTimeValue.of(DateValue.of(0, 0, 0), TimeValue.of(0, 0, 0, -2)))).as( - "substract 2 nanos").isEqualTo( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 0, 59, 999999998))); + "substract 2 nanos").isEqualTo( + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 0, 59, 999999998))); assertThat(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)) - .move(DateTimeValue.of(DateValue.of(0, 0, 0), TimeValue.of(0, 0, 0, 1000000)))).as("add 1 milli") - .isEqualTo( - DateTimeValue.of(DateValue.of(2007, 12, 23), - TimeValue.of(9, 1, 0, 1000000))); + .move(DateTimeValue.of(DateValue.of(0, 0, 0), TimeValue.of(0, 0, 0, 1000000)))).as("add 1 milli") + .isEqualTo( + DateTimeValue.of(DateValue.of(2007, 12, 23), + TimeValue.of(9, 1, 0, 1000000))); assertThat(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)).move(DateTimeValue.of(DateValue.of(0, 0, 0), TimeValue.of(0, 0, 0, 2000000)))).as( - "add 2 millis").isEqualTo( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 0, 2000000))); + "add 2 millis").isEqualTo( + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 0, 2000000))); assertThat(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)).move(DateTimeValue.of(DateValue.of(0, 0, 0), TimeValue.of(0, 0, 0, -1000000)))).as( - "substract 1 milli").isEqualTo( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 0, 59, 999000000))); + "substract 1 milli").isEqualTo( + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 0, 59, 999000000))); assertThat(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)).move(DateTimeValue.of(DateValue.of(0, 0, 0), TimeValue.of(0, 0, 0, -2000000)))).as( - "substract 2 millis").isEqualTo( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 0, 59, 998000000))); + "substract 2 millis").isEqualTo( + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 0, 59, 998000000))); assertThat(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)).move(DateTimeValue.of(DateValue.of(0, 0, 0), TimeValue.of(0, 0, 1)))).as( - "add 1 second").isEqualTo( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 1))); + "add 1 second").isEqualTo( + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 1))); assertThat(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)).move(DateTimeValue.of(DateValue.of(0, 0, 0), TimeValue.of(0, 0, 2)))).as( - "add 2 seconds").isEqualTo( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 2))); + "add 2 seconds").isEqualTo( + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 2))); assertThat(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)).move(DateTimeValue.of(DateValue.of(0, 0, 0), TimeValue.of(0, 0, -1)))).as( - "substract 1 second").isEqualTo( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 0, 59, 0))); + "substract 1 second").isEqualTo( + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 0, 59, 0))); assertThat(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)).move(DateTimeValue.of(DateValue.of(0, 0, 0), TimeValue.of(0, 0, -2)))).as( - "substract 2 seconds").isEqualTo( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 0, 58, 0))); + "substract 2 seconds").isEqualTo( + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 0, 58, 0))); assertThat(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)).move(DateTimeValue.of(DateValue.of(0, 0, 0), TimeValue.of(0, 1, 0)))).as( - "add 1 minute").isEqualTo( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 2))); + "add 1 minute").isEqualTo( + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 2))); assertThat(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)).move(DateTimeValue.of(DateValue.of(0, 0, 0), TimeValue.of(0, 2, 0)))).as( - "add 2 minutes").isEqualTo( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 3))); + "add 2 minutes").isEqualTo( + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 3))); assertThat(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)).move(DateTimeValue.of(DateValue.of(0, 0, 0), TimeValue.of(0, -1, 0)))).as( - "substract 1 minute").isEqualTo( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 0, 0, 0))); + "substract 1 minute").isEqualTo( + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 0, 0, 0))); assertThat(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)).move(DateTimeValue.of(DateValue.of(0, 0, 0), TimeValue.of(0, -2, 0)))).as( - "substract 2 minutes").isEqualTo( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(8, 59, 0, 0))); + "substract 2 minutes").isEqualTo( + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(8, 59, 0, 0))); assertThat(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)).move(DateTimeValue.of(DateValue.of(0, 0, 0), TimeValue.of(1, 0, 0)))).as( - "add 1 hour").isEqualTo( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(10, 1))); + "add 1 hour").isEqualTo( + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(10, 1))); assertThat(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)).move(DateTimeValue.of(DateValue.of(0, 0, 0), TimeValue.of(2, 0, 0)))).as( - "add 2 hours").isEqualTo( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(11, 1))); + "add 2 hours").isEqualTo( + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(11, 1))); assertThat(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)).move(DateTimeValue.of(DateValue.of(0, 0, 0), TimeValue.of(-1, 0, 0)))).as( - "substract 1 hour").isEqualTo( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(8, 1, 0, 0))); + "substract 1 hour").isEqualTo( + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(8, 1, 0, 0))); assertThat(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)).move(DateTimeValue.of(DateValue.of(0, 0, 0), TimeValue.of(-2, 0, 0)))).as( - "substract 2 hours").isEqualTo( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(7, 1, 0, 0))); + "substract 2 hours").isEqualTo( + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(7, 1, 0, 0))); assertThat(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)).move(DateTimeValue.of(DateValue.of(0, 0, 1), TimeValue.of(0, 0)))).as("add 1 day").isEqualTo( - DateTimeValue.of(DateValue.of(2007, 12, 24), TimeValue.of(9, 1))); + DateTimeValue.of(DateValue.of(2007, 12, 24), TimeValue.of(9, 1))); assertThat(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)).move(DateTimeValue.of(DateValue.of(0, 0, 2), TimeValue.of(0, 0)))).as("add 2 days").isEqualTo( - DateTimeValue.of(DateValue.of(2007, 12, 25), TimeValue.of(9, 1))); + DateTimeValue.of(DateValue.of(2007, 12, 25), TimeValue.of(9, 1))); assertThat( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)).move(DateTimeValue.of(DateValue.of(0, 0, -1), TimeValue.of(0, 0)))).as("substract 1 day").isEqualTo( - DateTimeValue.of(DateValue.of(2007, 12, 22), TimeValue.of(9, 1))); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)).move(DateTimeValue.of(DateValue.of(0, 0, -1), TimeValue.of(0, 0)))).as("substract 1 day").isEqualTo( + DateTimeValue.of(DateValue.of(2007, 12, 22), TimeValue.of(9, 1))); assertThat( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)).move(DateTimeValue.of(DateValue.of(0, 0, -2), TimeValue.of(0, 0)))).as("substract 2 days").isEqualTo( - DateTimeValue.of(DateValue.of(2007, 12, 21), TimeValue.of(9, 1))); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)).move(DateTimeValue.of(DateValue.of(0, 0, -2), TimeValue.of(0, 0)))).as("substract 2 days").isEqualTo( + DateTimeValue.of(DateValue.of(2007, 12, 21), TimeValue.of(9, 1))); assertThat(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)).move(DateTimeValue.of(DateValue.of(0, 1, 0), TimeValue.of(0, 0)))).as("add 1 month") - .isEqualTo(DateTimeValue.of( - DateValue - .of(2008, - 1, - 23), TimeValue.of(9, 1))); + .isEqualTo(DateTimeValue.of( + DateValue + .of(2008, + 1, + 23), TimeValue.of(9, 1))); assertThat(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)).move(DateTimeValue.of(DateValue.of(0, 2, 0), TimeValue.of(0, 0)))).as("add 2 months") - .isEqualTo(DateTimeValue.of(DateValue.of(2008, 2, 23), TimeValue.of(9, 1))); + .isEqualTo(DateTimeValue.of(DateValue.of(2008, 2, 23), TimeValue.of(9, 1))); assertThat(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)).move(DateTimeValue.of(DateValue.of(0, -1, 0), TimeValue.of(0, 0)))).as("substract 1 month") - .isEqualTo(DateTimeValue.of(DateValue.of(2007, 11, 23), TimeValue.of(9, 1))); + .isEqualTo(DateTimeValue.of(DateValue.of(2007, 11, 23), TimeValue.of(9, 1))); assertThat(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)).move(DateTimeValue.of(DateValue.of(0, -2, 0), TimeValue.of(0, 0)))).as("substract 2 months") - .isEqualTo(DateTimeValue.of(DateValue.of(2007, 10, 23), TimeValue.of(9, 1))); + .isEqualTo(DateTimeValue.of(DateValue.of(2007, 10, 23), TimeValue.of(9, 1))); assertThat(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)).move(DateTimeValue.of(DateValue.of(1, 0, 0), TimeValue.of(0, 0)))).as("add 1 year") - .isEqualTo(DateTimeValue.of(DateValue.of(2008, 12, 23), TimeValue.of(9, 1))); + .isEqualTo(DateTimeValue.of(DateValue.of(2008, 12, 23), TimeValue.of(9, 1))); assertThat(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)).move(DateTimeValue.of(DateValue.of(2, 0, 0), TimeValue.of(0, 0)))).as("add 2 years") - .isEqualTo(DateTimeValue.of(DateValue.of(2009, 12, 23), TimeValue.of(9, 1))); + .isEqualTo(DateTimeValue.of(DateValue.of(2009, 12, 23), TimeValue.of(9, 1))); assertThat(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)).move(DateTimeValue.of(DateValue.of(-1, 0, 0), TimeValue.of(0, 0)))).as("substract 1 year") - .isEqualTo(DateTimeValue.of(DateValue.of(2006, 12, 23), TimeValue.of(9, 1))); + .isEqualTo(DateTimeValue.of(DateValue.of(2006, 12, 23), TimeValue.of(9, 1))); assertThat(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)).move(DateTimeValue.of(DateValue.of(-2, 0, 0), TimeValue.of(0, 0)))).as("substract 2 years") - .isEqualTo(DateTimeValue.of(DateValue.of(2005, 12, 23), TimeValue.of(9, 1))); + .isEqualTo(DateTimeValue.of(DateValue.of(2005, 12, 23), TimeValue.of(9, 1))); assertThat(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)).move(DateTimeValue.of(DateValue.of(1, 1, 1), TimeValue.of(1, 1, 1, 1000000)))).as( - "add 1 all").isEqualTo( - DateTimeValue.of(DateValue.of(2009, 1, 24), TimeValue.of(10, 2, 1, 1000000))); + "add 1 all").isEqualTo( + DateTimeValue.of(DateValue.of(2009, 1, 24), TimeValue.of(10, 2, 1, 1000000))); assertThat(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)).move(DateTimeValue.of(DateValue.of(2, 2, 2), TimeValue.of(2, 2, 2, 2000000)))).as( - "add 2 all").isEqualTo( - DateTimeValue.of(DateValue.of(2010, 2, 25), TimeValue.of(11, 3, 2, 2000000))); + "add 2 all").isEqualTo( + DateTimeValue.of(DateValue.of(2010, 2, 25), TimeValue.of(11, 3, 2, 2000000))); assertThat(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)).move(DateTimeValue.of(DateValue.of(-1, -1, -1), TimeValue.of(-1, -1, -1, -1000000)))).as( - "substract 1 all").isEqualTo( - DateTimeValue.of(DateValue.of(2006, 11, 22), TimeValue.of(7, 59, 58, 999000000))); + "substract 1 all").isEqualTo( + DateTimeValue.of(DateValue.of(2006, 11, 22), TimeValue.of(7, 59, 58, 999000000))); assertThat(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)).move(DateTimeValue.of(DateValue.of(-2, -2, -2), TimeValue.of(-2, -2, -2, -2000000)))).as( - "substract 2 all").isEqualTo( - DateTimeValue.of(DateValue.of(2005, 10, 21), TimeValue.of(6, 58, 57, 998000000))); + "substract 2 all").isEqualTo( + DateTimeValue.of(DateValue.of(2005, 10, 21), TimeValue.of(6, 58, 57, 998000000))); } /** @@ -982,8 +975,8 @@ public void test_move_datetime() { @Test public void test_reverse() { assertThat(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)).reverse()) - .isEqualTo(DateTimeValue.of(DateValue.of(-2007, -12, -23), TimeValue.of(-9, -1))); + .isEqualTo(DateTimeValue.of(DateValue.of(-2007, -12, -23), TimeValue.of(-9, -1))); assertThat(DateTimeValue.of(DateValue.of(1, 1, 1), TimeValue.of(1, 1, 1, 1)).reverse()) - .isEqualTo(DateTimeValue.of(DateValue.of(-1, -1, -1), TimeValue.of(-1, -1, -1, -1))); + .isEqualTo(DateTimeValue.of(DateValue.of(-1, -1, -1), TimeValue.of(-1, -1, -1, -1))); } } diff --git a/src/test/java/org/assertj/db/type/DateValue_Test.java b/src/test/java/org/assertj/db/type/DateValue_Test.java index ebbe8b36..5103463b 100644 --- a/src/test/java/org/assertj/db/type/DateValue_Test.java +++ b/src/test/java/org/assertj/db/type/DateValue_Test.java @@ -8,25 +8,24 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.type; -import org.assertj.db.common.AbstractTest; -import org.junit.Test; +import static org.assertj.core.api.Assertions.assertThat; import java.sql.Date; import java.text.ParseException; import java.time.LocalDate; import java.util.Calendar; -import static org.assertj.core.api.Assertions.assertThat; +import org.assertj.db.common.AbstractTest; +import org.junit.Test; /** * Tests on the date value. * * @author Régis Pouiller - * */ public class DateValue_Test extends AbstractTest { @@ -150,11 +149,11 @@ public void test_now() throws ParseException { DateValue dateValue = DateValue.now(); Calendar calendarSecond = Calendar.getInstance(); assertThat(dateValue.getDayOfTheMonth()).isBetween(calendarFirst.get(Calendar.DAY_OF_MONTH), - calendarSecond.get(Calendar.DAY_OF_MONTH)); + calendarSecond.get(Calendar.DAY_OF_MONTH)); assertThat(dateValue.getMonth()).isBetween(calendarFirst.get(Calendar.MONTH) + 1, - calendarSecond.get(Calendar.MONTH) + 1); + calendarSecond.get(Calendar.MONTH) + 1); assertThat(dateValue.getYear()).isBetween(calendarFirst.get(Calendar.YEAR), - calendarSecond.get(Calendar.YEAR)); + calendarSecond.get(Calendar.YEAR)); } /** @@ -295,33 +294,33 @@ public void test_equals() { assertThat(DateValue.of(2007, 12, 23).equals(DateValue.of(2007, 12, 23))).isTrue(); assertThat(DateValue.of(2007, 12, 23).equals(DateTimeValue.of(DateValue.of(2007, 12, 23)))).isTrue(); assertThat(DateValue.of(2007, 12, 23).equals(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(0, 0)))) - .isTrue(); + .isTrue(); assertThat(DateValue.of(2007, 12, 23).equals(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(0, 0, 0)))) - .isTrue(); + .isTrue(); assertThat( - DateValue.of(2007, 12, 23).equals(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(0, 0, 0, 0)))) - .isTrue(); + DateValue.of(2007, 12, 23).equals(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(0, 0, 0, 0)))) + .isTrue(); assertThat(DateValue.of(2007, 12, 23).equals(DateValue.of(2008, 12, 23))).isFalse(); assertThat(DateValue.of(2007, 12, 23).equals(DateValue.of(2007, 1, 23))).isFalse(); assertThat(DateValue.of(2007, 12, 23).equals(DateValue.of(2007, 12, 24))).isFalse(); assertThat(DateValue.of(2007, 12, 23).equals(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 0)))) - .isFalse(); + .isFalse(); assertThat(DateValue.of(2007, 12, 23).equals(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(0, 1)))) - .isFalse(); + .isFalse(); assertThat(DateValue.of(2007, 12, 23).equals(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(0, 0, 6)))) - .isFalse(); + .isFalse(); assertThat( - DateValue.of(2007, 12, 23).equals(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(0, 0, 0, 3)))) - .isFalse(); + DateValue.of(2007, 12, 23).equals(DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(0, 0, 0, 3)))) + .isFalse(); assertThat( - DateValue.of(2007, 12, 23).equals(DateTimeValue.of(DateValue.of(2008, 12, 23), TimeValue.of(0, 0, 0, 0)))) - .isFalse(); + DateValue.of(2007, 12, 23).equals(DateTimeValue.of(DateValue.of(2008, 12, 23), TimeValue.of(0, 0, 0, 0)))) + .isFalse(); assertThat(DateValue.of(2007, 12, 23).equals(DateTimeValue.of(DateValue.of(2007, 1, 23), TimeValue.of(0, 0, 0, 0)))) - .isFalse(); + .isFalse(); assertThat( - DateValue.of(2007, 12, 23).equals(DateTimeValue.of(DateValue.of(2007, 12, 24), TimeValue.of(0, 0, 0, 0)))) - .isFalse(); + DateValue.of(2007, 12, 23).equals(DateTimeValue.of(DateValue.of(2007, 12, 24), TimeValue.of(0, 0, 0, 0)))) + .isFalse(); assertThat(DateValue.of(2007, 12, 23).equals(DateTimeValue.of(DateValue.of(2007, 12, 24)))).isFalse(); assertThat(DateValue.of(2007, 12, 23).equals("")).isFalse(); } @@ -408,14 +407,14 @@ public void test_isMidnight() { @Test public void test_move_date() { assertThat(DateValue.of(2007, 12, 23).move(DateValue.of(0, 0, 1))).as("add 1 day").isEqualTo( - DateValue.of(2007, 12, 24)); + DateValue.of(2007, 12, 24)); assertThat(DateValue.of(2007, 12, 23).move(DateValue.of(0, 0, 2))).as("add 2 days").isEqualTo( - DateValue.of(2007, 12, 25)); + DateValue.of(2007, 12, 25)); assertThat(DateValue.of(2007, 12, 23).move(DateValue.of(0, 0, -1))).as("substract 1 day").isEqualTo( - DateValue.of(2007, 12, 22)); + DateValue.of(2007, 12, 22)); assertThat(DateValue.of(2007, 12, 23).move(DateValue.of(0, 0, -2))).as("substract 2 days").isEqualTo( - DateValue.of(2007, 12, 21)); + DateValue.of(2007, 12, 21)); assertThat(DateValue.of(2007, 12, 23).move(DateValue.of(0, 1, 0))).as("add 1 month").isEqualTo(DateValue.of(2008, 1, 23)); assertThat(DateValue.of(2007, 12, 23).move(DateValue.of(0, 2, 0))).as("add 2 months").isEqualTo(DateValue.of(2008, 2, 23)); @@ -442,54 +441,54 @@ public void test_move_date() { @Test public void test_move_time() { assertThat(DateValue.of(2007, 12, 23).move(TimeValue.of(0, 0, 0, 1000000))).as("add 1 milli").isEqualTo( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(0, 0, 0, 1000000))); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(0, 0, 0, 1000000))); assertThat(DateValue.of(2007, 12, 23).move(TimeValue.of(0, 0, 0, 2000000))).as("add 2 millis").isEqualTo( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(0, 0, 0, 2000000))); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(0, 0, 0, 2000000))); assertThat(DateValue.of(2007, 12, 23).move(TimeValue.of(0, 0, 0, -1000000))).as("substract 1 milli").isEqualTo( - DateTimeValue.of(DateValue.of(2007, 12, 22), TimeValue.of(23, 59, 59, 999000000))); + DateTimeValue.of(DateValue.of(2007, 12, 22), TimeValue.of(23, 59, 59, 999000000))); assertThat(DateValue.of(2007, 12, 23).move(TimeValue.of(0, 0, 0, -2000000))).as("substract 2 millis").isEqualTo( - DateTimeValue.of(DateValue.of(2007, 12, 22), TimeValue.of(23, 59, 59, 998000000))); + DateTimeValue.of(DateValue.of(2007, 12, 22), TimeValue.of(23, 59, 59, 998000000))); assertThat(DateValue.of(2007, 12, 23).move(TimeValue.of(0, 0, 1))).as("add 1 second").isEqualTo( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(0, 0, 1))); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(0, 0, 1))); assertThat(DateValue.of(2007, 12, 23).move(TimeValue.of(0, 0, 2))).as("add 2 seconds").isEqualTo( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(0, 0, 2))); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(0, 0, 2))); assertThat(DateValue.of(2007, 12, 23).move(TimeValue.of(0, 0, -1))).as("substract 1 second").isEqualTo( - DateTimeValue.of(DateValue.of(2007, 12, 22), TimeValue.of(23, 59, 59, 0))); + DateTimeValue.of(DateValue.of(2007, 12, 22), TimeValue.of(23, 59, 59, 0))); assertThat(DateValue.of(2007, 12, 23).move(TimeValue.of(0, 0, -2))).as("substract 2 seconds").isEqualTo( - DateTimeValue.of(DateValue.of(2007, 12, 22), TimeValue.of(23, 59, 58, 0))); + DateTimeValue.of(DateValue.of(2007, 12, 22), TimeValue.of(23, 59, 58, 0))); assertThat(DateValue.of(2007, 12, 23).move(TimeValue.of(0, 1, 0))).as("add 1 minute").isEqualTo( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(0, 1))); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(0, 1))); assertThat(DateValue.of(2007, 12, 23).move(TimeValue.of(0, 2, 0))).as("add 2 minutes").isEqualTo( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(0, 2))); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(0, 2))); assertThat(DateValue.of(2007, 12, 23).move(TimeValue.of(0, -1, 0))).as("substract 1 minute").isEqualTo( - DateTimeValue.of(DateValue.of(2007, 12, 22), TimeValue.of(23, 59, 0, 0))); + DateTimeValue.of(DateValue.of(2007, 12, 22), TimeValue.of(23, 59, 0, 0))); assertThat(DateValue.of(2007, 12, 23).move(TimeValue.of(0, -2, 0))).as("substract 2 minutes").isEqualTo( - DateTimeValue.of(DateValue.of(2007, 12, 22), TimeValue.of(23, 58, 0, 0))); + DateTimeValue.of(DateValue.of(2007, 12, 22), TimeValue.of(23, 58, 0, 0))); assertThat(DateValue.of(2007, 12, 23).move(TimeValue.of(1, 0, 0))).as("add 1 hour").isEqualTo( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(1, 0))); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(1, 0))); assertThat(DateValue.of(2007, 12, 23).move(TimeValue.of(2, 0, 0))).as("add 2 hours").isEqualTo( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(2, 0))); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(2, 0))); assertThat(DateValue.of(2007, 12, 23).move(TimeValue.of(-1, 0, 0))).as("substract 1 hour").isEqualTo( - DateTimeValue.of(DateValue.of(2007, 12, 22), TimeValue.of(23, 0, 0, 0))); + DateTimeValue.of(DateValue.of(2007, 12, 22), TimeValue.of(23, 0, 0, 0))); assertThat(DateValue.of(2007, 12, 23).move(TimeValue.of(-2, 0, 0))).as("substract 2 hours").isEqualTo( - DateTimeValue.of(DateValue.of(2007, 12, 22), TimeValue.of(22, 0, 0, 0))); + DateTimeValue.of(DateValue.of(2007, 12, 22), TimeValue.of(22, 0, 0, 0))); assertThat(DateValue.of(2007, 12, 23).move(TimeValue.of(1, 1, 1, 1000000))).as("add 1 all").isEqualTo( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(1, 1, 1, 1000000))); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(1, 1, 1, 1000000))); assertThat(DateValue.of(2007, 12, 23).move(TimeValue.of(2, 2, 2, 2000000))).as("add 2 all").isEqualTo( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(2, 2, 2, 2000000))); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(2, 2, 2, 2000000))); assertThat(DateValue.of(2007, 12, 23).move(TimeValue.of(-1, -1, -1, -1000000))).as("substract 1 all").isEqualTo( - DateTimeValue.of(DateValue.of(2007, 12, 22), TimeValue.of(22, 58, 58, 999000000))); + DateTimeValue.of(DateValue.of(2007, 12, 22), TimeValue.of(22, 58, 58, 999000000))); assertThat(DateValue.of(2007, 12, 23).move(TimeValue.of(-2, -2, -2, -2000000))).as("substract 2 all").isEqualTo( - DateTimeValue.of(DateValue.of(2007, 12, 22), TimeValue.of(21, 57, 57, 998000000))); + DateTimeValue.of(DateValue.of(2007, 12, 22), TimeValue.of(21, 57, 57, 998000000))); } /** @@ -498,108 +497,108 @@ public void test_move_time() { @Test public void test_move_datetime() { assertThat(DateValue.of(2007, 12, 23) - .move(DateTimeValue.of(DateValue.of(0, 0, 0), TimeValue.of(0, 0, 0, 1000000)))).as("add 1 milli") - .isEqualTo( - DateTimeValue.of(DateValue.of(2007, 12, 23), - TimeValue.of(0, 0, 0, 1000000))); + .move(DateTimeValue.of(DateValue.of(0, 0, 0), TimeValue.of(0, 0, 0, 1000000)))).as("add 1 milli") + .isEqualTo( + DateTimeValue.of(DateValue.of(2007, 12, 23), + TimeValue.of(0, 0, 0, 1000000))); assertThat(DateValue.of(2007, 12, 23).move(DateTimeValue.of(DateValue.of(0, 0, 0), TimeValue.of(0, 0, 0, 2000000)))).as( - "add 2 millis").isEqualTo( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(0, 0, 0, 2000000))); + "add 2 millis").isEqualTo( + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(0, 0, 0, 2000000))); assertThat(DateValue.of(2007, 12, 23).move(DateTimeValue.of(DateValue.of(0, 0, 0), TimeValue.of(0, 0, 0, -1000000)))).as( - "substract 1 milli").isEqualTo( - DateTimeValue.of(DateValue.of(2007, 12, 22), TimeValue.of(23, 59, 59, 999000000))); + "substract 1 milli").isEqualTo( + DateTimeValue.of(DateValue.of(2007, 12, 22), TimeValue.of(23, 59, 59, 999000000))); assertThat(DateValue.of(2007, 12, 23).move(DateTimeValue.of(DateValue.of(0, 0, 0), TimeValue.of(0, 0, 0, -2000000)))).as( - "substract 2 millis").isEqualTo( - DateTimeValue.of(DateValue.of(2007, 12, 22), TimeValue.of(23, 59, 59, 998000000))); + "substract 2 millis").isEqualTo( + DateTimeValue.of(DateValue.of(2007, 12, 22), TimeValue.of(23, 59, 59, 998000000))); assertThat(DateValue.of(2007, 12, 23).move(DateTimeValue.of(DateValue.of(0, 0, 0), TimeValue.of(0, 0, 1)))).as( - "add 1 second").isEqualTo( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(0, 0, 1))); + "add 1 second").isEqualTo( + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(0, 0, 1))); assertThat(DateValue.of(2007, 12, 23).move(DateTimeValue.of(DateValue.of(0, 0, 0), TimeValue.of(0, 0, 2)))).as( - "add 2 seconds").isEqualTo( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(0, 0, 2))); + "add 2 seconds").isEqualTo( + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(0, 0, 2))); assertThat(DateValue.of(2007, 12, 23).move(DateTimeValue.of(DateValue.of(0, 0, 0), TimeValue.of(0, 0, -1)))).as( - "substract 1 second").isEqualTo( - DateTimeValue.of(DateValue.of(2007, 12, 22), TimeValue.of(23, 59, 59, 0))); + "substract 1 second").isEqualTo( + DateTimeValue.of(DateValue.of(2007, 12, 22), TimeValue.of(23, 59, 59, 0))); assertThat(DateValue.of(2007, 12, 23).move(DateTimeValue.of(DateValue.of(0, 0, 0), TimeValue.of(0, 0, -2)))).as( - "substract 2 seconds").isEqualTo( - DateTimeValue.of(DateValue.of(2007, 12, 22), TimeValue.of(23, 59, 58, 0))); + "substract 2 seconds").isEqualTo( + DateTimeValue.of(DateValue.of(2007, 12, 22), TimeValue.of(23, 59, 58, 0))); assertThat(DateValue.of(2007, 12, 23).move(DateTimeValue.of(DateValue.of(0, 0, 0), TimeValue.of(0, 1, 0)))).as( - "add 1 minute").isEqualTo( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(0, 1))); + "add 1 minute").isEqualTo( + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(0, 1))); assertThat(DateValue.of(2007, 12, 23).move(DateTimeValue.of(DateValue.of(0, 0, 0), TimeValue.of(0, 2, 0)))).as( - "add 2 minutes").isEqualTo( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(0, 2))); + "add 2 minutes").isEqualTo( + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(0, 2))); assertThat(DateValue.of(2007, 12, 23).move(DateTimeValue.of(DateValue.of(0, 0, 0), TimeValue.of(0, -1, 0)))).as( - "substract 1 minute").isEqualTo( - DateTimeValue.of(DateValue.of(2007, 12, 22), TimeValue.of(23, 59, 0, 0))); + "substract 1 minute").isEqualTo( + DateTimeValue.of(DateValue.of(2007, 12, 22), TimeValue.of(23, 59, 0, 0))); assertThat(DateValue.of(2007, 12, 23).move(DateTimeValue.of(DateValue.of(0, 0, 0), TimeValue.of(0, -2, 0)))).as( - "substract 2 minutes").isEqualTo( - DateTimeValue.of(DateValue.of(2007, 12, 22), TimeValue.of(23, 58, 0, 0))); + "substract 2 minutes").isEqualTo( + DateTimeValue.of(DateValue.of(2007, 12, 22), TimeValue.of(23, 58, 0, 0))); assertThat(DateValue.of(2007, 12, 23).move(DateTimeValue.of(DateValue.of(0, 0, 0), TimeValue.of(1, 0, 0)))).as( - "add 1 hour").isEqualTo( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(1, 0))); + "add 1 hour").isEqualTo( + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(1, 0))); assertThat(DateValue.of(2007, 12, 23).move(DateTimeValue.of(DateValue.of(0, 0, 0), TimeValue.of(2, 0, 0)))).as( - "add 2 hours").isEqualTo( - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(2, 0))); + "add 2 hours").isEqualTo( + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(2, 0))); assertThat(DateValue.of(2007, 12, 23).move(DateTimeValue.of(DateValue.of(0, 0, 0), TimeValue.of(-1, 0, 0)))).as( - "substract 1 hour").isEqualTo( - DateTimeValue.of(DateValue.of(2007, 12, 22), TimeValue.of(23, 0, 0, 0))); + "substract 1 hour").isEqualTo( + DateTimeValue.of(DateValue.of(2007, 12, 22), TimeValue.of(23, 0, 0, 0))); assertThat(DateValue.of(2007, 12, 23).move(DateTimeValue.of(DateValue.of(0, 0, 0), TimeValue.of(-2, 0, 0)))).as( - "substract 2 hours").isEqualTo( - DateTimeValue.of(DateValue.of(2007, 12, 22), TimeValue.of(22, 0, 0, 0))); + "substract 2 hours").isEqualTo( + DateTimeValue.of(DateValue.of(2007, 12, 22), TimeValue.of(22, 0, 0, 0))); assertThat(DateValue.of(2007, 12, 23).move(DateTimeValue.of(DateValue.of(0, 0, 1), TimeValue.of(0, 0)))).as("add 1 day").isEqualTo( - DateTimeValue.of(DateValue.of(2007, 12, 24))); + DateTimeValue.of(DateValue.of(2007, 12, 24))); assertThat(DateValue.of(2007, 12, 23).move(DateTimeValue.of(DateValue.of(0, 0, 2), TimeValue.of(0, 0)))).as("add 2 days").isEqualTo( - DateTimeValue.of(DateValue.of(2007, 12, 25))); + DateTimeValue.of(DateValue.of(2007, 12, 25))); assertThat( - DateValue.of(2007, 12, 23).move(DateTimeValue.of(DateValue.of(0, 0, -1), TimeValue.of(0, 0)))).as("substract 1 day").isEqualTo( - DateTimeValue.of(DateValue.of(2007, 12, 22))); + DateValue.of(2007, 12, 23).move(DateTimeValue.of(DateValue.of(0, 0, -1), TimeValue.of(0, 0)))).as("substract 1 day").isEqualTo( + DateTimeValue.of(DateValue.of(2007, 12, 22))); assertThat( - DateValue.of(2007, 12, 23).move(DateTimeValue.of(DateValue.of(0, 0, -2), TimeValue.of(0, 0)))).as("substract 2 days").isEqualTo( - DateTimeValue.of(DateValue.of(2007, 12, 21))); + DateValue.of(2007, 12, 23).move(DateTimeValue.of(DateValue.of(0, 0, -2), TimeValue.of(0, 0)))).as("substract 2 days").isEqualTo( + DateTimeValue.of(DateValue.of(2007, 12, 21))); assertThat(DateValue.of(2007, 12, 23).move(DateTimeValue.of(DateValue.of(0, 1, 0), TimeValue.of(0, 0)))).as("add 1 month") - .isEqualTo(DateTimeValue.of(DateValue.of(2008, 1, 23))); + .isEqualTo(DateTimeValue.of(DateValue.of(2008, 1, 23))); assertThat(DateValue.of(2007, 12, 23).move(DateTimeValue.of(DateValue.of(0, 2, 0), TimeValue.of(0, 0)))).as("add 2 months") - .isEqualTo(DateTimeValue.of(DateValue.of(2008, 2, 23))); + .isEqualTo(DateTimeValue.of(DateValue.of(2008, 2, 23))); assertThat(DateValue.of(2007, 12, 23).move(DateTimeValue.of(DateValue.of(0, -1, 0), TimeValue.of(0, 0)))).as("substract 1 month") - .isEqualTo(DateTimeValue.of(DateValue.of(2007, 11, 23))); + .isEqualTo(DateTimeValue.of(DateValue.of(2007, 11, 23))); assertThat(DateValue.of(2007, 12, 23).move(DateTimeValue.of(DateValue.of(0, -2, 0), TimeValue.of(0, 0)))).as("substract 2 months") - .isEqualTo(DateTimeValue.of(DateValue.of(2007, 10, 23))); + .isEqualTo(DateTimeValue.of(DateValue.of(2007, 10, 23))); assertThat(DateValue.of(2007, 12, 23).move(DateTimeValue.of(DateValue.of(1, 0, 0), TimeValue.of(0, 0)))).as("add 1 year") - .isEqualTo(DateTimeValue.of(DateValue.of(2008, 12, 23))); + .isEqualTo(DateTimeValue.of(DateValue.of(2008, 12, 23))); assertThat(DateValue.of(2007, 12, 23).move(DateTimeValue.of(DateValue.of(2, 0, 0), TimeValue.of(0, 0)))).as("add 2 years") - .isEqualTo(DateTimeValue.of(DateValue.of(2009, 12, 23))); + .isEqualTo(DateTimeValue.of(DateValue.of(2009, 12, 23))); assertThat(DateValue.of(2007, 12, 23).move(DateTimeValue.of(DateValue.of(-1, 0, 0), TimeValue.of(0, 0)))).as("substract 1 year") - .isEqualTo(DateTimeValue.of(DateValue.of(2006, 12, 23))); + .isEqualTo(DateTimeValue.of(DateValue.of(2006, 12, 23))); assertThat(DateValue.of(2007, 12, 23).move(DateTimeValue.of(DateValue.of(-2, 0, 0), TimeValue.of(0, 0)))).as("substract 2 years") - .isEqualTo(DateTimeValue.of(DateValue.of(2005, 12, 23))); + .isEqualTo(DateTimeValue.of(DateValue.of(2005, 12, 23))); assertThat(DateValue.of(2007, 12, 23).move(DateTimeValue.of(DateValue.of(1, 1, 1), TimeValue.of(1, 1, 1, 1000000)))).as( - "add 1 all").isEqualTo( - DateTimeValue.of(DateValue.of(2009, 1, 24), TimeValue.of(1, 1, 1, 1000000))); + "add 1 all").isEqualTo( + DateTimeValue.of(DateValue.of(2009, 1, 24), TimeValue.of(1, 1, 1, 1000000))); assertThat(DateValue.of(2007, 12, 23).move(DateTimeValue.of(DateValue.of(2, 2, 2), TimeValue.of(2, 2, 2, 2000000)))).as( - "add 2 all").isEqualTo( - DateTimeValue.of(DateValue.of(2010, 2, 25), TimeValue.of(2, 2, 2, 2000000))); + "add 2 all").isEqualTo( + DateTimeValue.of(DateValue.of(2010, 2, 25), TimeValue.of(2, 2, 2, 2000000))); assertThat(DateValue.of(2007, 12, 23).move(DateTimeValue.of(DateValue.of(-1, -1, -1), TimeValue.of(-1, -1, -1, -1000000)))).as( - "substract 1 all").isEqualTo( - DateTimeValue.of(DateValue.of(2006, 11, 21), TimeValue.of(22, 58, 58, 999000000))); + "substract 1 all").isEqualTo( + DateTimeValue.of(DateValue.of(2006, 11, 21), TimeValue.of(22, 58, 58, 999000000))); assertThat(DateValue.of(2007, 12, 23).move(DateTimeValue.of(DateValue.of(-2, -2, -2), TimeValue.of(-2, -2, -2, -2000000)))).as( - "substract 2 all").isEqualTo( - DateTimeValue.of(DateValue.of(2005, 10, 20), TimeValue.of(21, 57, 57, 998000000))); + "substract 2 all").isEqualTo( + DateTimeValue.of(DateValue.of(2005, 10, 20), TimeValue.of(21, 57, 57, 998000000))); } /** diff --git a/src/test/java/org/assertj/db/type/OrderType_ValueOf_Test.java b/src/test/java/org/assertj/db/type/OrderType_ValueOf_Test.java index 07467047..3e17da76 100644 --- a/src/test/java/org/assertj/db/type/OrderType_ValueOf_Test.java +++ b/src/test/java/org/assertj/db/type/OrderType_ValueOf_Test.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.type; @@ -20,18 +20,17 @@ /** * Test on the type got from {@code valueOf} method from {@code OrderType} enum. - * + * * @author Régis Pouiller - * */ public class OrderType_ValueOf_Test extends AbstractTest { - /** - * This method tests the result of {@code valueOf} method from {@code OrderType} enum. - */ - @Test - public void test_result_of_valueOf() { - assertThat(OrderType.valueOf("ASC")).isEqualTo(OrderType.ASC); - assertThat(OrderType.valueOf("DESC")).isEqualTo(OrderType.DESC); - } + /** + * This method tests the result of {@code valueOf} method from {@code OrderType} enum. + */ + @Test + public void test_result_of_valueOf() { + assertThat(OrderType.valueOf("ASC")).isEqualTo(OrderType.ASC); + assertThat(OrderType.valueOf("DESC")).isEqualTo(OrderType.DESC); + } } diff --git a/src/test/java/org/assertj/db/type/Order_Equals_Test.java b/src/test/java/org/assertj/db/type/Order_Equals_Test.java index 1798c265..80edbc6c 100644 --- a/src/test/java/org/assertj/db/type/Order_Equals_Test.java +++ b/src/test/java/org/assertj/db/type/Order_Equals_Test.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.type; @@ -21,23 +21,22 @@ /** * Test on the type got from {@code equals} method from {@code Order} enum. - * + * * @author Régis Pouiller - * */ public class Order_Equals_Test extends AbstractTest { - /** - * This method tests the result of {@code equals} method from {@code Order} enum. - */ - @Test - public void test_result_of_equals() { - assertTrue(Order.asc("test").equals(Order.asc("test"))); - assertFalse(Order.asc("test").equals(Order.asc("testt"))); - assertFalse(Order.asc("test").equals(Order.desc("test"))); - assertTrue(Order.asc(null).equals(Order.asc(null))); - assertFalse(Order.asc("test").equals(Order.asc(null))); - assertFalse(Order.asc(null).equals(Order.asc("test"))); - assertFalse(Order.asc("test").equals("test")); - } + /** + * This method tests the result of {@code equals} method from {@code Order} enum. + */ + @Test + public void test_result_of_equals() { + assertTrue(Order.asc("test").equals(Order.asc("test"))); + assertFalse(Order.asc("test").equals(Order.asc("testt"))); + assertFalse(Order.asc("test").equals(Order.desc("test"))); + assertTrue(Order.asc(null).equals(Order.asc(null))); + assertFalse(Order.asc("test").equals(Order.asc(null))); + assertFalse(Order.asc(null).equals(Order.asc("test"))); + assertFalse(Order.asc("test").equals("test")); + } } diff --git a/src/test/java/org/assertj/db/type/Request_Columns_Name_Test.java b/src/test/java/org/assertj/db/type/Request_Columns_Name_Test.java index 5684a312..e028986e 100644 --- a/src/test/java/org/assertj/db/type/Request_Columns_Name_Test.java +++ b/src/test/java/org/assertj/db/type/Request_Columns_Name_Test.java @@ -8,24 +8,23 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.type; +import static org.assertj.core.api.Assertions.assertThat; + import org.assertj.db.common.AbstractTest; import org.assertj.db.exception.AssertJDBException; import org.junit.Test; -import static org.assertj.core.api.Assertions.assertThat; - /** * Tests on the columns name of {@code Request}. *

    * These tests are on the name of the columns got from a {@code Request}. *

    - * + * * @author Régis Pouiller - * */ public class Request_Columns_Name_Test extends AbstractTest { @@ -34,16 +33,16 @@ public class Request_Columns_Name_Test extends AbstractTest { */ @Test public void test_columns_name_with_source_set() { - Request request = new Request(source, - "SELECT actor.name, actor.firstname, movie.year, interpretation.character " + Request request = new Request(source, + "SELECT actor.name, actor.firstname, movie.year, interpretation.character " + " FROM movie, actor, interpretation" + " WHERE movie.id = interpretation.id_movie" + " AND interpretation.id_actor = actor.id" + " ORDER BY actor.name, movie.year"); assertThat(request.getColumnsNameList()).as("Columns of the request") - .hasSize(4) - .containsExactly("NAME", "FIRSTNAME", "YEAR", "CHARACTER"); + .hasSize(4) + .containsExactly("NAME", "FIRSTNAME", "YEAR", "CHARACTER"); } /** @@ -51,16 +50,16 @@ public void test_columns_name_with_source_set() { */ @Test public void test_columns_name_with_datasource_set() { - Request request = new Request(dataSource, - "SELECT actor.name, actor.firstname, movie.year, interpretation.character " + Request request = new Request(dataSource, + "SELECT actor.name, actor.firstname, movie.year, interpretation.character " + " FROM movie, actor, interpretation" + " WHERE movie.id = interpretation.id_movie" + " AND interpretation.id_actor = actor.id" + " ORDER BY actor.name, movie.year"); assertThat(request.getColumnsNameList()).as("Columns of the request") - .hasSize(4) - .containsExactly("NAME", "FIRSTNAME", "YEAR", "CHARACTER"); + .hasSize(4) + .containsExactly("NAME", "FIRSTNAME", "YEAR", "CHARACTER"); } /** @@ -68,17 +67,17 @@ public void test_columns_name_with_datasource_set() { */ @Test public void test_columns_name_with_source_and_parameters_set() { - Request request = new Request(source, - "SELECT actor.name, actor.firstname, movie.year, interpretation.character " - + " FROM movie, actor, interpretation" - + " WHERE movie.id = interpretation.id_movie" - + " AND interpretation.id_actor = actor.id" - + " AND movie.year > ?" - + " ORDER BY actor.name, movie.year", 2000); + Request request = new Request(source, + "SELECT actor.name, actor.firstname, movie.year, interpretation.character " + + " FROM movie, actor, interpretation" + + " WHERE movie.id = interpretation.id_movie" + + " AND interpretation.id_actor = actor.id" + + " AND movie.year > ?" + + " ORDER BY actor.name, movie.year", 2000); assertThat(request.getColumnsNameList()).as("Columns of the request") - .hasSize(4) - .containsExactly("NAME", "FIRSTNAME", "YEAR", "CHARACTER"); + .hasSize(4) + .containsExactly("NAME", "FIRSTNAME", "YEAR", "CHARACTER"); } /** @@ -86,18 +85,18 @@ public void test_columns_name_with_source_and_parameters_set() { */ @Test public void test_columns_name_with_datasource_and_parameters_set() { - Request request = new Request(dataSource, - "SELECT actor.name, actor.firstname, movie.year, interpretation.character " - + " FROM movie, actor, interpretation" - + " WHERE movie.id = interpretation.id_movie" - + " AND interpretation.id_actor = actor.id" - + " AND movie.year > ?" - + " ORDER BY actor.name, movie.year") - .setParameters(2000); + Request request = new Request(dataSource, + "SELECT actor.name, actor.firstname, movie.year, interpretation.character " + + " FROM movie, actor, interpretation" + + " WHERE movie.id = interpretation.id_movie" + + " AND interpretation.id_actor = actor.id" + + " AND movie.year > ?" + + " ORDER BY actor.name, movie.year") + .setParameters(2000); assertThat(request.getColumnsNameList()).as("Columns of the request") - .hasSize(4) - .containsExactly("NAME", "FIRSTNAME", "YEAR", "CHARACTER"); + .hasSize(4) + .containsExactly("NAME", "FIRSTNAME", "YEAR", "CHARACTER"); } /** diff --git a/src/test/java/org/assertj/db/type/Request_Columns_Test.java b/src/test/java/org/assertj/db/type/Request_Columns_Test.java index fec0975e..eccb77c9 100644 --- a/src/test/java/org/assertj/db/type/Request_Columns_Test.java +++ b/src/test/java/org/assertj/db/type/Request_Columns_Test.java @@ -8,23 +8,22 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.type; +import static org.assertj.core.api.Assertions.assertThat; + import org.assertj.db.common.AbstractTest; import org.junit.Test; -import static org.assertj.core.api.Assertions.assertThat; - /** * Tests on the columns of {@code Request}. *

    * These tests are on the values in the columns got from a {@code Request}. *

    - * + * * @author Régis Pouiller - * */ public class Request_Columns_Test extends AbstractTest { @@ -34,10 +33,10 @@ public class Request_Columns_Test extends AbstractTest { @Test public void test_columns_with_source_set() { Request request = new Request(source, "SELECT actor.name, actor.firstname, movie.year, interpretation.character " - + " FROM movie, actor, interpretation" - + " WHERE movie.id = interpretation.id_movie" - + " AND interpretation.id_actor = actor.id" - + " ORDER BY actor.name, movie.year"); + + " FROM movie, actor, interpretation" + + " WHERE movie.id = interpretation.id_movie" + + " AND interpretation.id_actor = actor.id" + + " ORDER BY actor.name, movie.year"); Column columnFromIndex = request.getColumn(1); @@ -56,10 +55,10 @@ public void test_columns_with_source_set() { @Test public void test_columns_with_datasource_set() { Request request = new Request(dataSource, "SELECT actor.name, actor.firstname, movie.year, interpretation.character " - + " FROM movie, actor, interpretation" - + " WHERE movie.id = interpretation.id_movie" - + " AND interpretation.id_actor = actor.id" - + " ORDER BY actor.name, movie.year"); + + " FROM movie, actor, interpretation" + + " WHERE movie.id = interpretation.id_movie" + + " AND interpretation.id_actor = actor.id" + + " ORDER BY actor.name, movie.year"); Column columnFromIndex = request.getColumn(1); diff --git a/src/test/java/org/assertj/db/type/Request_Exception_Test.java b/src/test/java/org/assertj/db/type/Request_Exception_Test.java index dc14b89a..1d84eba3 100644 --- a/src/test/java/org/assertj/db/type/Request_Exception_Test.java +++ b/src/test/java/org/assertj/db/type/Request_Exception_Test.java @@ -8,10 +8,17 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.type; +import java.sql.Connection; +import java.sql.DatabaseMetaData; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import javax.sql.DataSource; + import org.assertj.db.common.AbstractTest; import org.assertj.db.common.DefaultConnection; import org.assertj.db.common.DefaultDataSource; @@ -19,14 +26,10 @@ import org.assertj.db.exception.AssertJDBException; import org.junit.Test; -import javax.sql.DataSource; -import java.sql.*; - /** * Test on loading of the data for a request and exception during the different steps. - * + * * @author Régis Pouiller - * */ public class Request_Exception_Test extends AbstractTest { diff --git a/src/test/java/org/assertj/db/type/Request_GetRowFromPksValues_Test.java b/src/test/java/org/assertj/db/type/Request_GetRowFromPksValues_Test.java index 3e404a9b..de1f9f22 100644 --- a/src/test/java/org/assertj/db/type/Request_GetRowFromPksValues_Test.java +++ b/src/test/java/org/assertj/db/type/Request_GetRowFromPksValues_Test.java @@ -8,22 +8,21 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.type; -import org.assertj.db.common.AbstractTest; -import org.junit.Test; +import static org.assertj.core.api.Assertions.assertThat; import java.math.BigDecimal; -import static org.assertj.core.api.Assertions.assertThat; +import org.assertj.db.common.AbstractTest; +import org.junit.Test; /** * Tests on getting a {@code Row} in a {@code Request} from primary keys values. - * + * * @author Régis Pouiller - * */ public class Request_GetRowFromPksValues_Test extends AbstractTest { @@ -33,9 +32,9 @@ public class Request_GetRowFromPksValues_Test extends AbstractTest { @Test public void test_getting_row_from_primary_keys_values_without_finding() throws Exception { Request request = new Request(source, - "SELECT actor.name, actor.firstname, movie.year, interpretation.id, interpretation.character " - + " FROM movie, actor, interpretation WHERE movie.id = interpretation.id_movie" - + " AND interpretation.id_actor = actor.id ORDER BY actor.name, movie.year"); + "SELECT actor.name, actor.firstname, movie.year, interpretation.id, interpretation.character " + + " FROM movie, actor, interpretation WHERE movie.id = interpretation.id_movie" + + " AND interpretation.id_actor = actor.id ORDER BY actor.name, movie.year"); assertThat(request.getRowFromPksValues(getValue(null, 1L))).isNull(); assertThat(request.getRowFromPksValues(getValue(null, 3))).isNull(); @@ -52,9 +51,9 @@ public void test_getting_row_from_primary_keys_values_without_finding() throws E @Test public void test_getting_row_from_primary_keys_values_with_finding() throws Exception { Request request = new Request(source, - "SELECT actor.name, actor.firstname, movie.year, interpretation.id, interpretation.character " - + " FROM movie, actor, interpretation WHERE movie.id = interpretation.id_movie" - + " AND interpretation.id_actor = actor.id ORDER BY actor.name, movie.year").setPksName("id"); + "SELECT actor.name, actor.firstname, movie.year, interpretation.id, interpretation.character " + + " FROM movie, actor, interpretation WHERE movie.id = interpretation.id_movie" + + " AND interpretation.id_actor = actor.id ORDER BY actor.name, movie.year").setPksName("id"); assertThat(request.getRowFromPksValues(getValue(null, 3)).getValuesList().get(0).getValue()).isEqualTo("Weaver"); assertThat(request.getRowFromPksValues(getValue(null, 3)).getValuesList().get(1).getValue()).isEqualTo("Sigourney"); diff --git a/src/test/java/org/assertj/db/type/Request_Getters_Test.java b/src/test/java/org/assertj/db/type/Request_Getters_Test.java index 9b80af75..2ea0da6f 100644 --- a/src/test/java/org/assertj/db/type/Request_Getters_Test.java +++ b/src/test/java/org/assertj/db/type/Request_Getters_Test.java @@ -8,23 +8,22 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.type; +import static org.assertj.core.api.Assertions.assertThat; + import org.assertj.db.common.AbstractTest; import org.junit.Test; -import static org.assertj.core.api.Assertions.assertThat; - /** * Tests on the getters of {@code Request}. *

    * These tests are on the return from the getters of {@code Request}. *

    - * + * * @author Régis Pouiller - * */ public class Request_Getters_Test extends AbstractTest { @@ -59,8 +58,8 @@ public void test_getters_with_only_datasource_set() { */ @Test public void test_getters_with_source_and_name_set() { - Request request = new Request(source, - "SELECT actor.name, actor.firstname, movie.year, interpretation.character " + Request request = new Request(source, + "SELECT actor.name, actor.firstname, movie.year, interpretation.character " + " FROM movie, actor, interpretation" + " WHERE movie.id = interpretation.id_movie" + " AND interpretation.id_actor = actor.id" @@ -69,10 +68,10 @@ public void test_getters_with_source_and_name_set() { assertThat(request.getSource()).as("Source of MOVIE table").isSameAs(source); assertThat(request.getDataSource()).isNull(); assertThat(request.getRequest()).isEqualTo("SELECT actor.name, actor.firstname, movie.year, interpretation.character " - + " FROM movie, actor, interpretation" - + " WHERE movie.id = interpretation.id_movie" - + " AND interpretation.id_actor = actor.id" - + " ORDER BY actor.name, movie.year"); + + " FROM movie, actor, interpretation" + + " WHERE movie.id = interpretation.id_movie" + + " AND interpretation.id_actor = actor.id" + + " ORDER BY actor.name, movie.year"); assertThat(request.getParameters()).containsExactly(); } @@ -82,22 +81,22 @@ public void test_getters_with_source_and_name_set() { */ @Test public void test_getters_with_source_name_and_columns_set() { - Request request = new Request(source, - "SELECT actor.name, actor.firstname, movie.year, interpretation.character " - + " FROM movie, actor, interpretation" - + " WHERE movie.id = interpretation.id_movie" - + " AND interpretation.id_actor = actor.id" - + " AND movie.year > ?" - + " ORDER BY actor.name, movie.year", 2000); - - assertThat(request.getSource()).as("Source of MOVIE table").isSameAs(source); - assertThat(request.getDataSource()).isNull(); - assertThat(request.getRequest()).isEqualTo("SELECT actor.name, actor.firstname, movie.year, interpretation.character " + Request request = new Request(source, + "SELECT actor.name, actor.firstname, movie.year, interpretation.character " + " FROM movie, actor, interpretation" + " WHERE movie.id = interpretation.id_movie" + " AND interpretation.id_actor = actor.id" + " AND movie.year > ?" - + " ORDER BY actor.name, movie.year"); + + " ORDER BY actor.name, movie.year", 2000); + + assertThat(request.getSource()).as("Source of MOVIE table").isSameAs(source); + assertThat(request.getDataSource()).isNull(); + assertThat(request.getRequest()).isEqualTo("SELECT actor.name, actor.firstname, movie.year, interpretation.character " + + " FROM movie, actor, interpretation" + + " WHERE movie.id = interpretation.id_movie" + + " AND interpretation.id_actor = actor.id" + + " AND movie.year > ?" + + " ORDER BY actor.name, movie.year"); assertThat(request.getParameters()).containsExactly(2000); } diff --git a/src/test/java/org/assertj/db/type/Request_Instantiation_Test.java b/src/test/java/org/assertj/db/type/Request_Instantiation_Test.java index 93190170..7c6d2341 100644 --- a/src/test/java/org/assertj/db/type/Request_Instantiation_Test.java +++ b/src/test/java/org/assertj/db/type/Request_Instantiation_Test.java @@ -8,24 +8,23 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.type; +import javax.sql.DataSource; + import org.assertj.db.common.AbstractTest; import org.assertj.db.exception.AssertJDBException; import org.junit.Test; -import javax.sql.DataSource; - /** * Tests on the instantiation of {@code Request}. *

    * These tests are on the raise of some Exception depending of the case of test. *

    - * + * * @author Régis Pouiller - * */ public class Request_Instantiation_Test extends AbstractTest { diff --git a/src/test/java/org/assertj/db/type/Request_PrimaryKeys_Name_Test.java b/src/test/java/org/assertj/db/type/Request_PrimaryKeys_Name_Test.java index 1f36703f..dbd70b90 100644 --- a/src/test/java/org/assertj/db/type/Request_PrimaryKeys_Name_Test.java +++ b/src/test/java/org/assertj/db/type/Request_PrimaryKeys_Name_Test.java @@ -8,24 +8,23 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.type; +import static org.assertj.core.api.Assertions.assertThat; + import org.assertj.db.common.AbstractTest; import org.assertj.db.exception.AssertJDBException; import org.junit.Test; -import static org.assertj.core.api.Assertions.assertThat; - /** * Tests on the primary keys name of {@code Request}. *

    * These tests are on the name of the primary keys got from a {@code Request}. *

    - * + * * @author Régis Pouiller - * */ public class Request_PrimaryKeys_Name_Test extends AbstractTest { @@ -34,15 +33,15 @@ public class Request_PrimaryKeys_Name_Test extends AbstractTest { */ @Test public void test_pks_name_with_source_set_but_not_primary_keys() { - Request request = new Request(source, - "SELECT actor.name, actor.firstname, movie.year, interpretation.character " + Request request = new Request(source, + "SELECT actor.name, actor.firstname, movie.year, interpretation.character " + " FROM movie, actor, interpretation" + " WHERE movie.id = interpretation.id_movie" + " AND interpretation.id_actor = actor.id" + " ORDER BY actor.name, movie.year"); assertThat(request.getPksNameList()).as("Primary Keys of the request") - .hasSize(0); + .hasSize(0); } /** @@ -50,16 +49,16 @@ public void test_pks_name_with_source_set_but_not_primary_keys() { */ @Test public void test_pks_name_with_source_set() { - Request request = new Request(source, - "SELECT actor.name, actor.firstname, movie.year, interpretation.character " + Request request = new Request(source, + "SELECT actor.name, actor.firstname, movie.year, interpretation.character " + " FROM movie, actor, interpretation" + " WHERE movie.id = interpretation.id_movie" + " AND interpretation.id_actor = actor.id" + " ORDER BY actor.name, movie.year").setPksName("NAME"); assertThat(request.getPksNameList()).as("Primary Keys of the request") - .hasSize(1) - .containsExactly("NAME"); + .hasSize(1) + .containsExactly("NAME"); } /** @@ -67,16 +66,16 @@ public void test_pks_name_with_source_set() { */ @Test public void test_pks_name_with_datasource_set() { - Request request = new Request(dataSource, - "SELECT actor.name, actor.firstname, movie.year, interpretation.character " + Request request = new Request(dataSource, + "SELECT actor.name, actor.firstname, movie.year, interpretation.character " + " FROM movie, actor, interpretation" + " WHERE movie.id = interpretation.id_movie" + " AND interpretation.id_actor = actor.id" + " ORDER BY actor.name, movie.year").setPksName("NAME"); assertThat(request.getPksNameList()).as("Primary Keys of the request") - .hasSize(1) - .containsExactly("NAME"); + .hasSize(1) + .containsExactly("NAME"); } /** @@ -84,17 +83,17 @@ public void test_pks_name_with_datasource_set() { */ @Test public void test_pks_name_with_source_and_parameters_set() { - Request request = new Request(source, - "SELECT actor.name, actor.firstname, movie.year, interpretation.character " - + " FROM movie, actor, interpretation" - + " WHERE movie.id = interpretation.id_movie" - + " AND interpretation.id_actor = actor.id" - + " AND movie.year > ?" - + " ORDER BY actor.name, movie.year", 2000).setPksName("NAME", "ID"); + Request request = new Request(source, + "SELECT actor.name, actor.firstname, movie.year, interpretation.character " + + " FROM movie, actor, interpretation" + + " WHERE movie.id = interpretation.id_movie" + + " AND interpretation.id_actor = actor.id" + + " AND movie.year > ?" + + " ORDER BY actor.name, movie.year", 2000).setPksName("NAME", "ID"); assertThat(request.getPksNameList()).as("Primary Keys of the request") - .hasSize(2) - .containsExactly("NAME", "ID"); + .hasSize(2) + .containsExactly("NAME", "ID"); } /** @@ -102,18 +101,18 @@ public void test_pks_name_with_source_and_parameters_set() { */ @Test public void test_pks_name_with_datasource_and_parameters_set() { - Request request = new Request(dataSource, - "SELECT actor.name, actor.firstname, movie.year, interpretation.character " - + " FROM movie, actor, interpretation" - + " WHERE movie.id = interpretation.id_movie" - + " AND interpretation.id_actor = actor.id" - + " AND movie.year > ?" - + " ORDER BY actor.name, movie.year") - .setParameters(2000).setPksName("NAME", "ID"); + Request request = new Request(dataSource, + "SELECT actor.name, actor.firstname, movie.year, interpretation.character " + + " FROM movie, actor, interpretation" + + " WHERE movie.id = interpretation.id_movie" + + " AND interpretation.id_actor = actor.id" + + " AND movie.year > ?" + + " ORDER BY actor.name, movie.year") + .setParameters(2000).setPksName("NAME", "ID"); assertThat(request.getPksNameList()).as("Primary Keys of the request") - .hasSize(2) - .containsExactly("NAME", "ID"); + .hasSize(2) + .containsExactly("NAME", "ID"); } /** diff --git a/src/test/java/org/assertj/db/type/Request_Rows_Test.java b/src/test/java/org/assertj/db/type/Request_Rows_Test.java index 4ed9c658..2e6c5e5c 100644 --- a/src/test/java/org/assertj/db/type/Request_Rows_Test.java +++ b/src/test/java/org/assertj/db/type/Request_Rows_Test.java @@ -8,25 +8,24 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.type; -import org.assertj.db.common.AbstractTest; -import org.junit.Test; +import static org.assertj.core.api.Assertions.assertThat; import java.math.BigDecimal; -import static org.assertj.core.api.Assertions.assertThat; +import org.assertj.db.common.AbstractTest; +import org.junit.Test; /** * Tests on the {@code Row} of {@code Request}. *

    * These tests are on the values in the {@code Row} got from a {@code Request}. *

    - * + * * @author Régis Pouiller - * */ public class Request_Rows_Test extends AbstractTest { @@ -36,13 +35,13 @@ public class Request_Rows_Test extends AbstractTest { @Test public void test_rows_with_source_set() { Request request = new Request(source, "SELECT actor.name, actor.firstname, movie.year, interpretation.character " - + " FROM movie, actor, interpretation" - + " WHERE movie.id = interpretation.id_movie" - + " AND interpretation.id_actor = actor.id" - + " ORDER BY actor.name, movie.year"); + + " FROM movie, actor, interpretation" + + " WHERE movie.id = interpretation.id_movie" + + " AND interpretation.id_actor = actor.id" + + " ORDER BY actor.name, movie.year"); assertThat(request.getRowsList()).as("Values of the request") - .hasSize(5); + .hasSize(5); assertThat(request.getRow(0).getColumnsNameList()).containsExactly("NAME", "FIRSTNAME", "YEAR", "CHARACTER"); assertThat(request.getRow(0).getColumnValue(0).getValue()).isEqualTo("Phoenix"); @@ -76,13 +75,13 @@ public void test_rows_with_source_set() { @Test public void test_rows_with_datasource_set() { Request request = new Request(dataSource, "SELECT actor.name, actor.firstname, movie.year, interpretation.character " - + " FROM movie, actor, interpretation" - + " WHERE movie.id = interpretation.id_movie" - + " AND interpretation.id_actor = actor.id" - + " ORDER BY actor.name, movie.year"); + + " FROM movie, actor, interpretation" + + " WHERE movie.id = interpretation.id_movie" + + " AND interpretation.id_actor = actor.id" + + " ORDER BY actor.name, movie.year"); assertThat(request.getRowsList()).as("Values of the request") - .hasSize(5); + .hasSize(5); assertThat(request.getRow(0).getValuesList().get(0).getValue()).isEqualTo("Phoenix"); assertThat(request.getRow(0).getValuesList().get(1).getValue()).isEqualTo("Joaquim"); assertThat(request.getRow(0).getValuesList().get(2).getValue()).isEqualTo(new BigDecimal(2004)); @@ -111,10 +110,10 @@ public void test_rows_with_datasource_set() { @Test(expected = NullPointerException.class) public void should_throw_NullPointerException_because_column_name_parameter_is_null_when_calling_getColumnValue() { Request request = new Request(dataSource, "SELECT actor.name, actor.firstname, movie.year, interpretation.character " - + " FROM movie, actor, interpretation" - + " WHERE movie.id = interpretation.id_movie" - + " AND interpretation.id_actor = actor.id" - + " ORDER BY actor.name, movie.year"); + + " FROM movie, actor, interpretation" + + " WHERE movie.id = interpretation.id_movie" + + " AND interpretation.id_actor = actor.id" + + " ORDER BY actor.name, movie.year"); request.getRow(0).getColumnValue(null); } @@ -124,10 +123,10 @@ public void should_throw_NullPointerException_because_column_name_parameter_is_n @Test public void test_that_we_get_null_when_calling_getColumnValue_and_the_column_name_dont_exist() { Request request = new Request(dataSource, "SELECT actor.name, actor.firstname, movie.year, interpretation.character " - + " FROM movie, actor, interpretation" - + " WHERE movie.id = interpretation.id_movie" - + " AND interpretation.id_actor = actor.id" - + " ORDER BY actor.name, movie.year"); + + " FROM movie, actor, interpretation" + + " WHERE movie.id = interpretation.id_movie" + + " AND interpretation.id_actor = actor.id" + + " ORDER BY actor.name, movie.year"); assertThat(request.getRow(0).getColumnValue("not_exist")).isNull(); } diff --git a/src/test/java/org/assertj/db/type/Row_GetPksNameList_Test.java b/src/test/java/org/assertj/db/type/Row_GetPksNameList_Test.java index b0b11f91..fcb9d19d 100644 --- a/src/test/java/org/assertj/db/type/Row_GetPksNameList_Test.java +++ b/src/test/java/org/assertj/db/type/Row_GetPksNameList_Test.java @@ -8,48 +8,47 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.type; -import org.assertj.db.common.AbstractTest; -import org.junit.Test; +import static org.assertj.core.api.Assertions.assertThat; import java.util.Arrays; -import static org.assertj.core.api.Assertions.assertThat; +import org.assertj.db.common.AbstractTest; +import org.junit.Test; /** * Tests on the primary keys name of {@code Row}. - * + * * @author Régis Pouiller - * */ public class Row_GetPksNameList_Test extends AbstractTest { /** * This method test the result when getting the primary keys name with one primary key. - * + * * @throws Exception Exception */ @Test public void test_when_getpksnamelist_with_one_pk() throws Exception { assertThat( - getRow(Arrays.asList("col1"), Arrays.asList("col1", "col2", "col3"), - Arrays.asList(getValue(null, "val1"), getValue(null, "val2"), getValue(null, "val3"))).getPksNameList()).containsExactly( - "col1"); + getRow(Arrays.asList("col1"), Arrays.asList("col1", "col2", "col3"), + Arrays.asList(getValue(null, "val1"), getValue(null, "val2"), getValue(null, "val3"))).getPksNameList()).containsExactly( + "col1"); } /** * This method test the result when getting the primary keys name with two primary keys. - * + * * @throws Exception Exception */ @Test public void test_when_getpksnamelist_with_two_pks() throws Exception { assertThat( - getRow(Arrays.asList("col3", "col1"), Arrays.asList("col1", "col2", "col3"), - Arrays.asList(getValue(null, "val1"), getValue(null, 1), getValue(null, 2))).getPksNameList()).containsExactly("col3", "col1"); + getRow(Arrays.asList("col3", "col1"), Arrays.asList("col1", "col2", "col3"), + Arrays.asList(getValue(null, "val1"), getValue(null, 1), getValue(null, 2))).getPksNameList()).containsExactly("col3", "col1"); } } diff --git a/src/test/java/org/assertj/db/type/Row_GetPksValues_Test.java b/src/test/java/org/assertj/db/type/Row_GetPksValues_Test.java index 80b38689..e7cfcacd 100644 --- a/src/test/java/org/assertj/db/type/Row_GetPksValues_Test.java +++ b/src/test/java/org/assertj/db/type/Row_GetPksValues_Test.java @@ -8,47 +8,46 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.type; -import org.assertj.db.common.AbstractTest; -import org.junit.Test; +import static org.assertj.core.api.Assertions.assertThat; import java.util.Arrays; -import static org.assertj.core.api.Assertions.assertThat; +import org.assertj.db.common.AbstractTest; +import org.junit.Test; /** * Tests on the primary keys value of {@code Row}. - * + * * @author Régis Pouiller - * */ public class Row_GetPksValues_Test extends AbstractTest { /** * This method test the result when getting the primary keys value with one primary key. - * + * * @throws Exception Exception */ @Test public void test_when_getprimarykeysvalue_with_one_pk() throws Exception { Value[] primaryKeysValue = getRow(Arrays.asList("col1"), Arrays.asList("col1", "col2", "col3"), - Arrays.asList(getValue(null, "val1"), getValue(null, "val2"), getValue(null, "val3"))).getPksValues(); + Arrays.asList(getValue(null, "val1"), getValue(null, "val2"), getValue(null, "val3"))).getPksValues(); assertThat(primaryKeysValue).hasSize(1); assertThat(primaryKeysValue[0].getValue()).isEqualTo("val1"); } /** * This method test the result when getting the primary keys value with two primary keys. - * + * * @throws Exception Exception */ @Test public void test_when_getprimarykeysvalue_with_two_pks() throws Exception { Value[] primaryKeysValue = getRow(Arrays.asList("col3", "col1"), Arrays.asList("col1", "col2", "col3"), - Arrays.asList(getValue(null, "val1"), getValue(null, 1), getValue(null, 2))).getPksValues(); + Arrays.asList(getValue(null, "val1"), getValue(null, 1), getValue(null, 2))).getPksValues(); assertThat(primaryKeysValue).hasSize(2); assertThat(primaryKeysValue[0].getValue()).isEqualTo(2); assertThat(primaryKeysValue[1].getValue()).isEqualTo("val1"); diff --git a/src/test/java/org/assertj/db/type/Row_Has_PksValuesEqualTo_Test.java b/src/test/java/org/assertj/db/type/Row_Has_PksValuesEqualTo_Test.java index 581251b8..9f43919d 100644 --- a/src/test/java/org/assertj/db/type/Row_Has_PksValuesEqualTo_Test.java +++ b/src/test/java/org/assertj/db/type/Row_Has_PksValuesEqualTo_Test.java @@ -8,62 +8,61 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.type; -import org.assertj.db.common.AbstractTest; -import org.junit.Test; +import static org.assertj.core.api.Assertions.assertThat; import java.util.Arrays; -import static org.assertj.core.api.Assertions.assertThat; +import org.assertj.db.common.AbstractTest; +import org.junit.Test; /** * Tests on the primary keys value of {@code Row}. - * + * * @author Régis Pouiller - * */ public class Row_Has_PksValuesEqualTo_Test extends AbstractTest { /** * This method test the result when getting the primary keys value with one primary key. - * + * * @throws Exception Exception */ @Test public void test_when_havingpksvaluesequalto_with_one_pk() throws Exception { assertThat( - getRow(Arrays.asList("col1"), Arrays.asList("col1", "col2", "col3"), - Arrays.asList(getValue(null, "val1"), getValue(null, "val2"), getValue(null, "val3"))).hasPksValuesEqualTo(new Value[] { getValue( - null, "val1") })).isTrue(); + getRow(Arrays.asList("col1"), Arrays.asList("col1", "col2", "col3"), + Arrays.asList(getValue(null, "val1"), getValue(null, "val2"), getValue(null, "val3"))).hasPksValuesEqualTo(new Value[]{getValue( + null, "val1")})).isTrue(); assertThat( - getRow(Arrays.asList("col1"), Arrays.asList("col1", "col2", "col3"), - Arrays.asList(getValue(null, "val1"), getValue(null, "val2"), getValue(null, "val3"))).hasPksValuesEqualTo(new Value[] { getValue( - null, "val2") })) - .isFalse(); + getRow(Arrays.asList("col1"), Arrays.asList("col1", "col2", "col3"), + Arrays.asList(getValue(null, "val1"), getValue(null, "val2"), getValue(null, "val3"))).hasPksValuesEqualTo(new Value[]{getValue( + null, "val2")})) + .isFalse(); } /** * This method test the result when getting the primary keys value with two primary keys. - * + * * @throws Exception Exception */ @Test public void test_when_havingpksvaluesequalto_with_two_pks() throws Exception { assertThat( - getRow(Arrays.asList("col3", "col1"), Arrays.asList("col1", "col2", "col3"), - Arrays.asList(getValue(null, "val1"), getValue(null, 1), getValue(null, 2))).hasPksValuesEqualTo(new Value[] { getValue( - null, 2), getValue(null, "val1") })).isTrue(); + getRow(Arrays.asList("col3", "col1"), Arrays.asList("col1", "col2", "col3"), + Arrays.asList(getValue(null, "val1"), getValue(null, 1), getValue(null, 2))).hasPksValuesEqualTo(new Value[]{getValue( + null, 2), getValue(null, "val1")})).isTrue(); assertThat( - getRow(Arrays.asList("col3", "col1"), Arrays.asList("col1", "col2", "col3"), - Arrays.asList(getValue(null, "val1"), getValue(null, 1), getValue(null, 2))).hasPksValuesEqualTo(new Value[] { getValue( - null, 1), getValue(null, "val1") })).isFalse(); + getRow(Arrays.asList("col3", "col1"), Arrays.asList("col1", "col2", "col3"), + Arrays.asList(getValue(null, "val1"), getValue(null, 1), getValue(null, 2))).hasPksValuesEqualTo(new Value[]{getValue( + null, 1), getValue(null, "val1")})).isFalse(); assertThat( - getRow(Arrays.asList("col3", "col1"), Arrays.asList("col1", "col2", "col3"), - Arrays.asList(getValue(null, "val1"), getValue(null, 1), getValue(null, 2))).hasPksValuesEqualTo(new Value[] { getValue( - null, 2), getValue(null, "val2") })).isFalse(); + getRow(Arrays.asList("col3", "col1"), Arrays.asList("col1", "col2", "col3"), + Arrays.asList(getValue(null, "val1"), getValue(null, 1), getValue(null, 2))).hasPksValuesEqualTo(new Value[]{getValue( + null, 2), getValue(null, "val2")})).isFalse(); } } diff --git a/src/test/java/org/assertj/db/type/Table_Columns_Name_Test.java b/src/test/java/org/assertj/db/type/Table_Columns_Name_Test.java index ced35482..8a0fa849 100644 --- a/src/test/java/org/assertj/db/type/Table_Columns_Name_Test.java +++ b/src/test/java/org/assertj/db/type/Table_Columns_Name_Test.java @@ -8,24 +8,23 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.type; +import static org.assertj.core.api.Assertions.assertThat; + import org.assertj.db.common.AbstractTest; import org.assertj.db.exception.AssertJDBException; import org.junit.Test; -import static org.assertj.core.api.Assertions.assertThat; - /** * Tests on the columns name of {@code Table}. *

    * These tests are on the name of the columns got from a {@code Table}. *

    - * + * * @author Régis Pouiller - * */ public class Table_Columns_Name_Test extends AbstractTest { @@ -37,7 +36,7 @@ public void test_columns_name_with_source_set() { Table table = new Table(source, "movie"); assertThat(table.getColumnsNameList()).as("Columns of MOVIE table").hasSize(4) - .containsExactly("ID", "TITLE", "YEAR", "MOVIE_IMDB"); + .containsExactly("ID", "TITLE", "YEAR", "MOVIE_IMDB"); } /** @@ -48,7 +47,7 @@ public void test_columns_name_with_datasource_set() { Table table = new Table(dataSource, "movie"); assertThat(table.getColumnsNameList()).as("Columns of MOVIE table").hasSize(4) - .containsExactly("ID", "TITLE", "YEAR", "MOVIE_IMDB"); + .containsExactly("ID", "TITLE", "YEAR", "MOVIE_IMDB"); } /** @@ -56,10 +55,10 @@ public void test_columns_name_with_datasource_set() { */ @Test public void test_columns_name_to_check_with_source_set() { - Table table = new Table(source, "actor", new String[] { "id", "name", "birth" }, null); + Table table = new Table(source, "actor", new String[]{"id", "name", "birth"}, null); assertThat(table.getColumnsNameList()).as("Columns of ACTOR table").hasSize(3) - .containsExactly("ID", "NAME", "BIRTH"); + .containsExactly("ID", "NAME", "BIRTH"); } /** @@ -67,10 +66,10 @@ public void test_columns_name_to_check_with_source_set() { */ @Test public void test_columns_name_to_check_with_datasource_set() { - Table table = new Table(dataSource, "actor", new String[] { "id", "name", "birth" }, null); + Table table = new Table(dataSource, "actor", new String[]{"id", "name", "birth"}, null); assertThat(table.getColumnsNameList()).as("Columns of ACTOR table").hasSize(3) - .containsExactly("ID", "NAME", "BIRTH"); + .containsExactly("ID", "NAME", "BIRTH"); } /** @@ -78,10 +77,10 @@ public void test_columns_name_to_check_with_datasource_set() { */ @Test public void test_columns_name_to_exclude_with_source_set() { - Table table = new Table(source, "interpretation", null, new String[] { "id" }); + Table table = new Table(source, "interpretation", null, new String[]{"id"}); assertThat(table.getColumnsNameList()).as("Columns of INTERPRETATION table").hasSize(3) - .containsExactly("ID_MOVIE", "ID_ACTOR", "CHARACTER"); + .containsExactly("ID_MOVIE", "ID_ACTOR", "CHARACTER"); } /** @@ -89,10 +88,10 @@ public void test_columns_name_to_exclude_with_source_set() { */ @Test public void test_columns_name_to_exclude_with_datasource_set() { - Table table = new Table(dataSource, "interpretation", null, new String[] { "id" }); + Table table = new Table(dataSource, "interpretation", null, new String[]{"id"}); assertThat(table.getColumnsNameList()).as("Columns of INTERPRETATION table").hasSize(3) - .containsExactly("ID_MOVIE", "ID_ACTOR", "CHARACTER"); + .containsExactly("ID_MOVIE", "ID_ACTOR", "CHARACTER"); } /** diff --git a/src/test/java/org/assertj/db/type/Table_Columns_Test.java b/src/test/java/org/assertj/db/type/Table_Columns_Test.java index 46f7ba91..bf2aea18 100644 --- a/src/test/java/org/assertj/db/type/Table_Columns_Test.java +++ b/src/test/java/org/assertj/db/type/Table_Columns_Test.java @@ -8,24 +8,23 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.type; +import static org.assertj.core.api.Assertions.assertThat; + import org.assertj.db.common.AbstractTest; import org.assertj.db.type.Table.Order; import org.junit.Test; -import static org.assertj.core.api.Assertions.assertThat; - /** * Tests on the {@code Column} of {@code Table}. *

    * These tests are on the values in the {@code Column} got from a {@code Table}. *

    - * + * * @author Régis Pouiller - * */ public class Table_Columns_Test extends AbstractTest { @@ -70,7 +69,7 @@ public void test_columns_to_check() { assertThat(table.getColumnsToCheck()).isNull(); - table.setColumnsToCheck(new String[] { "title" , "test" }); + table.setColumnsToCheck(new String[]{"title", "test"}); assertThat(table.getColumnsToCheck()).hasSize(1); assertThat(table.getColumnsToCheck()).contains("TITLE"); @@ -85,7 +84,7 @@ public void test_columns_to_exclude() { assertThat(table.getColumnsToExclude()).isNull(); - table.setColumnsToExclude(new String[] { "title" , "test" }); + table.setColumnsToExclude(new String[]{"title", "test"}); assertThat(table.getColumnsToExclude()).hasSize(1); assertThat(table.getColumnsToExclude()).contains("TITLE"); @@ -100,7 +99,7 @@ public void test_columns_to_order() { assertThat(table.getColumnsToOrder()).isNull(); - table.setColumnsToOrder(new Order[] { Order.asc("title") , Order.asc("test") }); + table.setColumnsToOrder(new Order[]{Order.asc("title"), Order.asc("test")}); assertThat(table.getColumnsToOrder()).hasSize(1); assertThat(table.getColumnsToOrder()).contains(Order.asc("TITLE")); diff --git a/src/test/java/org/assertj/db/type/Table_Exception_Test.java b/src/test/java/org/assertj/db/type/Table_Exception_Test.java index 361d2b34..1aa2364b 100644 --- a/src/test/java/org/assertj/db/type/Table_Exception_Test.java +++ b/src/test/java/org/assertj/db/type/Table_Exception_Test.java @@ -8,10 +8,19 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.type; +import static org.junit.Assert.fail; + +import java.sql.Connection; +import java.sql.DatabaseMetaData; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import javax.sql.DataSource; + import org.assertj.core.api.Assertions; import org.assertj.db.common.AbstractTest; import org.assertj.db.common.DefaultConnection; @@ -21,17 +30,10 @@ import org.assertj.db.type.Table.Order; import org.junit.Test; -import javax.sql.DataSource; - -import static org.junit.Assert.fail; - -import java.sql.*; - /** * Test on loading of the data for a table and exception during the different steps. - * + * * @author Régis Pouiller - * */ public class Table_Exception_Test extends AbstractTest { @@ -67,7 +69,7 @@ public void should_fail_because_connection_throws_exception_when_getting_an_obje @Test public void should_fail_because_trying_to_set_columns_to_check_first() { try { - new Table().setColumnsToCheck(new String[] { "test" }); + new Table().setColumnsToCheck(new String[]{"test"}); fail("An exception must be raised"); } catch (AssertJDBException e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("The table name and the source or datasource must be set first")); @@ -80,7 +82,7 @@ public void should_fail_because_trying_to_set_columns_to_check_first() { @Test public void should_fail_because_trying_to_set_columns_to_exclude_first() { try { - new Table().setColumnsToExclude(new String[] { "test" }); + new Table().setColumnsToExclude(new String[]{"test"}); fail("An exception must be raised"); } catch (AssertJDBException e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("The table name and the source or datasource must be set first")); @@ -93,7 +95,7 @@ public void should_fail_because_trying_to_set_columns_to_exclude_first() { @Test public void should_fail_because_trying_to_set_columns_order_first() { try { - new Table().setColumnsToOrder(new Order[] { Order.asc("test") }); + new Table().setColumnsToOrder(new Order[]{Order.asc("test")}); fail("An exception must be raised"); } catch (AssertJDBException e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("The table name and the source or datasource must be set first")); @@ -106,7 +108,7 @@ public void should_fail_because_trying_to_set_columns_order_first() { @Test public void should_fail_because_trying_to_set_columns_order_with_order_null() { try { - new Table(source, "test").setColumnsToOrder(new Order[] { null }); + new Table(source, "test").setColumnsToOrder(new Order[]{null}); fail("An exception must be raised"); } catch (NullPointerException e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("The order can not be null")); @@ -119,7 +121,7 @@ public void should_fail_because_trying_to_set_columns_order_with_order_null() { @Test public void should_fail_because_trying_to_set_columns_order_with_column_null() { try { - new Table(source, "test").setColumnsToOrder(new Order[] { Order.asc(null) }); + new Table(source, "test").setColumnsToOrder(new Order[]{Order.asc(null)}); fail("An exception must be raised"); } catch (NullPointerException e) { Assertions.assertThat(e.getMessage()).isEqualTo(String.format("The name of the column for order can not be null")); diff --git a/src/test/java/org/assertj/db/type/Table_GetRowFromPksValues_Test.java b/src/test/java/org/assertj/db/type/Table_GetRowFromPksValues_Test.java index 423a63a7..07c2ca09 100644 --- a/src/test/java/org/assertj/db/type/Table_GetRowFromPksValues_Test.java +++ b/src/test/java/org/assertj/db/type/Table_GetRowFromPksValues_Test.java @@ -8,23 +8,22 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.type; -import org.assertj.db.common.AbstractTest; -import org.junit.Test; +import static org.assertj.core.api.Assertions.assertThat; import java.math.BigDecimal; import java.util.UUID; -import static org.assertj.core.api.Assertions.assertThat; +import org.assertj.db.common.AbstractTest; +import org.junit.Test; /** * Tests on getting a {@code Row} in a {@code Table} from primary keys values. - * + * * @author Régis Pouiller - * */ public class Table_GetRowFromPksValues_Test extends AbstractTest { @@ -50,15 +49,15 @@ public void test_getting_row_from_primary_keys_values_with_finding() throws Exce assertThat(table.getRowFromPksValues(getValue(null, 3)).getValuesList().get(1).getValue()).isEqualTo("Avatar"); assertThat(table.getRowFromPksValues(getValue(null, 3)).getValuesList().get(2).getValue()).isEqualTo(new BigDecimal(2009)); assertThat(table.getRowFromPksValues(getValue(null, 3)).getValuesList().get(3).getValue()).isEqualTo(UUID.fromString( - "D735221B-5DE5-4112-AA1E-49090CB75ADA")); + "D735221B-5DE5-4112-AA1E-49090CB75ADA")); assertThat(table.getRowFromPksValues(getValue(null, 1L)).getValuesList().get(0).getValue()) - .isEqualTo(new BigDecimal(1)); + .isEqualTo(new BigDecimal(1)); assertThat(table.getRowFromPksValues(getValue(null, 1L)).getValuesList().get(1).getValue()) - .isEqualTo("Alien"); + .isEqualTo("Alien"); assertThat(table.getRowFromPksValues(getValue(null, 1L)).getValuesList().get(2).getValue()) - .isEqualTo(new BigDecimal(1979)); + .isEqualTo(new BigDecimal(1979)); assertThat(table.getRowFromPksValues(getValue(null, 1L)).getValuesList().get(3).getValue()) - .isEqualTo(UUID.fromString( - "30B443AE-C0C9-4790-9BEC-CE1380808435")); + .isEqualTo(UUID.fromString( + "30B443AE-C0C9-4790-9BEC-CE1380808435")); } } diff --git a/src/test/java/org/assertj/db/type/Table_Getters_Test.java b/src/test/java/org/assertj/db/type/Table_Getters_Test.java index c310c270..770b6c76 100644 --- a/src/test/java/org/assertj/db/type/Table_Getters_Test.java +++ b/src/test/java/org/assertj/db/type/Table_Getters_Test.java @@ -8,25 +8,24 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.type; -import org.assertj.db.common.AbstractTest; -import org.junit.Test; - import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.db.type.Table.Order.asc; import static org.assertj.db.type.Table.Order.desc; +import org.assertj.db.common.AbstractTest; +import org.junit.Test; + /** * Tests on the getters of {@code Table}. *

    * These tests are on the return from the getters of {@code Table}. *

    - * + * * @author Régis Pouiller - * */ public class Table_Getters_Test extends AbstractTest { @@ -117,7 +116,7 @@ public void test_getters_with_source_and_name_set() { */ @Test public void test_getters_with_source_name_and_columns_set() { - Table table = new Table(source, "movie", new String[] { "title", "year" }, new String[] { "id" }); + Table table = new Table(source, "movie", new String[]{"title", "year"}, new String[]{"id"}); assertThat(table.getSource()).as("Source of MOVIE table").isSameAs(source); assertThat(table.getDataSource()).isNull(); @@ -136,8 +135,8 @@ public void test_getters_with_source_name_and_columns_set() { @Test public void test_getters_with_source_name_columns_and_order_set() { Table table = new Table(source, "movie", - new Table.Order[]{ asc("title"), desc("year") }, - new String[] { "title", "year" }, new String[] { "id" }); + new Table.Order[]{asc("title"), desc("year")}, + new String[]{"title", "year"}, new String[]{"id"}); assertThat(table.getSource()).as("Source of MOVIE table").isSameAs(source); assertThat(table.getDataSource()).isNull(); @@ -157,7 +156,7 @@ public void test_getters_with_source_name_columns_and_order_set() { @Test public void test_getters_with_source_name_and_order_set() { Table table = new Table(source, "movie", - new Table.Order[]{ asc("title"), desc("year") }); + new Table.Order[]{asc("title"), desc("year")}); assertThat(table.getSource()).as("Source of MOVIE table").isSameAs(source); assertThat(table.getDataSource()).isNull(); @@ -194,7 +193,7 @@ public void test_getters_with_source_delimiters_and_name_set() { @Test public void test_getters_with_source_name_delimiters_and_columns_set() { Table table = new Table(source, "movie", '1', '2', - new String[] { "title", "year" }, new String[] { "id" }); + new String[]{"title", "year"}, new String[]{"id"}); assertThat(table.getSource()).as("Source of MOVIE table").isSameAs(source); assertThat(table.getDataSource()).isNull(); @@ -213,8 +212,8 @@ public void test_getters_with_source_name_delimiters_and_columns_set() { @Test public void test_getters_with_source_name_columns_delimiters_and_order_set() { Table table = new Table(source, "movie", '1', '2', - new Table.Order[]{ asc("title"), desc("year") }, - new String[] { "title", "year" }, new String[] { "id" }); + new Table.Order[]{asc("title"), desc("year")}, + new String[]{"title", "year"}, new String[]{"id"}); assertThat(table.getSource()).as("Source of MOVIE table").isSameAs(source); assertThat(table.getDataSource()).isNull(); @@ -234,7 +233,7 @@ public void test_getters_with_source_name_columns_delimiters_and_order_set() { @Test public void test_getters_with_source_name_delimiters_and_order_set() { Table table = new Table(source, "movie", '1', '2', - new Table.Order[]{ asc("title"), desc("year") }); + new Table.Order[]{asc("title"), desc("year")}); assertThat(table.getSource()).as("Source of MOVIE table").isSameAs(source); assertThat(table.getDataSource()).isNull(); diff --git a/src/test/java/org/assertj/db/type/Table_Instantiation_Test.java b/src/test/java/org/assertj/db/type/Table_Instantiation_Test.java index 5bcb7672..eb61d305 100644 --- a/src/test/java/org/assertj/db/type/Table_Instantiation_Test.java +++ b/src/test/java/org/assertj/db/type/Table_Instantiation_Test.java @@ -8,24 +8,23 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.type; +import javax.sql.DataSource; + import org.assertj.db.common.AbstractTest; import org.assertj.db.exception.AssertJDBException; import org.junit.Test; -import javax.sql.DataSource; - /** * Tests on the instantiation of {@code Table}. *

    * These tests are on the raise of some Exception depending of the case of test. *

    - * + * * @author Régis Pouiller - * */ public class Table_Instantiation_Test extends AbstractTest { @@ -125,7 +124,7 @@ public void should_throw_AssertJDBException_if_get_list_of_rows_with_setting_sou */ @Test(expected = NullPointerException.class) public void should_throw_NullPointerException_if_one_of_the_columns_to_check_is_null() { - new Table(source, "movie", new String[] { "id", null, "birth" }, null); + new Table(source, "movie", new String[]{"id", null, "birth"}, null); } /** @@ -133,6 +132,6 @@ public void should_throw_NullPointerException_if_one_of_the_columns_to_check_is_ */ @Test(expected = NullPointerException.class) public void should_throw_NullPointerException_if_one_of_the_columns_to_exclude_is_null() { - new Table(source, "movie", new String[] { "id", "name", "birth" }, new String[] { null }); + new Table(source, "movie", new String[]{"id", "name", "birth"}, new String[]{null}); } } diff --git a/src/test/java/org/assertj/db/type/Table_PrimaryKeys_Name_Test.java b/src/test/java/org/assertj/db/type/Table_PrimaryKeys_Name_Test.java index 31377ad0..548cf787 100644 --- a/src/test/java/org/assertj/db/type/Table_PrimaryKeys_Name_Test.java +++ b/src/test/java/org/assertj/db/type/Table_PrimaryKeys_Name_Test.java @@ -8,24 +8,23 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.type; +import static org.assertj.core.api.Assertions.assertThat; + import org.assertj.db.common.AbstractTest; import org.assertj.db.exception.AssertJDBException; import org.junit.Test; -import static org.assertj.core.api.Assertions.assertThat; - /** * Tests on the primary keys name of {@code Table}. *

    * These tests are on the name of the primary keys got from a {@code Table}. *

    - * + * * @author Régis Pouiller - * */ public class Table_PrimaryKeys_Name_Test extends AbstractTest { @@ -37,7 +36,7 @@ public void test_pks_name_with_source_set() { Table table = new Table(source, "movie"); assertThat(table.getPksNameList()).as("Primary Keys of MOVIE table").hasSize(1) - .containsExactly("ID"); + .containsExactly("ID"); } /** @@ -48,7 +47,7 @@ public void test_pks_name_with_datasource_set() { Table table = new Table(dataSource, "movie"); assertThat(table.getPksNameList()).as("Primary Keys of MOVIE table").hasSize(1) - .containsExactly("ID"); + .containsExactly("ID"); } /** @@ -56,10 +55,10 @@ public void test_pks_name_with_datasource_set() { */ @Test public void test_pks_name_to_check_with_source_set() { - Table table = new Table(source, "actor", new String[] { "id", "name", "birth" }, null); + Table table = new Table(source, "actor", new String[]{"id", "name", "birth"}, null); assertThat(table.getPksNameList()).as("Primary Keys of ACTOR table").hasSize(1) - .containsExactly("ID"); + .containsExactly("ID"); } /** @@ -67,10 +66,10 @@ public void test_pks_name_to_check_with_source_set() { */ @Test public void test_pks_name_to_check_with_datasource_set() { - Table table = new Table(dataSource, "actor", new String[] { "id", "name", "birth" }, null); + Table table = new Table(dataSource, "actor", new String[]{"id", "name", "birth"}, null); assertThat(table.getPksNameList()).as("Primary Keys of ACTOR table").hasSize(1) - .containsExactly("ID"); + .containsExactly("ID"); } /** @@ -78,7 +77,7 @@ public void test_pks_name_to_check_with_datasource_set() { */ @Test public void test_pks_name_to_exclude_with_source_set() { - Table table = new Table(source, "interpretation", null, new String[] { "ID" }); + Table table = new Table(source, "interpretation", null, new String[]{"ID"}); assertThat(table.getPksNameList()).as("Primary Keys of INTERPRETATION table").hasSize(0); } @@ -88,7 +87,7 @@ public void test_pks_name_to_exclude_with_source_set() { */ @Test public void test_pks_name_to_exclude_with_datasource_set() { - Table table = new Table(dataSource, "interpretation", null, new String[] { "id" }); + Table table = new Table(dataSource, "interpretation", null, new String[]{"id"}); assertThat(table.getPksNameList()).as("Primary Keys of INTERPRETATION table").hasSize(0); } diff --git a/src/test/java/org/assertj/db/type/Table_Rows_Test.java b/src/test/java/org/assertj/db/type/Table_Rows_Test.java index 3b2eb5ff..b38f2193 100644 --- a/src/test/java/org/assertj/db/type/Table_Rows_Test.java +++ b/src/test/java/org/assertj/db/type/Table_Rows_Test.java @@ -8,27 +8,26 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.type; -import org.assertj.db.common.AbstractTest; -import org.junit.Test; +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.db.type.Table.Order.asc; import java.math.BigDecimal; import java.util.UUID; -import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.db.type.Table.Order.asc; +import org.assertj.db.common.AbstractTest; +import org.junit.Test; /** * Tests on the {@code Row} of {@code Table}. *

    * These tests are on the values in the {@code Row} got from a {@code Table}. *

    - * + * * @author Régis Pouiller - * */ public class Table_Rows_Test extends AbstractTest { @@ -46,27 +45,27 @@ public void test_rows_with_source_set() { assertThat(table.getRow(0).getColumnValue("title").getValue()).isEqualTo("Alien"); assertThat(table.getRow(0).getValuesList().get(0).getValue()).as("Row 1 of MOVIE table").isEqualTo( - new BigDecimal(1)); + new BigDecimal(1)); assertThat(table.getRow(0).getValuesList().get(1).getValue()).as("Row 1 of MOVIE table").isEqualTo("Alien"); assertThat(table.getRow(0).getValuesList().get(2).getValue()).as("Row 1 of MOVIE table").isEqualTo( - new BigDecimal(1979)); + new BigDecimal(1979)); assertThat(table.getRow(0).getValuesList().get(3).getValue()).as("Row 1 of MOVIE table").isEqualTo( - UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")); + UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")); assertThat(table.getRow(1).getValuesList().get(0).getValue()).as("Row 2 of MOVIE table").isEqualTo( - new BigDecimal(2)); + new BigDecimal(2)); assertThat(table.getRow(1).getValuesList().get(1).getValue()).as("Row 2 of MOVIE table").isEqualTo("The Village"); assertThat(table.getRow(1).getValuesList().get(2).getValue()).as("Row 2 of MOVIE table").isEqualTo( - new BigDecimal(2004)); + new BigDecimal(2004)); assertThat(table.getRow(1).getValuesList().get(3).getValue()).as("Row 2 of MOVIE table").isEqualTo( - UUID.fromString("16319617-AE95-4087-9264-D3D21BF611B6")); + UUID.fromString("16319617-AE95-4087-9264-D3D21BF611B6")); assertThat(table.getRow(2).getValuesList().get(0).getValue()).as("Row 3 of MOVIE table") - .isEqualTo(new BigDecimal(3)); + .isEqualTo(new BigDecimal(3)); assertThat(table.getRow(2).getValuesList().get(1).getValue()).as("Row 3 of MOVIE table") - .isEqualTo("Avatar"); + .isEqualTo("Avatar"); assertThat(table.getRow(2).getValuesList().get(2).getValue()).as("Row 3 of MOVIE table") - .isEqualTo(new BigDecimal(2009)); + .isEqualTo(new BigDecimal(2009)); assertThat(table.getRow(2).getValuesList().get(3).getValue()).as("Row 3 of MOVIE table") - .isEqualTo(UUID.fromString("D735221B-5DE5-4112-AA1E-49090CB75ADA")); + .isEqualTo(UUID.fromString("D735221B-5DE5-4112-AA1E-49090CB75ADA")); } /** @@ -79,28 +78,28 @@ public void test_rows_with_datasource_set() { assertThat(table.getRowsList()).as("Values of MOVIE table").hasSize(3); assertThat(table.getRow(0).getValuesList().get(0).getValue()).as("Row 1 of MOVIE table").isEqualTo( - new BigDecimal(1)); + new BigDecimal(1)); assertThat(table.getRow(0).getValuesList().get(1).getValue()).as("Row 1 of MOVIE table").isEqualTo("Alien"); assertThat(table.getRow(0).getValuesList().get(2).getValue()).as("Row 1 of MOVIE table").isEqualTo( - new BigDecimal(1979)); + new BigDecimal(1979)); assertThat(table.getRow(0).getValuesList().get(3).getValue()).as("Row 1 of MOVIE table").isEqualTo( - UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")); + UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")); assertThat(table.getRow(1).getValuesList().get(0).getValue()).as("Row 2 of MOVIE table").isEqualTo( - new BigDecimal(2)); + new BigDecimal(2)); assertThat(table.getRow(1).getValuesList().get(1).getValue()).as("Row 2 of MOVIE table").isEqualTo("The Village"); assertThat(table.getRow(1).getValuesList().get(2).getValue()).as("Row 2 of MOVIE table").isEqualTo( - new BigDecimal(2004)); + new BigDecimal(2004)); assertThat(table.getRow(1).getValuesList().get(3).getValue()).as("Row 2 of MOVIE table").isEqualTo( - UUID.fromString("16319617-AE95-4087-9264-D3D21BF611B6")); + UUID.fromString("16319617-AE95-4087-9264-D3D21BF611B6")); assertThat(table.getRow(2).getValuesList().get(0).getValue()).as("Row 3 of MOVIE table") - .isEqualTo(new BigDecimal(3)); + .isEqualTo(new BigDecimal(3)); assertThat(table.getRow(2).getValuesList().get(1).getValue()).as("Row 3 of MOVIE table") - .isEqualTo("Avatar"); + .isEqualTo("Avatar"); assertThat(table.getRow(2).getValuesList().get(2).getValue()).as("Row 3 of MOVIE table") - .isEqualTo(new BigDecimal(2009)); + .isEqualTo(new BigDecimal(2009)); assertThat(table.getRow(2).getValuesList().get(3).getValue()).as("Row 3 of MOVIE table") - .isEqualTo(UUID.fromString( - "D735221B-5DE5-4112-AA1E-49090CB75ADA")); + .isEqualTo(UUID.fromString( + "D735221B-5DE5-4112-AA1E-49090CB75ADA")); } /** @@ -108,33 +107,33 @@ public void test_rows_with_datasource_set() { */ @Test public void test_rows_with_datasource_and_order_set() { - Table table = new Table(dataSource, "movie", new Table.Order[] { asc("title")}); + Table table = new Table(dataSource, "movie", new Table.Order[]{asc("title")}); assertThat(table.getRowsList()).as("Values of MOVIE table").hasSize(3); assertThat(table.getRow(0).getValuesList().get(0).getValue()).as("Row 1 of MOVIE table").isEqualTo( - new BigDecimal(1)); + new BigDecimal(1)); assertThat(table.getRow(0).getValuesList().get(1).getValue()).as("Row 1 of MOVIE table").isEqualTo("Alien"); assertThat(table.getRow(0).getValuesList().get(2).getValue()).as("Row 1 of MOVIE table").isEqualTo( - new BigDecimal(1979)); + new BigDecimal(1979)); assertThat(table.getRow(0).getValuesList().get(3).getValue()).as("Row 1 of MOVIE table").isEqualTo( - UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")); + UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")); assertThat(table.getRow(1).getValuesList().get(0).getValue()).as("Row 3 of MOVIE table") - .isEqualTo(new BigDecimal(3)); + .isEqualTo(new BigDecimal(3)); assertThat(table.getRow(1).getValuesList().get(1).getValue()).as("Row 3 of MOVIE table") - .isEqualTo("Avatar"); + .isEqualTo("Avatar"); assertThat(table.getRow(1).getValuesList().get(2).getValue()).as("Row 3 of MOVIE table") - .isEqualTo(new BigDecimal(2009)); + .isEqualTo(new BigDecimal(2009)); assertThat(table.getRow(1).getValuesList().get(3).getValue()).as("Row 3 of MOVIE table") - .isEqualTo(UUID.fromString( - "D735221B-5DE5-4112-AA1E-49090CB75ADA")); + .isEqualTo(UUID.fromString( + "D735221B-5DE5-4112-AA1E-49090CB75ADA")); assertThat(table.getRow(2).getValuesList().get(0).getValue()).as("Row 2 of MOVIE table").isEqualTo( - new BigDecimal(2)); + new BigDecimal(2)); assertThat(table.getRow(2).getValuesList().get(1).getValue()).as("Row 2 of MOVIE table").isEqualTo("The Village"); assertThat(table.getRow(2).getValuesList().get(2).getValue()).as("Row 2 of MOVIE table").isEqualTo( - new BigDecimal(2004)); + new BigDecimal(2004)); assertThat(table.getRow(2).getValuesList().get(3).getValue()).as("Row 2 of MOVIE table").isEqualTo( - UUID.fromString("16319617-AE95-4087-9264-D3D21BF611B6")); + UUID.fromString("16319617-AE95-4087-9264-D3D21BF611B6")); } /** diff --git a/src/test/java/org/assertj/db/type/TimeValue_Test.java b/src/test/java/org/assertj/db/type/TimeValue_Test.java index fc0d4f13..8d8feeba 100644 --- a/src/test/java/org/assertj/db/type/TimeValue_Test.java +++ b/src/test/java/org/assertj/db/type/TimeValue_Test.java @@ -8,26 +8,25 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.type; -import org.assertj.db.common.AbstractTest; -import org.junit.Test; +import static org.assertj.core.api.Assertions.assertThat; import java.sql.Time; import java.text.ParseException; import java.time.LocalTime; import java.util.Calendar; -import static org.assertj.core.api.Assertions.assertThat; +import org.assertj.db.common.AbstractTest; +import org.junit.Test; /** * Tests on the time value. * * @author Régis Pouiller * @author Julien Roy - * */ public class TimeValue_Test extends AbstractTest { @@ -278,35 +277,31 @@ public void test_now() throws ParseException { Calendar calendarSecond = Calendar.getInstance(); if (calendarFirst.get(Calendar.DAY_OF_YEAR) == calendarSecond.get(Calendar.DAY_OF_YEAR)) { assertThat(timeValue.getHours()).isBetween(calendarFirst.get(Calendar.HOUR_OF_DAY), - calendarSecond.get(Calendar.HOUR_OF_DAY)); - } - else { + calendarSecond.get(Calendar.HOUR_OF_DAY)); + } else { assertThat(timeValue.getHours()).isBetween(calendarFirst.get(Calendar.HOUR_OF_DAY) - 24, - calendarSecond.get(Calendar.HOUR_OF_DAY) + 24); + calendarSecond.get(Calendar.HOUR_OF_DAY) + 24); } if (calendarFirst.get(Calendar.DAY_OF_YEAR) == calendarSecond.get(Calendar.HOUR_OF_DAY)) { assertThat(timeValue.getMinutes()).isBetween(calendarFirst.get(Calendar.MINUTE), - calendarSecond.get(Calendar.MINUTE)); - } - else { + calendarSecond.get(Calendar.MINUTE)); + } else { assertThat(timeValue.getMinutes()).isBetween(calendarFirst.get(Calendar.MINUTE) - 60, - calendarSecond.get(Calendar.MINUTE) + 60); + calendarSecond.get(Calendar.MINUTE) + 60); } if (calendarFirst.get(Calendar.MINUTE) == calendarSecond.get(Calendar.MINUTE)) { assertThat(timeValue.getSeconds()).isBetween(calendarFirst.get(Calendar.SECOND), - calendarSecond.get(Calendar.SECOND)); - } - else { + calendarSecond.get(Calendar.SECOND)); + } else { assertThat(timeValue.getSeconds()).isBetween(calendarFirst.get(Calendar.SECOND) - 60, - calendarSecond.get(Calendar.SECOND) + 60); + calendarSecond.get(Calendar.SECOND) + 60); } if (calendarFirst.get(Calendar.SECOND) == calendarSecond.get(Calendar.SECOND)) { assertThat(timeValue.getNanoSeconds()).isBetween(calendarFirst.get(Calendar.MILLISECOND) * 1000000, - calendarSecond.get(Calendar.MILLISECOND) * 1000000); - } - else { + calendarSecond.get(Calendar.MILLISECOND) * 1000000); + } else { assertThat(timeValue.getNanoSeconds()).isBetween(calendarFirst.get(Calendar.MILLISECOND) * 1000000 - 1000000000, - calendarSecond.get(Calendar.MILLISECOND) * 1000000 + 1000000000); + calendarSecond.get(Calendar.MILLISECOND) * 1000000 + 1000000000); } } @@ -543,73 +538,73 @@ public void test_isAfter() { @Test public void test_move_time() { assertThat(TimeValue.of(9, 1).move(TimeValue.of(0, 0, 0, 1))).as("add 1 nano").isEqualTo( - TimeValue.of(9, 1, 0, 1)); + TimeValue.of(9, 1, 0, 1)); assertThat(TimeValue.of(9, 1).move(TimeValue.of(0, 0, 0, 2))).as("add 2 nanos").isEqualTo( - TimeValue.of(9, 1, 0, 2)); + TimeValue.of(9, 1, 0, 2)); assertThat(TimeValue.of(9, 1).move(TimeValue.of(0, 0, 0, -1))).as("substract 1 nano").isEqualTo( - TimeValue.of(9, 0, 59, 999999999)); + TimeValue.of(9, 0, 59, 999999999)); assertThat(TimeValue.of(9, 1).move(TimeValue.of(0, 0, 0, -2))).as("substract 2 nanos").isEqualTo( - TimeValue.of(9, 0, 59, 999999998)); + TimeValue.of(9, 0, 59, 999999998)); assertThat(TimeValue.of(9, 1).move(TimeValue.of(0, 0, 0, 1000000))).as("add 1 milli").isEqualTo( - TimeValue.of(9, 1, 0, 1000000)); + TimeValue.of(9, 1, 0, 1000000)); assertThat(TimeValue.of(9, 1).move(TimeValue.of(0, 0, 0, 2000000))).as("add 2 millis").isEqualTo( - TimeValue.of(9, 1, 0, 2000000)); + TimeValue.of(9, 1, 0, 2000000)); assertThat(TimeValue.of(9, 1).move(TimeValue.of(0, 0, 0, -1000000))).as("substract 1 milli").isEqualTo( - TimeValue.of(9, 0, 59, 999000000)); + TimeValue.of(9, 0, 59, 999000000)); assertThat(TimeValue.of(9, 1).move(TimeValue.of(0, 0, 0, -2000000))).as("substract 2 millis").isEqualTo( - TimeValue.of(9, 0, 59, 998000000)); + TimeValue.of(9, 0, 59, 998000000)); assertThat(TimeValue.of(9, 1).move(TimeValue.of(0, 0, 1))).as("add 1 second").isEqualTo( - TimeValue.of(9, 1, 1)); + TimeValue.of(9, 1, 1)); assertThat(TimeValue.of(9, 1).move(TimeValue.of(0, 0, 2))).as("add 2 seconds").isEqualTo( - TimeValue.of(9, 1, 2)); + TimeValue.of(9, 1, 2)); - assertThat(TimeValue.of(9, 1, 58).move(TimeValue.of(0, 0, 10))).as("add 10 seconds to 58").isEqualTo( - TimeValue.of(9, 2, 8)); + assertThat(TimeValue.of(9, 1, 58).move(TimeValue.of(0, 0, 10))).as("add 10 seconds to 58").isEqualTo( + TimeValue.of(9, 2, 8)); - assertThat(TimeValue.of(9, 59, 58).move(TimeValue.of(0, 0, 50))).as("add 50 seconds to 58").isEqualTo( - TimeValue.of(10, 00, 48)); + assertThat(TimeValue.of(9, 59, 58).move(TimeValue.of(0, 0, 50))).as("add 50 seconds to 58").isEqualTo( + TimeValue.of(10, 00, 48)); - assertThat(TimeValue.of(9, 0, 0).move(TimeValue.of(0, 0, -10))).as("substract 10 seconds to 0").isEqualTo( - TimeValue.of(8, 59, 50)); + assertThat(TimeValue.of(9, 0, 0).move(TimeValue.of(0, 0, -10))).as("substract 10 seconds to 0").isEqualTo( + TimeValue.of(8, 59, 50)); assertThat(TimeValue.of(9, 1).move(TimeValue.of(0, 0, -1))).as("substract 1 second").isEqualTo( - TimeValue.of(9, 0, 59, 0)); + TimeValue.of(9, 0, 59, 0)); assertThat(TimeValue.of(9, 1).move(TimeValue.of(0, 0, -2))).as("substract 2 seconds").isEqualTo( - TimeValue.of(9, 0, 58, 0)); + TimeValue.of(9, 0, 58, 0)); assertThat(TimeValue.of(9, 1).move(TimeValue.of(0, 1, 0))).as("add 1 minute").isEqualTo( - TimeValue.of(9, 2)); + TimeValue.of(9, 2)); assertThat(TimeValue.of(9, 1).move(TimeValue.of(0, 2, 0))).as("add 2 minutes").isEqualTo( - TimeValue.of(9, 3)); + TimeValue.of(9, 3)); assertThat(TimeValue.of(9, 1).move(TimeValue.of(0, -1, 0))).as("substract 1 minute").isEqualTo( - TimeValue.of(9, 0, 0, 0)); + TimeValue.of(9, 0, 0, 0)); assertThat(TimeValue.of(9, 1).move(TimeValue.of(0, -2, 0))).as("substract 2 minutes").isEqualTo( - TimeValue.of(8, 59, 0, 0)); + TimeValue.of(8, 59, 0, 0)); assertThat(TimeValue.of(9, 1).move(TimeValue.of(1, 0, 0))).as("add 1 hour").isEqualTo( - TimeValue.of(10, 1)); + TimeValue.of(10, 1)); assertThat(TimeValue.of(9, 1).move(TimeValue.of(2, 0, 0))).as("add 2 hours").isEqualTo( - TimeValue.of(11, 1)); + TimeValue.of(11, 1)); assertThat(TimeValue.of(9, 1).move(TimeValue.of(-1, 0, 0))).as("substract 1 hour").isEqualTo( - TimeValue.of(8, 1, 0, 0)); + TimeValue.of(8, 1, 0, 0)); assertThat(TimeValue.of(9, 1).move(TimeValue.of(-2, 0, 0))).as("substract 2 hours").isEqualTo( - TimeValue.of(7, 1, 0, 0)); + TimeValue.of(7, 1, 0, 0)); assertThat(TimeValue.of(9, 1).move(TimeValue.of(1, 1, 1, 1000000))).as("add 1 all").isEqualTo( - TimeValue.of(10, 2, 1, 1000000)); + TimeValue.of(10, 2, 1, 1000000)); assertThat(TimeValue.of(9, 1).move(TimeValue.of(2, 2, 2, 2000000))).as("add 2 all").isEqualTo( - TimeValue.of(11, 3, 2, 2000000)); + TimeValue.of(11, 3, 2, 2000000)); assertThat(TimeValue.of(9, 1).move(TimeValue.of(-1, -1, -1, -1000000))).as("substract 1 all").isEqualTo( - TimeValue.of(7, 59, 58, 999000000)); + TimeValue.of(7, 59, 58, 999000000)); assertThat(TimeValue.of(9, 1).move(TimeValue.of(-2, -2, -2, -2000000))).as("substract 2 all").isEqualTo( - TimeValue.of(6, 58, 57, 998000000)); + TimeValue.of(6, 58, 57, 998000000)); } /** diff --git a/src/test/java/org/assertj/db/type/ValueType_GetPossibleTypesForComparison_Test.java b/src/test/java/org/assertj/db/type/ValueType_GetPossibleTypesForComparison_Test.java index 0f4f664c..bb7de054 100644 --- a/src/test/java/org/assertj/db/type/ValueType_GetPossibleTypesForComparison_Test.java +++ b/src/test/java/org/assertj/db/type/ValueType_GetPossibleTypesForComparison_Test.java @@ -8,22 +8,21 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.type; -import org.junit.Test; +import static org.assertj.core.api.Assertions.assertThat; import java.math.BigDecimal; import java.util.UUID; -import static org.assertj.core.api.Assertions.assertThat; +import org.junit.Test; /** * Test on the type got from {@code getPossibleTypesForComparison} method from {@code ValueType} enum. * * @author Régis Pouiller - * */ public class ValueType_GetPossibleTypesForComparison_Test { @@ -32,21 +31,21 @@ public class ValueType_GetPossibleTypesForComparison_Test { */ @Test public void test_result_when_getting_type() throws Exception { - assertThat(ValueType.getPossibleTypesForComparison(new byte[] { 1 })).isEqualTo(new ValueType[] { ValueType.BYTES }); - assertThat(ValueType.getPossibleTypesForComparison(true)).isEqualTo(new ValueType[] { ValueType.BOOLEAN }); - assertThat(ValueType.getPossibleTypesForComparison("")).isEqualTo(new ValueType[] { ValueType.TEXT, ValueType.NUMBER, - ValueType.DATE, ValueType.TIME, ValueType.DATE_TIME, ValueType.UUID }); - assertThat(ValueType.getPossibleTypesForComparison(DateValue.of(2007, 12, 23))).isEqualTo(new ValueType[] { ValueType.DATE, ValueType.DATE_TIME }); - assertThat(ValueType.getPossibleTypesForComparison(TimeValue.of(9, 1))).isEqualTo(new ValueType[] { ValueType.TIME }); + assertThat(ValueType.getPossibleTypesForComparison(new byte[]{1})).isEqualTo(new ValueType[]{ValueType.BYTES}); + assertThat(ValueType.getPossibleTypesForComparison(true)).isEqualTo(new ValueType[]{ValueType.BOOLEAN}); + assertThat(ValueType.getPossibleTypesForComparison("")).isEqualTo(new ValueType[]{ValueType.TEXT, ValueType.NUMBER, + ValueType.DATE, ValueType.TIME, ValueType.DATE_TIME, ValueType.UUID}); + assertThat(ValueType.getPossibleTypesForComparison(DateValue.of(2007, 12, 23))).isEqualTo(new ValueType[]{ValueType.DATE, ValueType.DATE_TIME}); + assertThat(ValueType.getPossibleTypesForComparison(TimeValue.of(9, 1))).isEqualTo(new ValueType[]{ValueType.TIME}); assertThat(ValueType.getPossibleTypesForComparison(DateTimeValue.of(DateValue.of(2007, 12, 23)))).isEqualTo( - new ValueType[] { ValueType.DATE_TIME }); - assertThat(ValueType.getPossibleTypesForComparison((short) 10)).isEqualTo(new ValueType[] { ValueType.NUMBER }); - assertThat(ValueType.getPossibleTypesForComparison(10)).isEqualTo(new ValueType[] { ValueType.NUMBER }); - assertThat(ValueType.getPossibleTypesForComparison((long) 10)).isEqualTo(new ValueType[] { ValueType.NUMBER }); - assertThat(ValueType.getPossibleTypesForComparison(10.5d)).isEqualTo(new ValueType[] { ValueType.NUMBER }); - assertThat(ValueType.getPossibleTypesForComparison(10.5f)).isEqualTo(new ValueType[] { ValueType.NUMBER }); - assertThat(ValueType.getPossibleTypesForComparison(new BigDecimal(10.5f))).isEqualTo(new ValueType[] { ValueType.NUMBER }); - assertThat(ValueType.getPossibleTypesForComparison(UUID.randomUUID())).isEqualTo(new ValueType[] { ValueType.UUID }); - assertThat(ValueType.getPossibleTypesForComparison(null)).isEqualTo(new ValueType[] { ValueType.NOT_IDENTIFIED }); + new ValueType[]{ValueType.DATE_TIME}); + assertThat(ValueType.getPossibleTypesForComparison((short) 10)).isEqualTo(new ValueType[]{ValueType.NUMBER}); + assertThat(ValueType.getPossibleTypesForComparison(10)).isEqualTo(new ValueType[]{ValueType.NUMBER}); + assertThat(ValueType.getPossibleTypesForComparison((long) 10)).isEqualTo(new ValueType[]{ValueType.NUMBER}); + assertThat(ValueType.getPossibleTypesForComparison(10.5d)).isEqualTo(new ValueType[]{ValueType.NUMBER}); + assertThat(ValueType.getPossibleTypesForComparison(10.5f)).isEqualTo(new ValueType[]{ValueType.NUMBER}); + assertThat(ValueType.getPossibleTypesForComparison(new BigDecimal(10.5f))).isEqualTo(new ValueType[]{ValueType.NUMBER}); + assertThat(ValueType.getPossibleTypesForComparison(UUID.randomUUID())).isEqualTo(new ValueType[]{ValueType.UUID}); + assertThat(ValueType.getPossibleTypesForComparison(null)).isEqualTo(new ValueType[]{ValueType.NOT_IDENTIFIED}); } } diff --git a/src/test/java/org/assertj/db/type/ValueType_GetType_Test.java b/src/test/java/org/assertj/db/type/ValueType_GetType_Test.java index 2db2554b..dcde418e 100644 --- a/src/test/java/org/assertj/db/type/ValueType_GetType_Test.java +++ b/src/test/java/org/assertj/db/type/ValueType_GetType_Test.java @@ -8,12 +8,11 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.type; -import org.assertj.db.common.AbstractTest; -import org.junit.Test; +import static org.assertj.core.api.Assertions.assertThat; import java.math.BigDecimal; import java.sql.Date; @@ -21,13 +20,13 @@ import java.sql.Timestamp; import java.util.UUID; -import static org.assertj.core.api.Assertions.assertThat; +import org.assertj.db.common.AbstractTest; +import org.junit.Test; /** * Test on the type got from {@code getType} method from {@code ValueType} enum. - * + * * @author Régis Pouiller - * */ public class ValueType_GetType_Test extends AbstractTest { @@ -36,7 +35,7 @@ public class ValueType_GetType_Test extends AbstractTest { */ @Test public void test_result_when_getting_type() throws Exception { - assertThat(getValue(null, new byte[] { 1 }).getValueType()).isEqualTo(ValueType.BYTES); + assertThat(getValue(null, new byte[]{1}).getValueType()).isEqualTo(ValueType.BYTES); assertThat(getValue(null, true).getValueType()).isEqualTo(ValueType.BOOLEAN); assertThat(getValue(null, "").getValueType()).isEqualTo(ValueType.TEXT); assertThat(getValue(null, new Date(10)).getValueType()).isEqualTo(ValueType.DATE); diff --git a/src/test/java/org/assertj/db/type/ValueType_ValueOf_Test.java b/src/test/java/org/assertj/db/type/ValueType_ValueOf_Test.java index e10bcd46..617da712 100644 --- a/src/test/java/org/assertj/db/type/ValueType_ValueOf_Test.java +++ b/src/test/java/org/assertj/db/type/ValueType_ValueOf_Test.java @@ -8,20 +8,19 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.type; +import static org.assertj.core.api.Assertions.assertThat; + import org.assertj.db.common.AbstractTest; import org.junit.Test; -import static org.assertj.core.api.Assertions.assertThat; - /** * Test on the type got from {@code valueOf} method from {@code ValueType} enum. - * + * * @author Régis Pouiller - * */ public class ValueType_ValueOf_Test extends AbstractTest { diff --git a/src/test/java/org/assertj/db/type/Value_IsComparisonPossible_Test.java b/src/test/java/org/assertj/db/type/Value_IsComparisonPossible_Test.java index f29e3447..8423c8f8 100644 --- a/src/test/java/org/assertj/db/type/Value_IsComparisonPossible_Test.java +++ b/src/test/java/org/assertj/db/type/Value_IsComparisonPossible_Test.java @@ -8,12 +8,11 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.type; -import org.assertj.db.common.AbstractTest; -import org.junit.Test; +import static org.assertj.core.api.Assertions.assertThat; import java.math.BigDecimal; import java.math.BigInteger; @@ -23,53 +22,53 @@ import java.sql.Timestamp; import java.util.UUID; -import static org.assertj.core.api.Assertions.assertThat; +import org.assertj.db.common.AbstractTest; +import org.junit.Test; /** * Test on {@code isComparisonPossible} method from {@code Value}. * * @author Régis Pouiller - * */ public class Value_IsComparisonPossible_Test extends AbstractTest { - /** - * This method tests {@code isComparisonPossible} method from {@code Value}. - */ - @Test - public void test_is_comparison_possible() throws Exception { - assertThat(getValue("", new byte[] { 1 }).isComparisonPossible(new byte[] { 1 })).isTrue(); - assertThat(getValue("", true).isComparisonPossible(true)).isTrue(); - assertThat(getValue("", "").isComparisonPossible("")).isTrue(); - assertThat(getValue("", 9).isComparisonPossible("")).isTrue(); - assertThat(getValue("", 9).isComparisonPossible((byte) 10)).isTrue(); - assertThat(getValue("", 9).isComparisonPossible((short) 10)).isTrue(); - assertThat(getValue("", 9).isComparisonPossible(10)).isTrue(); - assertThat(getValue("", 9).isComparisonPossible((long) 10)).isTrue(); - assertThat(getValue("", 9).isComparisonPossible(10.5f)).isTrue(); - assertThat(getValue("", 9).isComparisonPossible(10.5d)).isTrue(); - assertThat(getValue("", 9).isComparisonPossible(new BigInteger("10"))).isTrue(); - assertThat(getValue("", 9).isComparisonPossible(new BigDecimal(10.5f))).isTrue(); - assertThat(getValue("", Date.valueOf("2007-12-23")).isComparisonPossible("")).isTrue(); - assertThat(getValue("", Date.valueOf("2007-12-23")).isComparisonPossible(DateValue.of(2014, 10, 10))).isTrue(); - assertThat(getValue("", Date.valueOf("2007-12-23")).isComparisonPossible(DateTimeValue.of(DateValue.of(2014, 10, 10), TimeValue.of(10, 10)))).isTrue(); - assertThat(getValue("", Time.valueOf("09:01:00")).isComparisonPossible("")).isTrue(); - assertThat(getValue("", Time.valueOf("09:01:00")).isComparisonPossible(TimeValue.of(10, 10))).isTrue(); - assertThat(getValue("", Timestamp.valueOf("2007-12-23 09:01:00")).isComparisonPossible("")).isTrue(); - assertThat(getValue("", Timestamp.valueOf("2007-12-23 09:01:00")).isComparisonPossible(DateValue.of(2014, 10, 10))).isTrue(); - assertThat(getValue("", Timestamp.valueOf("2007-12-23 09:01:00")).isComparisonPossible(DateTimeValue.of(DateValue.of(2014, 10, 10), TimeValue.of(10, 10)))).isTrue(); - assertThat(getValue("", UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")).isComparisonPossible("")).isTrue(); - assertThat(getValue("", UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")).isComparisonPossible(UUID.randomUUID())).isTrue(); - assertThat(getValue("", null).isComparisonPossible(null)).isTrue(); - assertThat(getValue("", new URL("http://github.com")).isComparisonPossible(null)).isFalse(); - assertThat(getValue("", new byte[] { 1 }).isComparisonPossible("")).isFalse(); - assertThat(getValue("", true).isComparisonPossible("")).isFalse(); - assertThat(getValue("", "").isComparisonPossible(new byte[] { 1 })).isFalse(); - assertThat(getValue("", 9).isComparisonPossible(new byte[] { 1 })).isFalse(); - assertThat(getValue("", Date.valueOf("2007-12-23")).isComparisonPossible(new byte[] { 1 })).isFalse(); - assertThat(getValue("", Time.valueOf("09:01:00")).isComparisonPossible(new byte[] { 1 })).isFalse(); - assertThat(getValue("", Timestamp.valueOf("2007-12-23 09:01:00")).isComparisonPossible(new byte[] { 1 })).isFalse(); - assertThat(getValue("", UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")).isComparisonPossible(new byte[] { 1 })).isFalse(); - assertThat(getValue("", null).isComparisonPossible(new byte[] { 1 })).isFalse(); - } + /** + * This method tests {@code isComparisonPossible} method from {@code Value}. + */ + @Test + public void test_is_comparison_possible() throws Exception { + assertThat(getValue("", new byte[]{1}).isComparisonPossible(new byte[]{1})).isTrue(); + assertThat(getValue("", true).isComparisonPossible(true)).isTrue(); + assertThat(getValue("", "").isComparisonPossible("")).isTrue(); + assertThat(getValue("", 9).isComparisonPossible("")).isTrue(); + assertThat(getValue("", 9).isComparisonPossible((byte) 10)).isTrue(); + assertThat(getValue("", 9).isComparisonPossible((short) 10)).isTrue(); + assertThat(getValue("", 9).isComparisonPossible(10)).isTrue(); + assertThat(getValue("", 9).isComparisonPossible((long) 10)).isTrue(); + assertThat(getValue("", 9).isComparisonPossible(10.5f)).isTrue(); + assertThat(getValue("", 9).isComparisonPossible(10.5d)).isTrue(); + assertThat(getValue("", 9).isComparisonPossible(new BigInteger("10"))).isTrue(); + assertThat(getValue("", 9).isComparisonPossible(new BigDecimal(10.5f))).isTrue(); + assertThat(getValue("", Date.valueOf("2007-12-23")).isComparisonPossible("")).isTrue(); + assertThat(getValue("", Date.valueOf("2007-12-23")).isComparisonPossible(DateValue.of(2014, 10, 10))).isTrue(); + assertThat(getValue("", Date.valueOf("2007-12-23")).isComparisonPossible(DateTimeValue.of(DateValue.of(2014, 10, 10), TimeValue.of(10, 10)))).isTrue(); + assertThat(getValue("", Time.valueOf("09:01:00")).isComparisonPossible("")).isTrue(); + assertThat(getValue("", Time.valueOf("09:01:00")).isComparisonPossible(TimeValue.of(10, 10))).isTrue(); + assertThat(getValue("", Timestamp.valueOf("2007-12-23 09:01:00")).isComparisonPossible("")).isTrue(); + assertThat(getValue("", Timestamp.valueOf("2007-12-23 09:01:00")).isComparisonPossible(DateValue.of(2014, 10, 10))).isTrue(); + assertThat(getValue("", Timestamp.valueOf("2007-12-23 09:01:00")).isComparisonPossible(DateTimeValue.of(DateValue.of(2014, 10, 10), TimeValue.of(10, 10)))).isTrue(); + assertThat(getValue("", UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")).isComparisonPossible("")).isTrue(); + assertThat(getValue("", UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")).isComparisonPossible(UUID.randomUUID())).isTrue(); + assertThat(getValue("", null).isComparisonPossible(null)).isTrue(); + assertThat(getValue("", new URL("http://github.com")).isComparisonPossible(null)).isFalse(); + assertThat(getValue("", new byte[]{1}).isComparisonPossible("")).isFalse(); + assertThat(getValue("", true).isComparisonPossible("")).isFalse(); + assertThat(getValue("", "").isComparisonPossible(new byte[]{1})).isFalse(); + assertThat(getValue("", 9).isComparisonPossible(new byte[]{1})).isFalse(); + assertThat(getValue("", Date.valueOf("2007-12-23")).isComparisonPossible(new byte[]{1})).isFalse(); + assertThat(getValue("", Time.valueOf("09:01:00")).isComparisonPossible(new byte[]{1})).isFalse(); + assertThat(getValue("", Timestamp.valueOf("2007-12-23 09:01:00")).isComparisonPossible(new byte[]{1})).isFalse(); + assertThat(getValue("", UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")).isComparisonPossible(new byte[]{1})).isFalse(); + assertThat(getValue("", null).isComparisonPossible(new byte[]{1})).isFalse(); + } } diff --git a/src/test/java/org/assertj/db/type/lettercase/CaseComparisons_Test.java b/src/test/java/org/assertj/db/type/lettercase/CaseComparisons_Test.java index ba4b9393..570e0e24 100644 --- a/src/test/java/org/assertj/db/type/lettercase/CaseComparisons_Test.java +++ b/src/test/java/org/assertj/db/type/lettercase/CaseComparisons_Test.java @@ -8,20 +8,19 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.type.lettercase; +import static org.assertj.core.api.Assertions.assertThat; + import org.assertj.db.common.AbstractTest; import org.junit.Test; -import static org.assertj.core.api.Assertions.assertThat; - /** * Tests on the conversion of CaseComparisons * * @author Régis Pouiller - * */ public class CaseComparisons_Test extends AbstractTest { diff --git a/src/test/java/org/assertj/db/type/lettercase/CaseComparisons_ValueOf_Test.java b/src/test/java/org/assertj/db/type/lettercase/CaseComparisons_ValueOf_Test.java index 7c077aee..144b3f73 100644 --- a/src/test/java/org/assertj/db/type/lettercase/CaseComparisons_ValueOf_Test.java +++ b/src/test/java/org/assertj/db/type/lettercase/CaseComparisons_ValueOf_Test.java @@ -8,20 +8,19 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.type.lettercase; +import static org.assertj.core.api.Assertions.assertThat; + import org.assertj.db.common.AbstractTest; import org.junit.Test; -import static org.assertj.core.api.Assertions.assertThat; - /** * Test on the type got from {@code valueOf} method from {@code CaseComparisons} enum. * * @author Régis Pouiller - * */ public class CaseComparisons_ValueOf_Test extends AbstractTest { diff --git a/src/test/java/org/assertj/db/type/lettercase/CaseConversions_Test.java b/src/test/java/org/assertj/db/type/lettercase/CaseConversions_Test.java index 364839d0..b5e70c94 100644 --- a/src/test/java/org/assertj/db/type/lettercase/CaseConversions_Test.java +++ b/src/test/java/org/assertj/db/type/lettercase/CaseConversions_Test.java @@ -8,20 +8,19 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.type.lettercase; +import static org.assertj.core.api.Assertions.assertThat; + import org.assertj.db.common.AbstractTest; import org.junit.Test; -import static org.assertj.core.api.Assertions.assertThat; - /** * Tests on the conversion of CaseConversions * * @author Régis Pouiller - * */ public class CaseConversions_Test extends AbstractTest { diff --git a/src/test/java/org/assertj/db/type/lettercase/CaseConversions_ValueOf_Test.java b/src/test/java/org/assertj/db/type/lettercase/CaseConversions_ValueOf_Test.java index c8993a71..3ad3ac45 100644 --- a/src/test/java/org/assertj/db/type/lettercase/CaseConversions_ValueOf_Test.java +++ b/src/test/java/org/assertj/db/type/lettercase/CaseConversions_ValueOf_Test.java @@ -8,20 +8,19 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.type.lettercase; +import static org.assertj.core.api.Assertions.assertThat; + import org.assertj.db.common.AbstractTest; import org.junit.Test; -import static org.assertj.core.api.Assertions.assertThat; - /** * Test on the type got from {@code valueOf} method from {@code CaseConversions} enum. * * @author Régis Pouiller - * */ public class CaseConversions_ValueOf_Test extends AbstractTest { diff --git a/src/test/java/org/assertj/db/type/lettercase/LetterCase_Exception_Test.java b/src/test/java/org/assertj/db/type/lettercase/LetterCase_Exception_Test.java index fc9dafbd..8d8244c8 100644 --- a/src/test/java/org/assertj/db/type/lettercase/LetterCase_Exception_Test.java +++ b/src/test/java/org/assertj/db/type/lettercase/LetterCase_Exception_Test.java @@ -8,21 +8,20 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.type.lettercase; +import static org.junit.Assert.fail; + import org.assertj.core.api.Assertions; import org.assertj.db.common.AbstractTest; import org.junit.Test; -import static org.junit.Assert.fail; - /** * Tests on the exceptions of LetterCase * * @author Régis Pouiller - * */ public class LetterCase_Exception_Test extends AbstractTest { diff --git a/src/test/java/org/assertj/db/type/lettercase/LetterCase_Test.java b/src/test/java/org/assertj/db/type/lettercase/LetterCase_Test.java index 762f2afb..5177fd93 100644 --- a/src/test/java/org/assertj/db/type/lettercase/LetterCase_Test.java +++ b/src/test/java/org/assertj/db/type/lettercase/LetterCase_Test.java @@ -8,20 +8,19 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.type.lettercase; +import static org.assertj.core.api.Assertions.assertThat; + import org.assertj.db.common.AbstractTest; import org.junit.Test; -import static org.assertj.core.api.Assertions.assertThat; - /** * Tests on LetterCase * * @author Régis Pouiller - * */ public class LetterCase_Test extends AbstractTest { diff --git a/src/test/java/org/assertj/db/util/AssertionsOnChangeColumn_Constructor_Test.java b/src/test/java/org/assertj/db/util/AssertionsOnChangeColumn_Constructor_Test.java index c9f950c7..6cc9cd9d 100644 --- a/src/test/java/org/assertj/db/util/AssertionsOnChangeColumn_Constructor_Test.java +++ b/src/test/java/org/assertj/db/util/AssertionsOnChangeColumn_Constructor_Test.java @@ -8,18 +8,18 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.util; -import org.assertj.db.api.assertions.impl.AssertionsOnColumnOfChangeEquality; -import org.junit.Test; +import static org.assertj.core.api.Assertions.assertThat; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Modifier; -import static org.assertj.core.api.Assertions.assertThat; +import org.assertj.db.api.assertions.impl.AssertionsOnColumnOfChangeEquality; +import org.junit.Test; /** * Test on the utility class {@code AssertionsOnChangeColumn} : the private constructor. @@ -40,8 +40,8 @@ public class AssertionsOnChangeColumn_Constructor_Test { */ @Test public void test_private_constructor_for_the_tests_coverage() - throws SecurityException, NoSuchMethodException, IllegalArgumentException, InstantiationException, - IllegalAccessException, InvocationTargetException { + throws SecurityException, NoSuchMethodException, IllegalArgumentException, InstantiationException, + IllegalAccessException, InvocationTargetException { Constructor constructor = AssertionsOnColumnOfChangeEquality.class.getDeclaredConstructor(); assertThat(Modifier.isPrivate(constructor.getModifiers())).isTrue(); diff --git a/src/test/java/org/assertj/db/util/AssertionsOnChange_Constructor_Test.java b/src/test/java/org/assertj/db/util/AssertionsOnChange_Constructor_Test.java index 863dbbd1..e955a4c4 100644 --- a/src/test/java/org/assertj/db/util/AssertionsOnChange_Constructor_Test.java +++ b/src/test/java/org/assertj/db/util/AssertionsOnChange_Constructor_Test.java @@ -8,18 +8,18 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.util; -import org.assertj.db.api.assertions.impl.AssertionsOnModifiedColumns; -import org.junit.Test; +import static org.assertj.core.api.Assertions.assertThat; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Modifier; -import static org.assertj.core.api.Assertions.assertThat; +import org.assertj.db.api.assertions.impl.AssertionsOnModifiedColumns; +import org.junit.Test; /** * Test on the utility class {@code AssertionsOnChange} : the private constructor. @@ -40,8 +40,8 @@ public class AssertionsOnChange_Constructor_Test { */ @Test public void test_private_constructor_for_the_tests_coverage() - throws SecurityException, NoSuchMethodException, IllegalArgumentException, InstantiationException, - IllegalAccessException, InvocationTargetException { + throws SecurityException, NoSuchMethodException, IllegalArgumentException, InstantiationException, + IllegalAccessException, InvocationTargetException { Constructor constructor = AssertionsOnModifiedColumns.class.getDeclaredConstructor(); assertThat(Modifier.isPrivate(constructor.getModifiers())).isTrue(); diff --git a/src/test/java/org/assertj/db/util/AssertionsOnChanges_Constructor_Test.java b/src/test/java/org/assertj/db/util/AssertionsOnChanges_Constructor_Test.java index 486319d3..dd3b9973 100644 --- a/src/test/java/org/assertj/db/util/AssertionsOnChanges_Constructor_Test.java +++ b/src/test/java/org/assertj/db/util/AssertionsOnChanges_Constructor_Test.java @@ -8,18 +8,18 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.util; -import org.assertj.db.api.assertions.impl.AssertionsOnNumberOfChanges; -import org.junit.Test; +import static org.assertj.core.api.Assertions.assertThat; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Modifier; -import static org.assertj.core.api.Assertions.assertThat; +import org.assertj.db.api.assertions.impl.AssertionsOnNumberOfChanges; +import org.junit.Test; /** * Test on the utility class {@code AssertionsOnChanges} : the private constructor. @@ -40,8 +40,8 @@ public class AssertionsOnChanges_Constructor_Test { */ @Test public void test_private_constructor_for_the_tests_coverage() - throws SecurityException, NoSuchMethodException, IllegalArgumentException, InstantiationException, - IllegalAccessException, InvocationTargetException { + throws SecurityException, NoSuchMethodException, IllegalArgumentException, InstantiationException, + IllegalAccessException, InvocationTargetException { Constructor constructor = AssertionsOnNumberOfChanges.class.getDeclaredConstructor(); assertThat(Modifier.isPrivate(constructor.getModifiers())).isTrue(); diff --git a/src/test/java/org/assertj/db/util/AssertionsOnColumn_Constructor_Test.java b/src/test/java/org/assertj/db/util/AssertionsOnColumn_Constructor_Test.java index 8bf53301..34ea1c17 100644 --- a/src/test/java/org/assertj/db/util/AssertionsOnColumn_Constructor_Test.java +++ b/src/test/java/org/assertj/db/util/AssertionsOnColumn_Constructor_Test.java @@ -8,18 +8,18 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.util; -import org.assertj.db.api.assertions.impl.AssertionsOnColumnEquality; -import org.junit.Test; +import static org.assertj.core.api.Assertions.assertThat; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Modifier; -import static org.assertj.core.api.Assertions.assertThat; +import org.assertj.db.api.assertions.impl.AssertionsOnColumnEquality; +import org.junit.Test; /** * Test on the utility class {@code AssertionsOnColumn} : the private constructor. @@ -40,8 +40,8 @@ public class AssertionsOnColumn_Constructor_Test { */ @Test public void test_private_constructor_for_the_tests_coverage() - throws SecurityException, NoSuchMethodException, IllegalArgumentException, InstantiationException, - IllegalAccessException, InvocationTargetException { + throws SecurityException, NoSuchMethodException, IllegalArgumentException, InstantiationException, + IllegalAccessException, InvocationTargetException { Constructor constructor = AssertionsOnColumnEquality.class.getDeclaredConstructor(); assertThat(Modifier.isPrivate(constructor.getModifiers())).isTrue(); diff --git a/src/test/java/org/assertj/db/util/AssertionsOnRow_Constructor_Test.java b/src/test/java/org/assertj/db/util/AssertionsOnRow_Constructor_Test.java index dfc9c5ba..0702d153 100644 --- a/src/test/java/org/assertj/db/util/AssertionsOnRow_Constructor_Test.java +++ b/src/test/java/org/assertj/db/util/AssertionsOnRow_Constructor_Test.java @@ -8,18 +8,18 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.util; -import org.assertj.db.api.assertions.impl.AssertionsOnRowEquality; -import org.junit.Test; +import static org.assertj.core.api.Assertions.assertThat; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Modifier; -import static org.assertj.core.api.Assertions.assertThat; +import org.assertj.db.api.assertions.impl.AssertionsOnRowEquality; +import org.junit.Test; /** * Test on the utility class {@code AssertionsOnRow} : the private constructor. @@ -40,8 +40,8 @@ public class AssertionsOnRow_Constructor_Test { */ @Test public void test_private_constructor_for_the_tests_coverage() - throws SecurityException, NoSuchMethodException, IllegalArgumentException, InstantiationException, - IllegalAccessException, InvocationTargetException { + throws SecurityException, NoSuchMethodException, IllegalArgumentException, InstantiationException, + IllegalAccessException, InvocationTargetException { Constructor constructor = AssertionsOnRowEquality.class.getDeclaredConstructor(); assertThat(Modifier.isPrivate(constructor.getModifiers())).isTrue(); diff --git a/src/test/java/org/assertj/db/util/AssertionsOnValue_Constructor_Test.java b/src/test/java/org/assertj/db/util/AssertionsOnValue_Constructor_Test.java index 3b831351..17247ce6 100644 --- a/src/test/java/org/assertj/db/util/AssertionsOnValue_Constructor_Test.java +++ b/src/test/java/org/assertj/db/util/AssertionsOnValue_Constructor_Test.java @@ -8,18 +8,18 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.util; -import org.assertj.db.api.assertions.impl.AssertionsOnValueComparison; -import org.junit.Test; +import static org.assertj.core.api.Assertions.assertThat; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Modifier; -import static org.assertj.core.api.Assertions.assertThat; +import org.assertj.db.api.assertions.impl.AssertionsOnValueComparison; +import org.junit.Test; /** * Test on the utility class {@code AssertionsOnValue} : the private constructor. @@ -40,8 +40,8 @@ public class AssertionsOnValue_Constructor_Test { */ @Test public void test_private_constructor_for_the_tests_coverage() - throws SecurityException, NoSuchMethodException, IllegalArgumentException, InstantiationException, - IllegalAccessException, InvocationTargetException { + throws SecurityException, NoSuchMethodException, IllegalArgumentException, InstantiationException, + IllegalAccessException, InvocationTargetException { Constructor constructor = AssertionsOnValueComparison.class.getDeclaredConstructor(); assertThat(Modifier.isPrivate(constructor.getModifiers())).isTrue(); diff --git a/src/test/java/org/assertj/db/util/ChangeComparator_Test.java b/src/test/java/org/assertj/db/util/ChangeComparator_Test.java index 8d5024ae..2730e2e5 100644 --- a/src/test/java/org/assertj/db/util/ChangeComparator_Test.java +++ b/src/test/java/org/assertj/db/util/ChangeComparator_Test.java @@ -8,17 +8,17 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.util; -import org.assertj.db.common.AbstractTest; -import org.assertj.db.type.Row; -import org.junit.Test; +import static org.assertj.core.api.Assertions.assertThat; import java.util.Arrays; -import static org.assertj.core.api.Assertions.assertThat; +import org.assertj.db.common.AbstractTest; +import org.assertj.db.type.Row; +import org.junit.Test; /** * Tests on the comparator for {@code Change} @@ -44,31 +44,31 @@ public class ChangeComparator_Test extends AbstractTest { static { try { ROW_ID_PK_1_TEST = getRow(Arrays.asList("id"), Arrays.asList("id", "name"), Arrays.asList(getValue(null, 1), getValue( - null, "test"))); + null, "test"))); ROW_ID_PK_1_TEST1 = getRow(Arrays.asList("id"), Arrays.asList("id", "name"), Arrays.asList(getValue(null, 1), getValue( - null, "test1"))); + null, "test1"))); ROW_ID_PK_1_TEST2 = getRow(Arrays.asList("id"), Arrays.asList("id", "name"), Arrays.asList(getValue(null, 1), getValue( - null, "test2"))); + null, "test2"))); ROW_ID_PK_2_TEST1 = getRow(Arrays.asList("id"), Arrays.asList("id", "name"), Arrays.asList(getValue(null, 2), getValue( - null, "test1"))); + null, "test1"))); ROW_ID_PK_2_TEST2 = getRow(Arrays.asList("id"), Arrays.asList("id", "name"), Arrays.asList(getValue(null, 2), getValue( - null, "test2"))); + null, "test2"))); ROW_NAME_PK_1_TEST1 = getRow(Arrays.asList("name"), Arrays.asList("id", "name"), Arrays.asList(getValue(null, 1), getValue( - null, "test1"))); + null, "test1"))); ROW_NAME_PK_1_TEST2 = getRow(Arrays.asList("name"), Arrays.asList("id", "name"), Arrays.asList(getValue(null, 1), getValue( - null, "test2"))); + null, "test2"))); ROW_NAME_PK_1_NULL = getRow(Arrays.asList("name"), Arrays.asList("id", "name"), Arrays.asList(getValue(null, 1), getValue( - null, null))); + null, null))); ROW_NAME_PK_1_BYTES_0 = getRow(Arrays.asList("name"), Arrays.asList("id", "name"), - Arrays.asList(getValue(null, 1), getValue(null, new byte[] { 0 }))); + Arrays.asList(getValue(null, 1), getValue(null, new byte[]{0}))); ROW_NAME_PK_1_BYTES_1 = getRow(Arrays.asList("name"), Arrays.asList("id", "name"), - Arrays.asList(getValue(null, 1), getValue(null, new byte[] { 1 }))); + Arrays.asList(getValue(null, 1), getValue(null, new byte[]{1}))); ROW_NAME_PK_2_TEST1 = getRow(Arrays.asList("name"), Arrays.asList("id", "name"), Arrays.asList(getValue(null, 2), getValue( - null, "test1"))); + null, "test1"))); ROW_NAME_PK_2_TEST2 = getRow(Arrays.asList("name"), Arrays.asList("id", "name"), Arrays.asList(getValue(null, 2), getValue( - null, "test2"))); - ROW_NAME_PK_2_NULL = getRow(Arrays.asList("name"), Arrays.asList("id", "name"), Arrays.asList(getValue(null, 2),getValue( - null, null))); + null, "test2"))); + ROW_NAME_PK_2_NULL = getRow(Arrays.asList("name"), Arrays.asList("id", "name"), Arrays.asList(getValue(null, 2), getValue( + null, null))); } catch (Exception e) { throw new ExceptionInInitializerError(e); } @@ -91,7 +91,7 @@ public void test_valueOf() { @Test public void test_compareTo_zero_because_the_change_are_equals_with_id_as_pk() throws Exception { assertThat(ChangeComparator.INSTANCE.compare(getTableCreationChange("table", ROW_ID_PK_1_TEST1), - getTableCreationChange("table", ROW_ID_PK_1_TEST1))).isEqualTo(0); + getTableCreationChange("table", ROW_ID_PK_1_TEST1))).isEqualTo(0); } /** @@ -103,7 +103,7 @@ public void test_compareTo_zero_because_the_change_are_equals_with_id_as_pk() th @Test public void test_compareTo_zero_because_the_change_are_equals_with_name_as_pk() throws Exception { assertThat(ChangeComparator.INSTANCE.compare(getTableCreationChange("table", ROW_NAME_PK_1_TEST1), - getTableCreationChange("table", ROW_NAME_PK_1_TEST1))).isEqualTo(0); + getTableCreationChange("table", ROW_NAME_PK_1_TEST1))).isEqualTo(0); } /** @@ -115,7 +115,7 @@ public void test_compareTo_zero_because_the_change_are_equals_with_name_as_pk() @Test public void test_compareTo_zero_because_the_change_are_equals_with_name_as_pk_null() throws Exception { assertThat(ChangeComparator.INSTANCE.compare(getTableCreationChange("table", ROW_NAME_PK_1_NULL), - getTableCreationChange("table", ROW_NAME_PK_1_NULL))).isEqualTo(0); + getTableCreationChange("table", ROW_NAME_PK_1_NULL))).isEqualTo(0); } @@ -128,12 +128,12 @@ public void test_compareTo_zero_because_the_change_are_equals_with_name_as_pk_nu @Test public void test_compareTo_zero_because_() throws Exception { assertThat(ChangeComparator.INSTANCE.compare(getTableCreationChange("table", getRow(Arrays.asList("id", "name"), - Arrays.asList("id", "name", - "plus"), - Arrays.asList(getValue(null, 1), getValue( - null, "test1"), getValue( - null, null)))), - getTableCreationChange("table", ROW_NAME_PK_1_TEST2))).isEqualTo(0); + Arrays.asList("id", "name", + "plus"), + Arrays.asList(getValue(null, 1), getValue( + null, "test1"), getValue( + null, null)))), + getTableCreationChange("table", ROW_NAME_PK_1_TEST2))).isEqualTo(0); } /** @@ -145,7 +145,7 @@ public void test_compareTo_zero_because_() throws Exception { @Test public void test_compareTo_zero_because_the_change_are_equals_dont_care_of_differences_with_bytes() throws Exception { assertThat(ChangeComparator.INSTANCE.compare(getTableCreationChange("table", ROW_NAME_PK_1_BYTES_0), - getTableCreationChange("table", ROW_NAME_PK_1_BYTES_1))).isEqualTo(0); + getTableCreationChange("table", ROW_NAME_PK_1_BYTES_1))).isEqualTo(0); } /** @@ -157,7 +157,7 @@ public void test_compareTo_zero_because_the_change_are_equals_dont_care_of_diffe @Test public void test_compareTo_zero_because_the_change_are_equals_dont_care_of_differences_with_bytes_2() throws Exception { assertThat(ChangeComparator.INSTANCE.compare(getTableCreationChange("table", ROW_NAME_PK_1_BYTES_0), - getTableCreationChange("table", ROW_ID_PK_1_TEST))).isEqualTo(0); + getTableCreationChange("table", ROW_ID_PK_1_TEST))).isEqualTo(0); } /** @@ -169,7 +169,7 @@ public void test_compareTo_zero_because_the_change_are_equals_dont_care_of_diffe @Test public void test_compareTo_zero_because_the_change_are_equals_dont_care_of_differences_with_bytes_3() throws Exception { assertThat(ChangeComparator.INSTANCE.compare(getTableCreationChange("table", ROW_ID_PK_1_TEST), - getTableCreationChange("table", ROW_NAME_PK_1_BYTES_1))).isEqualTo(0); + getTableCreationChange("table", ROW_NAME_PK_1_BYTES_1))).isEqualTo(0); } /** @@ -181,7 +181,7 @@ public void test_compareTo_zero_because_the_change_are_equals_dont_care_of_diffe @Test public void test_compareTo_negative_because_pk_is_id() throws Exception { assertThat(ChangeComparator.INSTANCE.compare(getTableCreationChange("table", ROW_ID_PK_1_TEST1), - getTableCreationChange("table", ROW_ID_PK_2_TEST1))).isEqualTo(-1); + getTableCreationChange("table", ROW_ID_PK_2_TEST1))).isEqualTo(-1); } /** @@ -193,7 +193,7 @@ public void test_compareTo_negative_because_pk_is_id() throws Exception { @Test public void test_compareTo_negative_because_pk_is_id_2() throws Exception { assertThat(ChangeComparator.INSTANCE.compare(getTableCreationChange("table", ROW_ID_PK_1_TEST1), - getTableCreationChange("table", ROW_ID_PK_2_TEST2))).isEqualTo(-1); + getTableCreationChange("table", ROW_ID_PK_2_TEST2))).isEqualTo(-1); } /** @@ -205,7 +205,7 @@ public void test_compareTo_negative_because_pk_is_id_2() throws Exception { @Test public void test_compareTo_negative_because_pk_is_name() throws Exception { assertThat(ChangeComparator.INSTANCE.compare(getTableCreationChange("table", ROW_NAME_PK_1_TEST1), - getTableCreationChange("table", ROW_NAME_PK_2_TEST2))).isEqualTo(-1); + getTableCreationChange("table", ROW_NAME_PK_2_TEST2))).isEqualTo(-1); } /** @@ -217,7 +217,7 @@ public void test_compareTo_negative_because_pk_is_name() throws Exception { @Test public void test_compareTo_negative_because_pk_is_name_2() throws Exception { assertThat(ChangeComparator.INSTANCE.compare(getTableCreationChange("table", ROW_NAME_PK_1_TEST1), - getTableCreationChange("table", ROW_NAME_PK_2_TEST1))).isEqualTo(-1); + getTableCreationChange("table", ROW_NAME_PK_2_TEST1))).isEqualTo(-1); } /** @@ -229,7 +229,7 @@ public void test_compareTo_negative_because_pk_is_name_2() throws Exception { @Test public void test_compareTo_negative_because_pk_is_name_3() throws Exception { assertThat(ChangeComparator.INSTANCE.compare(getTableCreationChange("table", ROW_NAME_PK_1_TEST2), - getTableCreationChange("table", ROW_NAME_PK_2_NULL))).isEqualTo(-1); + getTableCreationChange("table", ROW_NAME_PK_2_NULL))).isEqualTo(-1); } /** @@ -241,7 +241,7 @@ public void test_compareTo_negative_because_pk_is_name_3() throws Exception { @Test public void test_compareTo_negative_because_table_name() throws Exception { assertThat(ChangeComparator.INSTANCE.compare(getTableCreationChange("table1", ROW_NAME_PK_1_NULL), - getTableCreationChange("table2", ROW_NAME_PK_1_NULL))).isEqualTo(-1); + getTableCreationChange("table2", ROW_NAME_PK_1_NULL))).isEqualTo(-1); } /** @@ -253,7 +253,7 @@ public void test_compareTo_negative_because_table_name() throws Exception { @Test public void test_compareTo_negative_because_pk_are_equals_but_name_is_different() throws Exception { assertThat(ChangeComparator.INSTANCE.compare(getTableCreationChange("table", ROW_ID_PK_1_TEST1), - getTableCreationChange("table", ROW_ID_PK_1_TEST2))).isEqualTo(-1); + getTableCreationChange("table", ROW_ID_PK_1_TEST2))).isEqualTo(-1); } /** @@ -265,7 +265,7 @@ public void test_compareTo_negative_because_pk_are_equals_but_name_is_different( @Test public void test_compareTo_positive_because_pk_is_id() throws Exception { assertThat(ChangeComparator.INSTANCE.compare(getTableCreationChange("table", ROW_ID_PK_2_TEST1), - getTableCreationChange("table", ROW_ID_PK_1_TEST2))).isEqualTo(1); + getTableCreationChange("table", ROW_ID_PK_1_TEST2))).isEqualTo(1); } /** @@ -277,7 +277,7 @@ public void test_compareTo_positive_because_pk_is_id() throws Exception { @Test public void test_compareTo_positive_because_pk_is_id_2() throws Exception { assertThat(ChangeComparator.INSTANCE.compare(getTableCreationChange("table", ROW_NAME_PK_1_TEST2), - getTableCreationChange("table", ROW_NAME_PK_2_TEST1))).isEqualTo(1); + getTableCreationChange("table", ROW_NAME_PK_2_TEST1))).isEqualTo(1); } /** @@ -289,7 +289,7 @@ public void test_compareTo_positive_because_pk_is_id_2() throws Exception { @Test public void test_compareTo_positive_because_pk_is_name() throws Exception { assertThat(ChangeComparator.INSTANCE.compare(getTableCreationChange("table", ROW_NAME_PK_1_NULL), - getTableCreationChange("table", ROW_NAME_PK_2_TEST1))).isEqualTo(1); + getTableCreationChange("table", ROW_NAME_PK_2_TEST1))).isEqualTo(1); } /** @@ -301,7 +301,7 @@ public void test_compareTo_positive_because_pk_is_name() throws Exception { @Test public void test_compareTo_positive_because_pk_is_name_2() throws Exception { assertThat(ChangeComparator.INSTANCE.compare(getTableDeletionChange("table", ROW_NAME_PK_1_NULL), - getTableDeletionChange("table", ROW_NAME_PK_2_TEST1))).isEqualTo(1); + getTableDeletionChange("table", ROW_NAME_PK_2_TEST1))).isEqualTo(1); } /** @@ -313,7 +313,7 @@ public void test_compareTo_positive_because_pk_is_name_2() throws Exception { @Test public void test_compareTo_positive_because_table_name() throws Exception { assertThat(ChangeComparator.INSTANCE.compare(getTableCreationChange("table2", ROW_NAME_PK_1_NULL), - getTableCreationChange("table1", ROW_NAME_PK_1_NULL))).isEqualTo(1); + getTableCreationChange("table1", ROW_NAME_PK_1_NULL))).isEqualTo(1); } /** @@ -325,7 +325,7 @@ public void test_compareTo_positive_because_table_name() throws Exception { @Test public void test_compareTo_less_than_zero() throws Exception { assertThat(ChangeComparator.INSTANCE.compare(getTableCreationChange("table", ROW_ID_PK_1_TEST), - getTableDeletionChange("table", ROW_ID_PK_1_TEST))).isLessThan(0); + getTableDeletionChange("table", ROW_ID_PK_1_TEST))).isLessThan(0); } /** @@ -337,7 +337,7 @@ public void test_compareTo_less_than_zero() throws Exception { @Test public void test_compareTo_greater_than_zero() throws Exception { assertThat(ChangeComparator.INSTANCE.compare(getTableDeletionChange("table", ROW_ID_PK_1_TEST), - getTableModificationChange("table", ROW_ID_PK_1_TEST, - ROW_ID_PK_1_TEST))).isGreaterThan(0); + getTableModificationChange("table", ROW_ID_PK_1_TEST, + ROW_ID_PK_1_TEST))).isGreaterThan(0); } } diff --git a/src/test/java/org/assertj/db/util/Changes_Constructor_Test.java b/src/test/java/org/assertj/db/util/Changes_Constructor_Test.java index e1b12f44..1de5b826 100644 --- a/src/test/java/org/assertj/db/util/Changes_Constructor_Test.java +++ b/src/test/java/org/assertj/db/util/Changes_Constructor_Test.java @@ -8,17 +8,17 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.util; -import org.junit.Test; +import static org.assertj.core.api.Assertions.assertThat; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Modifier; -import static org.assertj.core.api.Assertions.assertThat; +import org.junit.Test; /** * Test on the utility class {@code Changes} : the private constructor. @@ -39,8 +39,8 @@ public class Changes_Constructor_Test { */ @Test public void test_private_constructor_for_the_tests_coverage() - throws SecurityException, NoSuchMethodException, IllegalArgumentException, InstantiationException, - IllegalAccessException, InvocationTargetException { + throws SecurityException, NoSuchMethodException, IllegalArgumentException, InstantiationException, + IllegalAccessException, InvocationTargetException { Constructor constructor = Changes.class.getDeclaredConstructor(); assertThat(Modifier.isPrivate(constructor.getModifiers())).isTrue(); constructor.setAccessible(true); diff --git a/src/test/java/org/assertj/db/util/Changes_GetIndexesOfModifiedColumns_Test.java b/src/test/java/org/assertj/db/util/Changes_GetIndexesOfModifiedColumns_Test.java index af1b54da..39236dc7 100644 --- a/src/test/java/org/assertj/db/util/Changes_GetIndexesOfModifiedColumns_Test.java +++ b/src/test/java/org/assertj/db/util/Changes_GetIndexesOfModifiedColumns_Test.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.util; @@ -25,7 +25,6 @@ * Tests on {@code getIndexesOfModifiedColumns} method. * * @author Régis Pouiller - * */ public class Changes_GetIndexesOfModifiedColumns_Test extends AbstractTest { @@ -34,35 +33,35 @@ public class Changes_GetIndexesOfModifiedColumns_Test extends AbstractTest { */ @Test public void test_get_indexes_of_modified_columns() throws Exception { - Change creationChange = getChange(DataType.TABLE, "test", ChangeType.CREATION, - null, - getRow(Arrays.asList("var1"), - Arrays.asList("var1", "var2", "var3"), - Arrays.asList(getValue("var1", 1), - getValue("var2", "test"), - getValue("var3", null)))); + Change creationChange = getChange(DataType.TABLE, "test", ChangeType.CREATION, + null, + getRow(Arrays.asList("var1"), + Arrays.asList("var1", "var2", "var3"), + Arrays.asList(getValue("var1", 1), + getValue("var2", "test"), + getValue("var3", null)))); - Change modificationChange = getChange(DataType.TABLE, "test", ChangeType.MODIFICATION, - getRow(Arrays.asList("var1"), - Arrays.asList("var1", "var2", "var3", "var4"), - Arrays.asList(getValue("var1", 1), - getValue("var2", null), - getValue("var3", "text1"), - getValue("var4", null))), - getRow(Arrays.asList("var1"), - Arrays.asList("var1", "var2", "var3", "var4"), - Arrays.asList(getValue("var1", 1), - getValue("var2", "test"), - getValue("var3", null), - getValue("var4", null)))); + Change modificationChange = getChange(DataType.TABLE, "test", ChangeType.MODIFICATION, + getRow(Arrays.asList("var1"), + Arrays.asList("var1", "var2", "var3", "var4"), + Arrays.asList(getValue("var1", 1), + getValue("var2", null), + getValue("var3", "text1"), + getValue("var4", null))), + getRow(Arrays.asList("var1"), + Arrays.asList("var1", "var2", "var3", "var4"), + Arrays.asList(getValue("var1", 1), + getValue("var2", "test"), + getValue("var3", null), + getValue("var4", null)))); - Change deletionChange = getChange(DataType.TABLE, "test", ChangeType.DELETION, - getRow(Arrays.asList("var1"), - Arrays.asList("var1", "var2", "var3"), - Arrays.asList(getValue("var1", 1), - getValue("var2", "test1"), - getValue("var3", null))), - null); + Change deletionChange = getChange(DataType.TABLE, "test", ChangeType.DELETION, + getRow(Arrays.asList("var1"), + Arrays.asList("var1", "var2", "var3"), + Arrays.asList(getValue("var1", 1), + getValue("var2", "test1"), + getValue("var3", null))), + null); Integer[] creationIndexes = Changes.getIndexesOfModifiedColumns(creationChange); Integer[] modificationIndexes = Changes.getIndexesOfModifiedColumns(modificationChange); diff --git a/src/test/java/org/assertj/db/util/Descriptions_Constructor_Test.java b/src/test/java/org/assertj/db/util/Descriptions_Constructor_Test.java index 2a0f5700..fef52e81 100644 --- a/src/test/java/org/assertj/db/util/Descriptions_Constructor_Test.java +++ b/src/test/java/org/assertj/db/util/Descriptions_Constructor_Test.java @@ -8,17 +8,17 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.util; -import org.junit.Test; +import static org.assertj.core.api.Assertions.assertThat; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Modifier; -import static org.assertj.core.api.Assertions.assertThat; +import org.junit.Test; /** * Test on the utility class {@code Descriptions} : the private constructor. @@ -39,8 +39,8 @@ public class Descriptions_Constructor_Test { */ @Test public void test_private_constructor_for_the_tests_coverage() - throws SecurityException, NoSuchMethodException, IllegalArgumentException, InstantiationException, - IllegalAccessException, InvocationTargetException { + throws SecurityException, NoSuchMethodException, IllegalArgumentException, InstantiationException, + IllegalAccessException, InvocationTargetException { Constructor constructor = Descriptions.class.getDeclaredConstructor(); assertThat(Modifier.isPrivate(constructor.getModifiers())).isTrue(); constructor.setAccessible(true); diff --git a/src/test/java/org/assertj/db/util/Descriptions_GetDescription_Test.java b/src/test/java/org/assertj/db/util/Descriptions_GetDescription_Test.java index eb514e0e..33afcb1a 100644 --- a/src/test/java/org/assertj/db/util/Descriptions_GetDescription_Test.java +++ b/src/test/java/org/assertj/db/util/Descriptions_GetDescription_Test.java @@ -8,10 +8,12 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.util; +import static org.assertj.core.api.Assertions.assertThat; + import org.assertj.core.api.WritableAssertionInfo; import org.assertj.db.common.AbstractTest; import org.assertj.db.common.NeedReload; @@ -20,8 +22,6 @@ import org.assertj.db.type.Table; import org.junit.Test; -import static org.assertj.core.api.Assertions.assertThat; - /** * Tests on {@code getDescription} method from utility class {@code Descriptions}. * @@ -91,9 +91,9 @@ public void test_get_description_for_changes() { @NeedReload public void test_get_description_for_changes_from_table() { org.assertj.db.type.Changes fromSource = new org.assertj.db.type.Changes(new Table(source, "actor")) - .setStartPointNow(); + .setStartPointNow(); org.assertj.db.type.Changes fromDataSource = new org.assertj.db.type.Changes(new Table(dataSource, "actor")) - .setStartPointNow(); + .setStartPointNow(); updateChangesForTests(); fromSource.setEndPointNow(); fromDataSource.setEndPointNow(); @@ -112,13 +112,13 @@ public void test_get_description_for_changes_from_table() { @NeedReload public void test_get_description_for_changes_from_request() { org.assertj.db.type.Changes fromSource = new org.assertj.db.type.Changes(new Request(source, "select * from actor")) - .setStartPointNow(); + .setStartPointNow(); org.assertj.db.type.Changes fromDataSource = new org.assertj.db.type.Changes( - new Request(dataSource, "select * from actor")).setStartPointNow(); + new Request(dataSource, "select * from actor")).setStartPointNow(); org.assertj.db.type.Changes fromSourceLong = new org.assertj.db.type.Changes( - new Request(source, "select id, name, firstname, birth, actor_imdb from actor")).setStartPointNow(); + new Request(source, "select id, name, firstname, birth, actor_imdb from actor")).setStartPointNow(); org.assertj.db.type.Changes fromDataSourceLong = new org.assertj.db.type.Changes( - new Request(dataSource, "select id, name, firstname, birth, actor_imdb from actor")).setStartPointNow(); + new Request(dataSource, "select id, name, firstname, birth, actor_imdb from actor")).setStartPointNow(); updateChangesForTests(); fromSource.setEndPointNow(); fromDataSource.setEndPointNow(); @@ -261,9 +261,9 @@ public void test_get_description_for_changes_from_changes() { @NeedReload public void test_get_description_for_change_from_changes_from_table() { org.assertj.db.type.Changes fromSource = new org.assertj.db.type.Changes(new Table(source, "actor")) - .setStartPointNow(); + .setStartPointNow(); org.assertj.db.type.Changes fromDataSource = new org.assertj.db.type.Changes(new Table(dataSource, "actor")) - .setStartPointNow(); + .setStartPointNow(); updateChangesForTests(); fromSource.setEndPointNow(); fromDataSource.setEndPointNow(); @@ -297,13 +297,13 @@ public void test_get_description_for_change_from_changes_from_table() { @NeedReload public void test_get_description_for_change_from_changes_from_request() { org.assertj.db.type.Changes fromSource = new org.assertj.db.type.Changes(new Request(source, "select * from actor")) - .setStartPointNow(); + .setStartPointNow(); org.assertj.db.type.Changes fromDataSource = new org.assertj.db.type.Changes( - new Request(dataSource, "select * from actor")).setStartPointNow(); + new Request(dataSource, "select * from actor")).setStartPointNow(); org.assertj.db.type.Changes fromSourceLong = new org.assertj.db.type.Changes( - new Request(source, "select id, name, firstname, birth, actor_imdb from actor")).setStartPointNow(); + new Request(source, "select id, name, firstname, birth, actor_imdb from actor")).setStartPointNow(); org.assertj.db.type.Changes fromDataSourceLong = new org.assertj.db.type.Changes( - new Request(dataSource, "select id, name, firstname, birth, actor_imdb from actor")).setStartPointNow(); + new Request(dataSource, "select id, name, firstname, birth, actor_imdb from actor")).setStartPointNow(); updateChangesForTests(); fromSource.setEndPointNow(); fromDataSource.setEndPointNow(); diff --git a/src/test/java/org/assertj/db/util/NameComparator_Test.java b/src/test/java/org/assertj/db/util/NameComparator_Test.java index aa051c6d..f7843cc9 100644 --- a/src/test/java/org/assertj/db/util/NameComparator_Test.java +++ b/src/test/java/org/assertj/db/util/NameComparator_Test.java @@ -8,23 +8,22 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.util; -import org.assertj.db.common.AbstractTest; -import org.assertj.db.type.lettercase.CaseComparisons; -import org.junit.Test; +import static org.assertj.core.api.Assertions.assertThat; import java.util.Arrays; -import static org.assertj.core.api.Assertions.assertThat; +import org.assertj.db.common.AbstractTest; +import org.assertj.db.type.lettercase.CaseComparisons; +import org.junit.Test; /** * Tests on the comparator for the names. * * @author Régis Pouiller - * */ public class NameComparator_Test extends AbstractTest { diff --git a/src/test/java/org/assertj/db/util/Proxies_Test.java b/src/test/java/org/assertj/db/util/Proxies_Test.java index d0efe7b6..07557812 100644 --- a/src/test/java/org/assertj/db/util/Proxies_Test.java +++ b/src/test/java/org/assertj/db/util/Proxies_Test.java @@ -8,14 +8,15 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.util; -import net.bytebuddy.ByteBuddy; +import static org.assertj.core.api.Assertions.assertThat; + import org.junit.Test; -import static org.assertj.core.api.Assertions.assertThat; +import net.bytebuddy.ByteBuddy; /** * Test for Proxies utility class. @@ -29,7 +30,7 @@ public class Proxies_Test { */ @Test public void test_is_proxy_with_classic_class() { - assertThat(Proxies.isProxified(String.class)).isFalse(); + assertThat(Proxies.isProxied(String.class)).isFalse(); } /** @@ -38,11 +39,11 @@ public void test_is_proxy_with_classic_class() { @Test public void test_is_proxy_with_enhanced_class() { Class enhancedClass = new ByteBuddy() - .subclass(ClassForProxiesTest.class) - .make() - .load(ClassForProxiesTest.class.getClassLoader()) - .getLoaded(); - assertThat(Proxies.isProxified(enhancedClass)).isTrue(); + .subclass(ClassForProxiesTest.class) + .make() + .load(ClassForProxiesTest.class.getClassLoader()) + .getLoaded(); + assertThat(Proxies.isProxied(enhancedClass)).isTrue(); } /** @@ -59,10 +60,10 @@ public void test_unproxy_with_classic_class() { @Test public void test_unproxy_with_enhanced_class() { Class enhancedClass = new ByteBuddy() - .subclass(ClassForProxiesTest.class) - .make() - .load(ClassForProxiesTest.class.getClassLoader()) - .getLoaded(); + .subclass(ClassForProxiesTest.class) + .make() + .load(ClassForProxiesTest.class.getClassLoader()) + .getLoaded(); assertThat(Proxies.unProxy(enhancedClass)).isEqualTo(ClassForProxiesTest.class); } diff --git a/src/test/java/org/assertj/db/util/RowComparator_Test.java b/src/test/java/org/assertj/db/util/RowComparator_Test.java index 0fb22205..a92d34fe 100644 --- a/src/test/java/org/assertj/db/util/RowComparator_Test.java +++ b/src/test/java/org/assertj/db/util/RowComparator_Test.java @@ -8,22 +8,21 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.util; -import org.assertj.db.common.AbstractTest; -import org.junit.Test; +import static org.assertj.core.api.Assertions.assertThat; import java.util.Arrays; -import static org.assertj.core.api.Assertions.assertThat; +import org.assertj.db.common.AbstractTest; +import org.junit.Test; /** * Tests on the comparator for {@code Row} - * + * * @author Régis Pouiller - * */ public class RowComparator_Test extends AbstractTest { @@ -37,105 +36,105 @@ public void test_valueOf() { /** * Test the {@code compareTo} method. - * + * * @throws Exception Exception */ @Test public void test_compareTo() throws Exception { assertThat( - RowComparator.INSTANCE.compare( - getRow(Arrays.asList("id"), Arrays.asList("id", "name"), Arrays.asList(getValue(null, 1), getValue(null, - "test1"))), - getRow(Arrays.asList("id"), Arrays.asList("id", "name"), Arrays.asList(getValue(null, 2), getValue(null, - "test2"))))).isEqualTo( - -1); + RowComparator.INSTANCE.compare( + getRow(Arrays.asList("id"), Arrays.asList("id", "name"), Arrays.asList(getValue(null, 1), getValue(null, + "test1"))), + getRow(Arrays.asList("id"), Arrays.asList("id", "name"), Arrays.asList(getValue(null, 2), getValue(null, + "test2"))))).isEqualTo( + -1); assertThat( - RowComparator.INSTANCE.compare( - getRow(Arrays.asList("id"), Arrays.asList("id", "name"), Arrays.asList(getValue(null, 1), getValue(null, - "test1"))), - getRow(Arrays.asList("id"), Arrays.asList("id", "name"), Arrays.asList(getValue(null, 1), getValue(null, - "test2"))))).isEqualTo( - -1); + RowComparator.INSTANCE.compare( + getRow(Arrays.asList("id"), Arrays.asList("id", "name"), Arrays.asList(getValue(null, 1), getValue(null, + "test1"))), + getRow(Arrays.asList("id"), Arrays.asList("id", "name"), Arrays.asList(getValue(null, 1), getValue(null, + "test2"))))).isEqualTo( + -1); assertThat( - RowComparator.INSTANCE.compare( - getRow(Arrays.asList("id"), Arrays.asList("id", "name"), Arrays.asList(getValue(null, 1), getValue(null, - "test1"))), - getRow(Arrays.asList("id"), Arrays.asList("id", "name"), Arrays.asList(getValue(null, 1), getValue(null, - "test1"))))).isEqualTo( - 0); + RowComparator.INSTANCE.compare( + getRow(Arrays.asList("id"), Arrays.asList("id", "name"), Arrays.asList(getValue(null, 1), getValue(null, + "test1"))), + getRow(Arrays.asList("id"), Arrays.asList("id", "name"), Arrays.asList(getValue(null, 1), getValue(null, + "test1"))))).isEqualTo( + 0); assertThat( - RowComparator.INSTANCE.compare( - getRow(Arrays.asList("id"), Arrays.asList("id", "name"), Arrays.asList(getValue(null, 2), getValue(null, - "test1"))), - getRow(Arrays.asList("id"), Arrays.asList("id", "name"), Arrays.asList(getValue(null, 1), getValue(null, - "test2"))))).isEqualTo(1); + RowComparator.INSTANCE.compare( + getRow(Arrays.asList("id"), Arrays.asList("id", "name"), Arrays.asList(getValue(null, 2), getValue(null, + "test1"))), + getRow(Arrays.asList("id"), Arrays.asList("id", "name"), Arrays.asList(getValue(null, 1), getValue(null, + "test2"))))).isEqualTo(1); assertThat( - RowComparator.INSTANCE.compare( - getRow(Arrays.asList("name"), Arrays.asList("id", "name"), Arrays.asList(getValue(null, 1), getValue(null, - "test1"))), - getRow(Arrays.asList("name"), Arrays.asList("id", "name"), Arrays.asList(getValue(null, 2), getValue(null, - "test2"))))).isEqualTo(-1); + RowComparator.INSTANCE.compare( + getRow(Arrays.asList("name"), Arrays.asList("id", "name"), Arrays.asList(getValue(null, 1), getValue(null, + "test1"))), + getRow(Arrays.asList("name"), Arrays.asList("id", "name"), Arrays.asList(getValue(null, 2), getValue(null, + "test2"))))).isEqualTo(-1); assertThat( - RowComparator.INSTANCE.compare( - getRow(Arrays.asList("name"), Arrays.asList("id", "name"), Arrays.asList(getValue(null, 1), getValue(null, - "test1"))), - getRow(Arrays.asList("name"), Arrays.asList("id", "name"), Arrays.asList(getValue(null, 2), getValue(null, - "test1"))))).isEqualTo(-1); + RowComparator.INSTANCE.compare( + getRow(Arrays.asList("name"), Arrays.asList("id", "name"), Arrays.asList(getValue(null, 1), getValue(null, + "test1"))), + getRow(Arrays.asList("name"), Arrays.asList("id", "name"), Arrays.asList(getValue(null, 2), getValue(null, + "test1"))))).isEqualTo(-1); assertThat( - RowComparator.INSTANCE.compare( - getRow(Arrays.asList("name"), Arrays.asList("id", "name"), Arrays.asList(getValue(null, 1), getValue(null, - "test1"))), - getRow(Arrays.asList("name"), Arrays.asList("id", "name"), Arrays.asList(getValue(null, 1), getValue(null, - "test1"))))).isEqualTo(0); + RowComparator.INSTANCE.compare( + getRow(Arrays.asList("name"), Arrays.asList("id", "name"), Arrays.asList(getValue(null, 1), getValue(null, + "test1"))), + getRow(Arrays.asList("name"), Arrays.asList("id", "name"), Arrays.asList(getValue(null, 1), getValue(null, + "test1"))))).isEqualTo(0); assertThat( - RowComparator.INSTANCE.compare( - getRow(Arrays.asList("name"), Arrays.asList("id", "name"), Arrays.asList(getValue(null, 1), getValue(null, - "test2"))), - getRow(Arrays.asList("name"), Arrays.asList("id", "name"), Arrays.asList(getValue(null, 2), getValue(null, - "test1"))))).isEqualTo(1); + RowComparator.INSTANCE.compare( + getRow(Arrays.asList("name"), Arrays.asList("id", "name"), Arrays.asList(getValue(null, 1), getValue(null, + "test2"))), + getRow(Arrays.asList("name"), Arrays.asList("id", "name"), Arrays.asList(getValue(null, 2), getValue(null, + "test1"))))).isEqualTo(1); assertThat( - RowComparator.INSTANCE.compare( - getRow(Arrays.asList("id", "name"), Arrays.asList("id", "name", "plus"), Arrays.asList(getValue(null, 1), getValue( - null, "test1"), getValue(null, null))), - getRow(Arrays.asList("id"), Arrays.asList("id", "name"), Arrays.asList(getValue(null, 2), getValue(null, - "test2"))))).isEqualTo(0); + RowComparator.INSTANCE.compare( + getRow(Arrays.asList("id", "name"), Arrays.asList("id", "name", "plus"), Arrays.asList(getValue(null, 1), getValue( + null, "test1"), getValue(null, null))), + getRow(Arrays.asList("id"), Arrays.asList("id", "name"), Arrays.asList(getValue(null, 2), getValue(null, + "test2"))))).isEqualTo(0); assertThat( - RowComparator.INSTANCE.compare( - getRow(Arrays.asList("name"), Arrays.asList("id", "name"), Arrays.asList(getValue(null, 1), getValue(null, - "test2"))), - getRow(Arrays.asList("name"), Arrays.asList("id", "name"), Arrays.asList(getValue(null, 2), getValue(null, - null))))).isEqualTo(-1); + RowComparator.INSTANCE.compare( + getRow(Arrays.asList("name"), Arrays.asList("id", "name"), Arrays.asList(getValue(null, 1), getValue(null, + "test2"))), + getRow(Arrays.asList("name"), Arrays.asList("id", "name"), Arrays.asList(getValue(null, 2), getValue(null, + null))))).isEqualTo(-1); assertThat( - RowComparator.INSTANCE.compare( - getRow(Arrays.asList("name"), Arrays.asList("id", "name"), Arrays.asList(getValue(null, 1), getValue(null, - null))), - getRow(Arrays.asList("name"), Arrays.asList("id", "name"), Arrays.asList(getValue(null, 2), getValue(null, - "test1"))))).isEqualTo(1); + RowComparator.INSTANCE.compare( + getRow(Arrays.asList("name"), Arrays.asList("id", "name"), Arrays.asList(getValue(null, 1), getValue(null, + null))), + getRow(Arrays.asList("name"), Arrays.asList("id", "name"), Arrays.asList(getValue(null, 2), getValue(null, + "test1"))))).isEqualTo(1); assertThat( - RowComparator.INSTANCE.compare( - getRow(Arrays.asList("name"), Arrays.asList("id", "name"), Arrays.asList(getValue(null, 1), getValue(null, - null))), - getRow(Arrays.asList("name"), Arrays.asList("id", "name"), Arrays.asList(getValue(null, 1), getValue(null, - null))))).isEqualTo(0); + RowComparator.INSTANCE.compare( + getRow(Arrays.asList("name"), Arrays.asList("id", "name"), Arrays.asList(getValue(null, 1), getValue(null, + null))), + getRow(Arrays.asList("name"), Arrays.asList("id", "name"), Arrays.asList(getValue(null, 1), getValue(null, + null))))).isEqualTo(0); assertThat( - RowComparator.INSTANCE.compare( - getRow(Arrays.asList("name"), Arrays.asList("id", "name"), Arrays.asList(getValue(null, 1), getValue(null, - new byte[] {0}))), - getRow(Arrays.asList("name"), Arrays.asList("id", "name"), Arrays.asList(getValue(null, 1), getValue(null, - new byte[] {1}))))).isEqualTo( - 0); + RowComparator.INSTANCE.compare( + getRow(Arrays.asList("name"), Arrays.asList("id", "name"), Arrays.asList(getValue(null, 1), getValue(null, + new byte[]{0}))), + getRow(Arrays.asList("name"), Arrays.asList("id", "name"), Arrays.asList(getValue(null, 1), getValue(null, + new byte[]{1}))))).isEqualTo( + 0); assertThat( - RowComparator.INSTANCE.compare( - getRow(Arrays.asList("name"), Arrays.asList("id", "name"), Arrays.asList(getValue(null, 1), getValue(null, - new byte[] {0}))), - getRow(Arrays.asList("name"), Arrays.asList("id", "name"), Arrays.asList(getValue(null, 1), getValue(null, - "test"))))).isEqualTo( - 0); + RowComparator.INSTANCE.compare( + getRow(Arrays.asList("name"), Arrays.asList("id", "name"), Arrays.asList(getValue(null, 1), getValue(null, + new byte[]{0}))), + getRow(Arrays.asList("name"), Arrays.asList("id", "name"), Arrays.asList(getValue(null, 1), getValue(null, + "test"))))).isEqualTo( + 0); assertThat( - RowComparator.INSTANCE.compare( - getRow(Arrays.asList("name"), Arrays.asList("id", "name"), Arrays.asList(getValue(null, 1), getValue(null, - "test"))), - getRow(Arrays.asList("name"), Arrays.asList("id", "name"), Arrays.asList(getValue(null, 1), getValue(null, - new byte[] {1}))))).isEqualTo(0); + RowComparator.INSTANCE.compare( + getRow(Arrays.asList("name"), Arrays.asList("id", "name"), Arrays.asList(getValue(null, 1), getValue(null, + "test"))), + getRow(Arrays.asList("name"), Arrays.asList("id", "name"), Arrays.asList(getValue(null, 1), getValue(null, + new byte[]{1}))))).isEqualTo(0); } } diff --git a/src/test/java/org/assertj/db/util/Values_AreClose_Value_And_DateTimeValue_Test.java b/src/test/java/org/assertj/db/util/Values_AreClose_Value_And_DateTimeValue_Test.java index 1afba338..58695509 100644 --- a/src/test/java/org/assertj/db/util/Values_AreClose_Value_And_DateTimeValue_Test.java +++ b/src/test/java/org/assertj/db/util/Values_AreClose_Value_And_DateTimeValue_Test.java @@ -8,26 +8,25 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.util; +import static org.assertj.core.api.Assertions.assertThat; + +import java.sql.Date; +import java.sql.Timestamp; + import org.assertj.db.common.AbstractTest; import org.assertj.db.type.DateTimeValue; import org.assertj.db.type.DateValue; import org.assertj.db.type.TimeValue; import org.junit.Test; -import java.sql.Date; -import java.sql.Timestamp; - -import static org.assertj.core.api.Assertions.assertThat; - /** * Tests on {@code areClose} method for {@code DateTimeValue}s. * * @author Régis Pouiller - * */ public class Values_AreClose_Value_And_DateTimeValue_Test extends AbstractTest { @@ -37,92 +36,92 @@ public class Values_AreClose_Value_And_DateTimeValue_Test extends AbstractTest { @Test public void test_are_close_for_timestamps_with_date() throws Exception { assertThat( - Values.areClose(getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)), DateValue.of(0, 0, 0))).isTrue(); + Values.areClose(getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)), DateValue.of(0, 0, 0))).isTrue(); assertThat( - Values.areClose(getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 5, 3)), DateValue.of(0, 0, 0))).isFalse(); + Values.areClose(getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 5, 3)), DateValue.of(0, 0, 0))).isFalse(); assertThat(Values.areClose(getValue(null, ""), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)), DateValue.of(0, 0, 0))) - .isFalse(); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)), DateValue.of(0, 0, 0))) + .isFalse(); assertThat(Values.areClose(getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), (DateTimeValue) null, DateValue.of(0, 0, 0))) - .isFalse(); + .isFalse(); assertThat( - Values.areClose(getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 2)), DateValue.of(0, 0, 0))).isFalse(); + Values.areClose(getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 2)), DateValue.of(0, 0, 0))).isFalse(); assertThat( - Values.areClose(getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 5, 3)), DateValue.of(0, 0, 0))).isFalse(); + Values.areClose(getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 5, 3)), DateValue.of(0, 0, 0))).isFalse(); assertThat( - Values.areClose(getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 2, 6, 3)), DateValue.of(0, 0, 0))).isFalse(); + Values.areClose(getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 2, 6, 3)), DateValue.of(0, 0, 0))).isFalse(); assertThat( - Values.areClose(getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(10, 1, 6, 3)), DateValue.of(0, 0, 0))).isFalse(); + Values.areClose(getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(10, 1, 6, 3)), DateValue.of(0, 0, 0))).isFalse(); assertThat( - Values.areClose(getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), - DateTimeValue.of(DateValue.of(2007, 12, 3), TimeValue.of(9, 1, 6, 3)), DateValue.of(0, 0, 0))).isFalse(); + Values.areClose(getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), + DateTimeValue.of(DateValue.of(2007, 12, 3), TimeValue.of(9, 1, 6, 3)), DateValue.of(0, 0, 0))).isFalse(); assertThat( - Values.areClose(getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), - DateTimeValue.of(DateValue.of(2007, 2, 23), TimeValue.of(9, 1, 6, 3)), DateValue.of(0, 0, 0))).isFalse(); + Values.areClose(getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), + DateTimeValue.of(DateValue.of(2007, 2, 23), TimeValue.of(9, 1, 6, 3)), DateValue.of(0, 0, 0))).isFalse(); assertThat( - Values.areClose(getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), - DateTimeValue.of(DateValue.of(2008, 12, 23), TimeValue.of(9, 1, 6, 3)), DateValue.of(0, 0, 0))).isFalse(); + Values.areClose(getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), + DateTimeValue.of(DateValue.of(2008, 12, 23), TimeValue.of(9, 1, 6, 3)), DateValue.of(0, 0, 0))).isFalse(); assertThat( - Values.areClose(getValue(null, Date.valueOf("2007-12-23")), - DateTimeValue.of(DateValue.of(2007, 12, 23)), DateValue.of(0, 0, 0))).isTrue(); + Values.areClose(getValue(null, Date.valueOf("2007-12-23")), + DateTimeValue.of(DateValue.of(2007, 12, 23)), DateValue.of(0, 0, 0))).isTrue(); assertThat( - Values.areClose(getValue(null, Date.valueOf("2007-12-23")), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 5, 3)), DateValue.of(0, 0, 0))).isFalse(); + Values.areClose(getValue(null, Date.valueOf("2007-12-23")), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 5, 3)), DateValue.of(0, 0, 0))).isFalse(); assertThat(Values.areClose(getValue(null, ""), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)), DateValue.of(0, 0, 0))).isFalse(); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)), DateValue.of(0, 0, 0))).isFalse(); assertThat(Values.areClose(getValue(null, Date.valueOf("2007-12-23")), (DateTimeValue) null, DateValue.of(0, 0, 0))).isFalse(); assertThat( - Values.areClose(getValue(null, Date.valueOf("2007-12-23")), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 2)), DateValue.of(0, 0, 0))).isFalse(); + Values.areClose(getValue(null, Date.valueOf("2007-12-23")), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 2)), DateValue.of(0, 0, 0))).isFalse(); assertThat( - Values.areClose(getValue(null, Date.valueOf("2007-12-23")), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 5, 3)), DateValue.of(0, 0, 0))).isFalse(); + Values.areClose(getValue(null, Date.valueOf("2007-12-23")), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 5, 3)), DateValue.of(0, 0, 0))).isFalse(); assertThat( - Values.areClose(getValue(null, Date.valueOf("2007-12-23")), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 2, 6, 3)), DateValue.of(0, 0, 0))).isFalse(); + Values.areClose(getValue(null, Date.valueOf("2007-12-23")), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 2, 6, 3)), DateValue.of(0, 0, 0))).isFalse(); assertThat( - Values.areClose(getValue(null, Date.valueOf("2007-12-23")), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(10, 1, 6, 3)), DateValue.of(0, 0, 0))).isFalse(); + Values.areClose(getValue(null, Date.valueOf("2007-12-23")), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(10, 1, 6, 3)), DateValue.of(0, 0, 0))).isFalse(); assertThat( - Values.areClose(getValue(null, Date.valueOf("2007-12-23")), - DateTimeValue.of(DateValue.of(2007, 12, 3), TimeValue.of(9, 1, 6, 3)), DateValue.of(0, 0, 0))).isFalse(); + Values.areClose(getValue(null, Date.valueOf("2007-12-23")), + DateTimeValue.of(DateValue.of(2007, 12, 3), TimeValue.of(9, 1, 6, 3)), DateValue.of(0, 0, 0))).isFalse(); assertThat( - Values.areClose(getValue(null, Date.valueOf("2007-12-23")), - DateTimeValue.of(DateValue.of(2007, 2, 23), TimeValue.of(9, 1, 6, 3)), DateValue.of(0, 0, 0))).isFalse(); + Values.areClose(getValue(null, Date.valueOf("2007-12-23")), + DateTimeValue.of(DateValue.of(2007, 2, 23), TimeValue.of(9, 1, 6, 3)), DateValue.of(0, 0, 0))).isFalse(); assertThat( - Values.areClose(getValue(null, Date.valueOf("2007-12-23")), - DateTimeValue.of(DateValue.of(2008, 12, 23), TimeValue.of(9, 1, 6, 3)), DateValue.of(0, 0, 0))).isFalse(); + Values.areClose(getValue(null, Date.valueOf("2007-12-23")), + DateTimeValue.of(DateValue.of(2008, 12, 23), TimeValue.of(9, 1, 6, 3)), DateValue.of(0, 0, 0))).isFalse(); assertThat( - Values.areClose(getValue(null, Date.valueOf("2007-12-23")), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 2)), DateValue.of(0, 0, 1))).isTrue(); + Values.areClose(getValue(null, Date.valueOf("2007-12-23")), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 2)), DateValue.of(0, 0, 1))).isTrue(); assertThat( - Values.areClose(getValue(null, Date.valueOf("2007-12-23")), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 5, 3)), DateValue.of(0, 0, 1))).isTrue(); + Values.areClose(getValue(null, Date.valueOf("2007-12-23")), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 5, 3)), DateValue.of(0, 0, 1))).isTrue(); assertThat( - Values.areClose(getValue(null, Date.valueOf("2007-12-23")), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 2, 6, 3)), DateValue.of(0, 0, 1))).isTrue(); + Values.areClose(getValue(null, Date.valueOf("2007-12-23")), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 2, 6, 3)), DateValue.of(0, 0, 1))).isTrue(); assertThat( - Values.areClose(getValue(null, Date.valueOf("2007-12-23")), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(10, 1, 6, 3)), DateValue.of(0, 0, 1))).isTrue(); + Values.areClose(getValue(null, Date.valueOf("2007-12-23")), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(10, 1, 6, 3)), DateValue.of(0, 0, 1))).isTrue(); assertThat( - Values.areClose(getValue(null, Date.valueOf("2007-12-23")), - DateTimeValue.of(DateValue.of(2007, 12, 3), TimeValue.of(9, 1, 6, 3)), DateValue.of(0, 0, 20))).isTrue(); + Values.areClose(getValue(null, Date.valueOf("2007-12-23")), + DateTimeValue.of(DateValue.of(2007, 12, 3), TimeValue.of(9, 1, 6, 3)), DateValue.of(0, 0, 20))).isTrue(); assertThat( - Values.areClose(getValue(null, Date.valueOf("2007-12-23")), - DateTimeValue.of(DateValue.of(2007, 2, 23), TimeValue.of(9, 1, 6, 3)), DateValue.of(0, 10, 0))).isTrue(); + Values.areClose(getValue(null, Date.valueOf("2007-12-23")), + DateTimeValue.of(DateValue.of(2007, 2, 23), TimeValue.of(9, 1, 6, 3)), DateValue.of(0, 10, 0))).isTrue(); assertThat( - Values.areClose(getValue(null, Date.valueOf("2007-12-23")), - DateTimeValue.of(DateValue.of(2008, 12, 23), TimeValue.of(9, 1, 6, 3)), DateValue.of(1, 0, 1))).isTrue(); + Values.areClose(getValue(null, Date.valueOf("2007-12-23")), + DateTimeValue.of(DateValue.of(2008, 12, 23), TimeValue.of(9, 1, 6, 3)), DateValue.of(1, 0, 1))).isTrue(); } /** @@ -131,92 +130,92 @@ public void test_are_close_for_timestamps_with_date() throws Exception { @Test public void test_are_close_for_timestamps_with_time() throws Exception { assertThat( - Values.areClose(getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)), TimeValue.of(0, 0, 0))).isTrue(); + Values.areClose(getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)), TimeValue.of(0, 0, 0))).isTrue(); assertThat( - Values.areClose(getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 5, 3)), TimeValue.of(0, 0, 0))).isFalse(); + Values.areClose(getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 5, 3)), TimeValue.of(0, 0, 0))).isFalse(); assertThat(Values.areClose(getValue(null, ""), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)), TimeValue.of(0, 0, 0))) - .isFalse(); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)), TimeValue.of(0, 0, 0))) + .isFalse(); assertThat(Values.areClose(getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), (DateTimeValue) null, TimeValue.of(0, 0, 0))) - .isFalse(); + .isFalse(); assertThat( - Values.areClose(getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 2)), TimeValue.of(0, 0, 0))).isFalse(); + Values.areClose(getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 2)), TimeValue.of(0, 0, 0))).isFalse(); assertThat( - Values.areClose(getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 5, 3)), TimeValue.of(0, 0, 0))).isFalse(); + Values.areClose(getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 5, 3)), TimeValue.of(0, 0, 0))).isFalse(); assertThat( - Values.areClose(getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 2, 6, 3)), TimeValue.of(0, 0, 0))).isFalse(); + Values.areClose(getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 2, 6, 3)), TimeValue.of(0, 0, 0))).isFalse(); assertThat( - Values.areClose(getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(10, 1, 6, 3)), TimeValue.of(0, 0, 0))).isFalse(); + Values.areClose(getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(10, 1, 6, 3)), TimeValue.of(0, 0, 0))).isFalse(); assertThat( - Values.areClose(getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), - DateTimeValue.of(DateValue.of(2007, 12, 3), TimeValue.of(9, 1, 6, 3)), TimeValue.of(0, 0, 0))).isFalse(); + Values.areClose(getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), + DateTimeValue.of(DateValue.of(2007, 12, 3), TimeValue.of(9, 1, 6, 3)), TimeValue.of(0, 0, 0))).isFalse(); assertThat( - Values.areClose(getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), - DateTimeValue.of(DateValue.of(2007, 2, 23), TimeValue.of(9, 1, 6, 3)), TimeValue.of(0, 0, 0))).isFalse(); + Values.areClose(getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), + DateTimeValue.of(DateValue.of(2007, 2, 23), TimeValue.of(9, 1, 6, 3)), TimeValue.of(0, 0, 0))).isFalse(); assertThat( - Values.areClose(getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), - DateTimeValue.of(DateValue.of(2008, 12, 23), TimeValue.of(9, 1, 6, 3)), TimeValue.of(0, 0, 0))).isFalse(); + Values.areClose(getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), + DateTimeValue.of(DateValue.of(2008, 12, 23), TimeValue.of(9, 1, 6, 3)), TimeValue.of(0, 0, 0))).isFalse(); assertThat( - Values.areClose(getValue(null, Date.valueOf("2007-12-23")), - DateTimeValue.of(DateValue.of(2007, 12, 23)), TimeValue.of(0, 0, 0))).isTrue(); + Values.areClose(getValue(null, Date.valueOf("2007-12-23")), + DateTimeValue.of(DateValue.of(2007, 12, 23)), TimeValue.of(0, 0, 0))).isTrue(); assertThat( - Values.areClose(getValue(null, Date.valueOf("2007-12-23")), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 5, 3)), TimeValue.of(0, 0, 0))).isFalse(); + Values.areClose(getValue(null, Date.valueOf("2007-12-23")), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 5, 3)), TimeValue.of(0, 0, 0))).isFalse(); assertThat(Values.areClose(getValue(null, ""), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)), TimeValue.of(0, 0, 0))).isFalse(); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)), TimeValue.of(0, 0, 0))).isFalse(); assertThat(Values.areClose(getValue(null, Date.valueOf("2007-12-23")), (DateTimeValue) null, TimeValue.of(0, 0, 0))).isFalse(); assertThat( - Values.areClose(getValue(null, Date.valueOf("2007-12-23")), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 2)), TimeValue.of(0, 0, 0))).isFalse(); + Values.areClose(getValue(null, Date.valueOf("2007-12-23")), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 2)), TimeValue.of(0, 0, 0))).isFalse(); assertThat( - Values.areClose(getValue(null, Date.valueOf("2007-12-23")), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 5, 3)), TimeValue.of(0, 0, 0))).isFalse(); + Values.areClose(getValue(null, Date.valueOf("2007-12-23")), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 5, 3)), TimeValue.of(0, 0, 0))).isFalse(); assertThat( - Values.areClose(getValue(null, Date.valueOf("2007-12-23")), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 2, 6, 3)), TimeValue.of(0, 0, 0))).isFalse(); + Values.areClose(getValue(null, Date.valueOf("2007-12-23")), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 2, 6, 3)), TimeValue.of(0, 0, 0))).isFalse(); assertThat( - Values.areClose(getValue(null, Date.valueOf("2007-12-23")), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(10, 1, 6, 3)), TimeValue.of(0, 0, 0))).isFalse(); + Values.areClose(getValue(null, Date.valueOf("2007-12-23")), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(10, 1, 6, 3)), TimeValue.of(0, 0, 0))).isFalse(); assertThat( - Values.areClose(getValue(null, Date.valueOf("2007-12-23")), - DateTimeValue.of(DateValue.of(2007, 12, 3), TimeValue.of(9, 1, 6, 3)), TimeValue.of(0, 0, 0))).isFalse(); + Values.areClose(getValue(null, Date.valueOf("2007-12-23")), + DateTimeValue.of(DateValue.of(2007, 12, 3), TimeValue.of(9, 1, 6, 3)), TimeValue.of(0, 0, 0))).isFalse(); assertThat( - Values.areClose(getValue(null, Date.valueOf("2007-12-23")), - DateTimeValue.of(DateValue.of(2007, 2, 23), TimeValue.of(9, 1, 6, 3)), TimeValue.of(0, 0, 0))).isFalse(); + Values.areClose(getValue(null, Date.valueOf("2007-12-23")), + DateTimeValue.of(DateValue.of(2007, 2, 23), TimeValue.of(9, 1, 6, 3)), TimeValue.of(0, 0, 0))).isFalse(); assertThat( - Values.areClose(getValue(null, Date.valueOf("2007-12-23")), - DateTimeValue.of(DateValue.of(2008, 12, 23), TimeValue.of(9, 1, 6, 3)), TimeValue.of(0, 0, 0))).isFalse(); + Values.areClose(getValue(null, Date.valueOf("2007-12-23")), + DateTimeValue.of(DateValue.of(2008, 12, 23), TimeValue.of(9, 1, 6, 3)), TimeValue.of(0, 0, 0))).isFalse(); assertThat( - Values.areClose(getValue(null, Date.valueOf("2007-12-23")), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 2)), TimeValue.of(9, 1, 6, 2))).isTrue(); + Values.areClose(getValue(null, Date.valueOf("2007-12-23")), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 2)), TimeValue.of(9, 1, 6, 2))).isTrue(); assertThat( - Values.areClose(getValue(null, Date.valueOf("2007-12-23")), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 5, 3)), TimeValue.of(9, 1, 5, 3))).isTrue(); + Values.areClose(getValue(null, Date.valueOf("2007-12-23")), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 5, 3)), TimeValue.of(9, 1, 5, 3))).isTrue(); assertThat( - Values.areClose(getValue(null, Date.valueOf("2007-12-23")), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 2, 6, 3)), TimeValue.of(9, 2, 6, 3))).isTrue(); + Values.areClose(getValue(null, Date.valueOf("2007-12-23")), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 2, 6, 3)), TimeValue.of(9, 2, 6, 3))).isTrue(); assertThat( - Values.areClose(getValue(null, Date.valueOf("2007-12-23")), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(10, 1, 6, 3)), TimeValue.of(10, 1, 6, 3))).isTrue(); + Values.areClose(getValue(null, Date.valueOf("2007-12-23")), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(10, 1, 6, 3)), TimeValue.of(10, 1, 6, 3))).isTrue(); assertThat( - Values.areClose(getValue(null, Date.valueOf("2007-12-23")), - DateTimeValue.of(DateValue.of(2007, 12, 3), TimeValue.of(9, 1, 6, 3)), TimeValue.of(20 * 24, 0))).isTrue(); + Values.areClose(getValue(null, Date.valueOf("2007-12-23")), + DateTimeValue.of(DateValue.of(2007, 12, 3), TimeValue.of(9, 1, 6, 3)), TimeValue.of(20 * 24, 0))).isTrue(); assertThat( - Values.areClose(getValue(null, Date.valueOf("2007-12-23")), - DateTimeValue.of(DateValue.of(2007, 2, 23), TimeValue.of(9, 1, 6, 3)), TimeValue.of(0, 10, 0))).isFalse(); + Values.areClose(getValue(null, Date.valueOf("2007-12-23")), + DateTimeValue.of(DateValue.of(2007, 2, 23), TimeValue.of(9, 1, 6, 3)), TimeValue.of(0, 10, 0))).isFalse(); assertThat( - Values.areClose(getValue(null, Date.valueOf("2007-12-23")), - DateTimeValue.of(DateValue.of(2008, 12, 23), TimeValue.of(9, 1, 6, 3)), TimeValue.of(1, 0, 1))).isFalse(); + Values.areClose(getValue(null, Date.valueOf("2007-12-23")), + DateTimeValue.of(DateValue.of(2008, 12, 23), TimeValue.of(9, 1, 6, 3)), TimeValue.of(1, 0, 1))).isFalse(); } /** @@ -225,93 +224,93 @@ public void test_are_close_for_timestamps_with_time() throws Exception { @Test public void test_are_close_for_timestamps_with_datetime() throws Exception { assertThat( - Values.areClose(getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)), - DateTimeValue.of(DateValue.of(0, 0, 0)))).isTrue(); + Values.areClose(getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)), + DateTimeValue.of(DateValue.of(0, 0, 0)))).isTrue(); assertThat( - Values.areClose(getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 5, 3)), DateTimeValue.of(DateValue.of(0, 0, 0)))).isFalse(); + Values.areClose(getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 5, 3)), DateTimeValue.of(DateValue.of(0, 0, 0)))).isFalse(); assertThat(Values.areClose(getValue(null, ""), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)), DateTimeValue.of(DateValue.of(0, 0, 0)))) - .isFalse(); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)), DateTimeValue.of(DateValue.of(0, 0, 0)))) + .isFalse(); assertThat(Values.areClose(getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), (DateTimeValue) null, DateTimeValue.of(DateValue.of(0, 0, 0)))) - .isFalse(); + .isFalse(); assertThat( - Values.areClose(getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 2)), DateTimeValue.of(DateValue.of(0, 0, 0)))).isFalse(); + Values.areClose(getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 2)), DateTimeValue.of(DateValue.of(0, 0, 0)))).isFalse(); assertThat( - Values.areClose(getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 5, 3)), DateTimeValue.of(DateValue.of(0, 0, 0)))).isFalse(); + Values.areClose(getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 5, 3)), DateTimeValue.of(DateValue.of(0, 0, 0)))).isFalse(); assertThat( - Values.areClose(getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 2, 6, 3)), DateTimeValue.of(DateValue.of(0, 0, 0)))).isFalse(); + Values.areClose(getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 2, 6, 3)), DateTimeValue.of(DateValue.of(0, 0, 0)))).isFalse(); assertThat( - Values.areClose(getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(10, 1, 6, 3)), DateTimeValue.of(DateValue.of(0, 0, 0)))).isFalse(); + Values.areClose(getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(10, 1, 6, 3)), DateTimeValue.of(DateValue.of(0, 0, 0)))).isFalse(); assertThat( - Values.areClose(getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), - DateTimeValue.of(DateValue.of(2007, 12, 3), TimeValue.of(9, 1, 6, 3)), DateTimeValue.of(DateValue.of(0, 0, 0)))).isFalse(); + Values.areClose(getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), + DateTimeValue.of(DateValue.of(2007, 12, 3), TimeValue.of(9, 1, 6, 3)), DateTimeValue.of(DateValue.of(0, 0, 0)))).isFalse(); assertThat( - Values.areClose(getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), - DateTimeValue.of(DateValue.of(2007, 2, 23), TimeValue.of(9, 1, 6, 3)), DateTimeValue.of(DateValue.of(0, 0, 0)))).isFalse(); + Values.areClose(getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), + DateTimeValue.of(DateValue.of(2007, 2, 23), TimeValue.of(9, 1, 6, 3)), DateTimeValue.of(DateValue.of(0, 0, 0)))).isFalse(); assertThat( - Values.areClose(getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), - DateTimeValue.of(DateValue.of(2008, 12, 23), TimeValue.of(9, 1, 6, 3)), DateTimeValue.of(DateValue.of(0, 0, 0)))).isFalse(); + Values.areClose(getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), + DateTimeValue.of(DateValue.of(2008, 12, 23), TimeValue.of(9, 1, 6, 3)), DateTimeValue.of(DateValue.of(0, 0, 0)))).isFalse(); assertThat( - Values.areClose(getValue(null, Date.valueOf("2007-12-23")), - DateTimeValue.of(DateValue.of(2007, 12, 23)), DateTimeValue.of(DateValue.of(0, 0, 0)))).isTrue(); + Values.areClose(getValue(null, Date.valueOf("2007-12-23")), + DateTimeValue.of(DateValue.of(2007, 12, 23)), DateTimeValue.of(DateValue.of(0, 0, 0)))).isTrue(); assertThat( - Values.areClose(getValue(null, Date.valueOf("2007-12-23")), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 5, 3)), DateTimeValue.of(DateValue.of(0, 0, 0)))).isFalse(); + Values.areClose(getValue(null, Date.valueOf("2007-12-23")), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 5, 3)), DateTimeValue.of(DateValue.of(0, 0, 0)))).isFalse(); assertThat(Values.areClose(getValue(null, ""), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)), DateTimeValue.of(DateValue.of(0, 0, 0)))).isFalse(); + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)), DateTimeValue.of(DateValue.of(0, 0, 0)))).isFalse(); assertThat(Values.areClose(getValue(null, Date.valueOf("2007-12-23")), (DateTimeValue) null, DateTimeValue.of(DateValue.of(0, 0, 0)))).isFalse(); assertThat( - Values.areClose(getValue(null, Date.valueOf("2007-12-23")), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 2)), DateTimeValue.of(DateValue.of(0, 0, 0)))).isFalse(); + Values.areClose(getValue(null, Date.valueOf("2007-12-23")), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 2)), DateTimeValue.of(DateValue.of(0, 0, 0)))).isFalse(); assertThat( - Values.areClose(getValue(null, Date.valueOf("2007-12-23")), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 5, 3)), DateTimeValue.of(DateValue.of(0, 0, 0)))).isFalse(); + Values.areClose(getValue(null, Date.valueOf("2007-12-23")), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 5, 3)), DateTimeValue.of(DateValue.of(0, 0, 0)))).isFalse(); assertThat( - Values.areClose(getValue(null, Date.valueOf("2007-12-23")), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 2, 6, 3)), DateTimeValue.of(DateValue.of(0, 0, 0)))).isFalse(); + Values.areClose(getValue(null, Date.valueOf("2007-12-23")), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 2, 6, 3)), DateTimeValue.of(DateValue.of(0, 0, 0)))).isFalse(); assertThat( - Values.areClose(getValue(null, Date.valueOf("2007-12-23")), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(10, 1, 6, 3)), DateTimeValue.of(DateValue.of(0, 0, 0)))).isFalse(); + Values.areClose(getValue(null, Date.valueOf("2007-12-23")), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(10, 1, 6, 3)), DateTimeValue.of(DateValue.of(0, 0, 0)))).isFalse(); assertThat( - Values.areClose(getValue(null, Date.valueOf("2007-12-23")), - DateTimeValue.of(DateValue.of(2007, 12, 3), TimeValue.of(9, 1, 6, 3)), DateTimeValue.of(DateValue.of(0, 0, 0)))).isFalse(); + Values.areClose(getValue(null, Date.valueOf("2007-12-23")), + DateTimeValue.of(DateValue.of(2007, 12, 3), TimeValue.of(9, 1, 6, 3)), DateTimeValue.of(DateValue.of(0, 0, 0)))).isFalse(); assertThat( - Values.areClose(getValue(null, Date.valueOf("2007-12-23")), - DateTimeValue.of(DateValue.of(2007, 2, 23), TimeValue.of(9, 1, 6, 3)), DateTimeValue.of(DateValue.of(0, 0, 0)))).isFalse(); + Values.areClose(getValue(null, Date.valueOf("2007-12-23")), + DateTimeValue.of(DateValue.of(2007, 2, 23), TimeValue.of(9, 1, 6, 3)), DateTimeValue.of(DateValue.of(0, 0, 0)))).isFalse(); assertThat( - Values.areClose(getValue(null, Date.valueOf("2007-12-23")), - DateTimeValue.of(DateValue.of(2008, 12, 23), TimeValue.of(9, 1, 6, 3)), DateTimeValue.of(DateValue.of(0, 0, 0)))).isFalse(); + Values.areClose(getValue(null, Date.valueOf("2007-12-23")), + DateTimeValue.of(DateValue.of(2008, 12, 23), TimeValue.of(9, 1, 6, 3)), DateTimeValue.of(DateValue.of(0, 0, 0)))).isFalse(); assertThat( - Values.areClose(getValue(null, Date.valueOf("2007-12-23")), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 2)), DateTimeValue.of(DateValue.of(0, 0, 1)))).isTrue(); + Values.areClose(getValue(null, Date.valueOf("2007-12-23")), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 2)), DateTimeValue.of(DateValue.of(0, 0, 1)))).isTrue(); assertThat( - Values.areClose(getValue(null, Date.valueOf("2007-12-23")), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 5, 3)), DateTimeValue.of(DateValue.of(0, 0, 1)))).isTrue(); + Values.areClose(getValue(null, Date.valueOf("2007-12-23")), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 5, 3)), DateTimeValue.of(DateValue.of(0, 0, 1)))).isTrue(); assertThat( - Values.areClose(getValue(null, Date.valueOf("2007-12-23")), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 2, 6, 3)), DateTimeValue.of(DateValue.of(0, 0, 1)))).isTrue(); + Values.areClose(getValue(null, Date.valueOf("2007-12-23")), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 2, 6, 3)), DateTimeValue.of(DateValue.of(0, 0, 1)))).isTrue(); assertThat( - Values.areClose(getValue(null, Date.valueOf("2007-12-23")), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(10, 1, 6, 3)), DateTimeValue.of(DateValue.of(0, 0, 1)))).isTrue(); + Values.areClose(getValue(null, Date.valueOf("2007-12-23")), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(10, 1, 6, 3)), DateTimeValue.of(DateValue.of(0, 0, 1)))).isTrue(); assertThat( - Values.areClose(getValue(null, Date.valueOf("2007-12-23")), - DateTimeValue.of(DateValue.of(2007, 12, 3), TimeValue.of(9, 1, 6, 3)), DateTimeValue.of(DateValue.of(0, 0, 20)))).isTrue(); + Values.areClose(getValue(null, Date.valueOf("2007-12-23")), + DateTimeValue.of(DateValue.of(2007, 12, 3), TimeValue.of(9, 1, 6, 3)), DateTimeValue.of(DateValue.of(0, 0, 20)))).isTrue(); assertThat( - Values.areClose(getValue(null, Date.valueOf("2007-12-23")), - DateTimeValue.of(DateValue.of(2007, 2, 23), TimeValue.of(9, 1, 6, 3)), DateTimeValue.of(DateValue.of(0, 10, 0)))).isTrue(); + Values.areClose(getValue(null, Date.valueOf("2007-12-23")), + DateTimeValue.of(DateValue.of(2007, 2, 23), TimeValue.of(9, 1, 6, 3)), DateTimeValue.of(DateValue.of(0, 10, 0)))).isTrue(); assertThat( - Values.areClose(getValue(null, Date.valueOf("2007-12-23")), - DateTimeValue.of(DateValue.of(2008, 12, 23), TimeValue.of(9, 1, 6, 3)), DateTimeValue.of(DateValue.of(1, 0, 0), TimeValue.of(9, 1, 6, 3)))).isTrue(); + Values.areClose(getValue(null, Date.valueOf("2007-12-23")), + DateTimeValue.of(DateValue.of(2008, 12, 23), TimeValue.of(9, 1, 6, 3)), DateTimeValue.of(DateValue.of(1, 0, 0), TimeValue.of(9, 1, 6, 3)))).isTrue(); } } diff --git a/src/test/java/org/assertj/db/util/Values_AreClose_Value_And_DateValue_Test.java b/src/test/java/org/assertj/db/util/Values_AreClose_Value_And_DateValue_Test.java index a40027a2..5c5d5ac5 100644 --- a/src/test/java/org/assertj/db/util/Values_AreClose_Value_And_DateValue_Test.java +++ b/src/test/java/org/assertj/db/util/Values_AreClose_Value_And_DateValue_Test.java @@ -8,26 +8,25 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.util; +import static org.assertj.core.api.Assertions.assertThat; + +import java.sql.Date; +import java.sql.Timestamp; + import org.assertj.db.common.AbstractTest; import org.assertj.db.type.DateTimeValue; import org.assertj.db.type.DateValue; import org.assertj.db.type.TimeValue; import org.junit.Test; -import java.sql.Date; -import java.sql.Timestamp; - -import static org.assertj.core.api.Assertions.assertThat; - /** * Tests on {@code areClose} method for {@code DateValue}s. * * @author Régis Pouiller - * */ public class Values_AreClose_Value_And_DateValue_Test extends AbstractTest { @@ -57,27 +56,27 @@ public void test_are_close_for_dates_with_date() throws Exception { @Test public void test_are_close_for_timestamp_and_dates_with_date() throws Exception { assertThat(Values.areClose(getValue(null, Timestamp.valueOf("2007-12-23 00:00:00.000000000")), - DateValue.of(2007, 12, 23), DateValue.of(0, 0, 0))).isTrue(); + DateValue.of(2007, 12, 23), DateValue.of(0, 0, 0))).isTrue(); assertThat(Values.areClose(getValue(null, Timestamp.valueOf("2007-12-23 00:00:00.000000000")), - DateValue.of(2007, 1, 2), DateValue.of(0, 0, 0))).isFalse(); + DateValue.of(2007, 1, 2), DateValue.of(0, 0, 0))).isFalse(); assertThat(Values.areClose(getValue(null, ""), DateValue.of(2007, 12, 23), DateValue.of(0, 0, 0))).isFalse(); assertThat(Values.areClose(getValue(null, Timestamp.valueOf("2007-12-23 00:00:00.000000000")), (DateValue) null, DateValue.of(0, 0, 0))).isFalse(); assertThat(Values.areClose(getValue(null, Timestamp.valueOf("2007-12-23 00:00:00.000000000")), - DateValue.of(2007, 12, 2), DateValue.of(0, 0, 0))).isFalse(); + DateValue.of(2007, 12, 2), DateValue.of(0, 0, 0))).isFalse(); assertThat(Values.areClose(getValue(null, Timestamp.valueOf("2007-12-23 00:00:00.000000000")), - DateValue.of(2007, 1, 23), DateValue.of(0, 0, 0))).isFalse(); + DateValue.of(2007, 1, 23), DateValue.of(0, 0, 0))).isFalse(); assertThat(Values.areClose(getValue(null, Timestamp.valueOf("2007-12-23 00:00:00.000000000")), - DateValue.of(2008, 1, 23), DateValue.of(0, 0, 0))).isFalse(); + DateValue.of(2008, 1, 23), DateValue.of(0, 0, 0))).isFalse(); assertThat(Values.areClose(getValue(null, Timestamp.valueOf("2007-12-23 00:00:00.000000000")), - DateValue.of(2006, 12, 23), DateValue.of(0, 0, 0))).isFalse(); + DateValue.of(2006, 12, 23), DateValue.of(0, 0, 0))).isFalse(); assertThat(Values.areClose(getValue(null, Timestamp.valueOf("2007-12-23 00:00:00.000000000")), - DateValue.of(2007, 12, 2), DateValue.of(0, 0, 21))).isTrue(); + DateValue.of(2007, 12, 2), DateValue.of(0, 0, 21))).isTrue(); assertThat(Values.areClose(getValue(null, Timestamp.valueOf("2007-12-23 00:00:00.000000000")), - DateValue.of(2007, 1, 23), DateValue.of(0, 11, 0))).isTrue(); + DateValue.of(2007, 1, 23), DateValue.of(0, 11, 0))).isTrue(); assertThat(Values.areClose(getValue(null, Timestamp.valueOf("2007-12-23 00:00:00.000000000")), - DateValue.of(2006, 12, 23), DateValue.of(1, 0, 0))).isTrue(); + DateValue.of(2006, 12, 23), DateValue.of(1, 0, 0))).isTrue(); } /** @@ -98,7 +97,7 @@ public void test_are_close_for_dates_with_time() throws Exception { assertThat(Values.areClose(getValue(null, Date.valueOf("2007-12-23")), DateValue.of(2007, 12, 2), TimeValue.of(21 * 24, 0, 0))).isTrue(); assertThat(Values.areClose(getValue(null, Date.valueOf("2007-12-23")), DateValue.of(2007, 1, 23), TimeValue.of(0, 11, 0))).isFalse(); assertThat(Values.areClose(getValue(null, Date.valueOf("2007-12-23")), DateValue.of(2006, 12, 23), TimeValue - .of(1, 0, 0))).isFalse(); + .of(1, 0, 0))).isFalse(); } /** @@ -107,27 +106,27 @@ public void test_are_close_for_dates_with_time() throws Exception { @Test public void test_are_close_for_timestamp_and_dates_with_time() throws Exception { assertThat(Values.areClose(getValue(null, Timestamp.valueOf("2007-12-23 00:00:00.000000000")), - DateValue.of(2007, 12, 23), TimeValue.of(0, 0, 0))).isTrue(); + DateValue.of(2007, 12, 23), TimeValue.of(0, 0, 0))).isTrue(); assertThat(Values.areClose(getValue(null, Timestamp.valueOf("2007-12-23 00:00:00.000000000")), - DateValue.of(2007, 1, 2), TimeValue.of(0, 0, 0))).isFalse(); + DateValue.of(2007, 1, 2), TimeValue.of(0, 0, 0))).isFalse(); assertThat(Values.areClose(getValue(null, ""), DateValue.of(2007, 12, 23), TimeValue.of(0, 0, 0))).isFalse(); assertThat(Values.areClose(getValue(null, Timestamp.valueOf("2007-12-23 00:00:00.000000000")), (DateValue) null, TimeValue.of(0, 0, 0))).isFalse(); assertThat(Values.areClose(getValue(null, Timestamp.valueOf("2007-12-23 00:00:00.000000000")), - DateValue.of(2007, 12, 2), TimeValue.of(0, 0, 0))).isFalse(); + DateValue.of(2007, 12, 2), TimeValue.of(0, 0, 0))).isFalse(); assertThat(Values.areClose(getValue(null, Timestamp.valueOf("2007-12-23 00:00:00.000000000")), - DateValue.of(2007, 1, 23), TimeValue.of(0, 0, 0))).isFalse(); + DateValue.of(2007, 1, 23), TimeValue.of(0, 0, 0))).isFalse(); assertThat(Values.areClose(getValue(null, Timestamp.valueOf("2007-12-23 00:00:00.000000000")), - DateValue.of(2008, 1, 23), TimeValue.of(0, 0, 0))).isFalse(); + DateValue.of(2008, 1, 23), TimeValue.of(0, 0, 0))).isFalse(); assertThat(Values.areClose(getValue(null, Timestamp.valueOf("2007-12-23 00:00:00.000000000")), - DateValue.of(2006, 12, 23), TimeValue.of(0, 0, 0))).isFalse(); + DateValue.of(2006, 12, 23), TimeValue.of(0, 0, 0))).isFalse(); assertThat(Values.areClose(getValue(null, Timestamp.valueOf("2007-12-23 00:00:00.000000000")), - DateValue.of(2007, 12, 2), TimeValue.of(21 * 24, 0, 0))).isTrue(); + DateValue.of(2007, 12, 2), TimeValue.of(21 * 24, 0, 0))).isTrue(); assertThat(Values.areClose(getValue(null, Timestamp.valueOf("2007-12-23 00:00:00.000000000")), - DateValue.of(2007, 1, 23), TimeValue.of(0, 11, 0))).isFalse(); + DateValue.of(2007, 1, 23), TimeValue.of(0, 11, 0))).isFalse(); assertThat(Values.areClose(getValue(null, Timestamp.valueOf("2007-12-23 00:00:00.000000000")), - DateValue.of(2006, 12, 23), TimeValue.of(1, 0, 0))).isFalse(); + DateValue.of(2006, 12, 23), TimeValue.of(1, 0, 0))).isFalse(); } /** @@ -137,8 +136,8 @@ public void test_are_close_for_timestamp_and_dates_with_time() throws Exception public void test_are_close_for_dates_with_datetime() throws Exception { assertThat(Values.areClose(getValue(null, Date.valueOf("2007-12-23")), DateValue.of(2007, 12, 23), DateTimeValue.of(DateValue.of(0, 0, 0)))).isTrue(); assertThat(Values.areClose(getValue(null, Date.valueOf("2007-12-23")), DateValue.of(2007, 1, 2), DateTimeValue - .of(DateValue.of(0, - 0, 0)))).isFalse(); + .of(DateValue.of(0, + 0, 0)))).isFalse(); assertThat(Values.areClose(getValue(null, ""), DateValue.of(2007, 12, 23), DateTimeValue.of(DateValue.of(0, 0, 0)))).isFalse(); assertThat(Values.areClose(getValue(null, Date.valueOf("2007-12-23")), (DateValue) null, DateTimeValue.of(DateValue.of(0, 0, 0)))).isFalse(); @@ -158,27 +157,27 @@ public void test_are_close_for_dates_with_datetime() throws Exception { @Test public void test_are_close_for_timestamp_and_dates_with_datetime() throws Exception { assertThat(Values.areClose(getValue(null, Timestamp.valueOf("2007-12-23 00:00:00.000000000")), - DateValue.of(2007, 12, 23), DateTimeValue.of(DateValue.of(0, 0, 0)))).isTrue(); + DateValue.of(2007, 12, 23), DateTimeValue.of(DateValue.of(0, 0, 0)))).isTrue(); assertThat(Values.areClose(getValue(null, Timestamp.valueOf("2007-12-23 00:00:00.000000000")), - DateValue.of(2007, 1, 2), DateTimeValue.of(DateValue.of(0, 0, 0)))).isFalse(); + DateValue.of(2007, 1, 2), DateTimeValue.of(DateValue.of(0, 0, 0)))).isFalse(); assertThat(Values.areClose(getValue(null, ""), DateValue.of(2007, 12, 23), DateTimeValue.of(DateValue.of(0, 0, 0)))).isFalse(); assertThat(Values.areClose(getValue(null, Timestamp.valueOf("2007-12-23 00:00:00.000000000")), (DateValue) null, DateTimeValue.of(DateValue.of(0, - 0, 0)))).isFalse(); + 0, 0)))).isFalse(); assertThat(Values.areClose(getValue(null, Timestamp.valueOf("2007-12-23 00:00:00.000000000")), - DateValue.of(2007, 12, 2), DateTimeValue.of(DateValue.of(0, 0, 0)))).isFalse(); + DateValue.of(2007, 12, 2), DateTimeValue.of(DateValue.of(0, 0, 0)))).isFalse(); assertThat(Values.areClose(getValue(null, Timestamp.valueOf("2007-12-23 00:00:00.000000000")), - DateValue.of(2007, 1, 23), DateTimeValue.of(DateValue.of(0, 0, 0)))).isFalse(); + DateValue.of(2007, 1, 23), DateTimeValue.of(DateValue.of(0, 0, 0)))).isFalse(); assertThat(Values.areClose(getValue(null, Timestamp.valueOf("2007-12-23 00:00:00.000000000")), - DateValue.of(2008, 1, 23), DateTimeValue.of(DateValue.of(0, 0, 0)))).isFalse(); + DateValue.of(2008, 1, 23), DateTimeValue.of(DateValue.of(0, 0, 0)))).isFalse(); assertThat(Values.areClose(getValue(null, Timestamp.valueOf("2007-12-23 00:00:00.000000000")), - DateValue.of(2006, 12, 23), DateTimeValue.of(DateValue.of(0, 0, 0)))).isFalse(); + DateValue.of(2006, 12, 23), DateTimeValue.of(DateValue.of(0, 0, 0)))).isFalse(); assertThat(Values.areClose(getValue(null, Timestamp.valueOf("2007-12-23 00:00:00.000000000")), - DateValue.of(2007, 12, 2), DateTimeValue.of(DateValue.of(0, 0, 21)))).isTrue(); + DateValue.of(2007, 12, 2), DateTimeValue.of(DateValue.of(0, 0, 21)))).isTrue(); assertThat(Values.areClose(getValue(null, Timestamp.valueOf("2007-12-23 00:00:00.000000000")), - DateValue.of(2007, 1, 23), DateTimeValue.of(DateValue.of(0, 11, 0)))).isTrue(); + DateValue.of(2007, 1, 23), DateTimeValue.of(DateValue.of(0, 11, 0)))).isTrue(); assertThat(Values.areClose(getValue(null, Timestamp.valueOf("2007-12-23 00:00:00.000000000")), - DateValue.of(2006, 12, 23), DateTimeValue.of(DateValue.of(1, 0, 0)))).isTrue(); + DateValue.of(2006, 12, 23), DateTimeValue.of(DateValue.of(1, 0, 0)))).isTrue(); } } diff --git a/src/test/java/org/assertj/db/util/Values_AreClose_Value_And_Number_Test.java b/src/test/java/org/assertj/db/util/Values_AreClose_Value_And_Number_Test.java index 392c8bf4..4964f24b 100644 --- a/src/test/java/org/assertj/db/util/Values_AreClose_Value_And_Number_Test.java +++ b/src/test/java/org/assertj/db/util/Values_AreClose_Value_And_Number_Test.java @@ -8,24 +8,23 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.util; -import org.assertj.db.common.AbstractTest; -import org.assertj.db.exception.AssertJDBException; -import org.junit.Test; +import static org.assertj.core.api.Assertions.assertThat; import java.math.BigDecimal; import java.math.BigInteger; -import static org.assertj.core.api.Assertions.assertThat; +import org.assertj.db.common.AbstractTest; +import org.assertj.db.exception.AssertJDBException; +import org.junit.Test; /** * Tests on {@code areClose} method for {@code Number}s. * * @author Régis Pouiller - * */ public class Values_AreClose_Value_And_Number_Test extends AbstractTest { diff --git a/src/test/java/org/assertj/db/util/Values_AreClose_Value_TimeValue_Test.java b/src/test/java/org/assertj/db/util/Values_AreClose_Value_TimeValue_Test.java index 0e031b57..43bebc8e 100644 --- a/src/test/java/org/assertj/db/util/Values_AreClose_Value_TimeValue_Test.java +++ b/src/test/java/org/assertj/db/util/Values_AreClose_Value_TimeValue_Test.java @@ -8,23 +8,22 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.util; -import org.assertj.db.common.AbstractTest; -import org.assertj.db.type.TimeValue; -import org.junit.Test; +import static org.assertj.core.api.Assertions.assertThat; import java.sql.Time; -import static org.assertj.core.api.Assertions.assertThat; +import org.assertj.db.common.AbstractTest; +import org.assertj.db.type.TimeValue; +import org.junit.Test; /** * Tests on {@code areClose} method for {@code TimeValue}s. * * @author Régis Pouiller - * */ public class Values_AreClose_Value_TimeValue_Test extends AbstractTest { @@ -34,7 +33,7 @@ public class Values_AreClose_Value_TimeValue_Test extends AbstractTest { @Test public void test_are_close_for_times() throws Exception { assertThat(Values.areClose(getValue(null, Time.valueOf("09:01:06")), TimeValue.of(9, 1, 6), TimeValue.of(0, - 0))).isTrue(); + 0))).isTrue(); assertThat(Values.areClose(getValue(null, Time.valueOf("09:01:06")), TimeValue.of(9, 1, 5), TimeValue.of(0, 0))).isFalse(); assertThat(Values.areClose(getValue(null, ""), TimeValue.of(9, 1, 6), TimeValue.of(0, 0))).isFalse(); assertThat(Values.areClose(getValue(null, Time.valueOf("09:01:06")), (TimeValue) null, TimeValue.of(0, 0))).isFalse(); diff --git a/src/test/java/org/assertj/db/util/Values_AreEqual_DateTime_And_String_Test.java b/src/test/java/org/assertj/db/util/Values_AreEqual_DateTime_And_String_Test.java index ad4c7d93..b64fd37c 100644 --- a/src/test/java/org/assertj/db/util/Values_AreEqual_DateTime_And_String_Test.java +++ b/src/test/java/org/assertj/db/util/Values_AreEqual_DateTime_And_String_Test.java @@ -8,23 +8,22 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.util; -import org.assertj.db.common.AbstractTest; -import org.assertj.db.exception.AssertJDBException; -import org.junit.Test; +import static org.assertj.core.api.Assertions.assertThat; import java.sql.Timestamp; -import static org.assertj.core.api.Assertions.assertThat; +import org.assertj.db.common.AbstractTest; +import org.assertj.db.exception.AssertJDBException; +import org.junit.Test; /** * Tests on {@code areEqual} method for {@code DateTimeValue}s and {@code String}s. * * @author Régis Pouiller - * */ public class Values_AreEqual_DateTime_And_String_Test extends AbstractTest { @@ -34,58 +33,58 @@ public class Values_AreEqual_DateTime_And_String_Test extends AbstractTest { @Test public void test_are_equal_for_datestimes() throws Exception { assertThat(Values.areEqual( - getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), "2007-12-23T09:01:06.000000003")).isTrue(); + getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), "2007-12-23T09:01:06.000000003")).isTrue(); assertThat(Values.areEqual( - getValue(null, Timestamp.valueOf("2007-12-23 00:00:00.000000000")), "2007-12-23T00:00:00.000000000")).isTrue(); + getValue(null, Timestamp.valueOf("2007-12-23 00:00:00.000000000")), "2007-12-23T00:00:00.000000000")).isTrue(); assertThat(Values.areEqual(getValue(null, Timestamp.valueOf("2007-12-23 00:00:00")), "2007-12-23T00:00:00")).isTrue(); assertThat(Values.areEqual(getValue(null, Timestamp.valueOf("2007-12-23 00:00:00")), "2007-12-23T00:00")).isTrue(); assertThat(Values.areEqual(getValue(null, Timestamp.valueOf("2007-12-23 00:00:00")), "2007-12-23")).isTrue(); assertThat(Values.areEqual(getValue(null, null), (String) null)).isTrue(); assertThat(Values.areEqual( - getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), "2007-12-23T09:01:06.000000004")).isFalse(); + getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), "2007-12-23T09:01:06.000000004")).isFalse(); assertThat(Values.areEqual( - getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), "2007-12-23T09:01:07.000000003")).isFalse(); + getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), "2007-12-23T09:01:07.000000003")).isFalse(); assertThat(Values.areEqual( - getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), "2007-12-23T09:02:06.000000003")).isFalse(); + getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), "2007-12-23T09:02:06.000000003")).isFalse(); assertThat(Values.areEqual( - getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), "2007-12-23T10:01:06.000000003")).isFalse(); + getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), "2007-12-23T10:01:06.000000003")).isFalse(); assertThat(Values.areEqual( - getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), "2007-12-24T09:01:06.000000003")).isFalse(); + getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), "2007-12-24T09:01:06.000000003")).isFalse(); assertThat(Values.areEqual( - getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), "2007-01-23T09:01:06.000000003")).isFalse(); + getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), "2007-01-23T09:01:06.000000003")).isFalse(); assertThat(Values.areEqual( - getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), "2008-12-23T09:01:06.000000003")).isFalse(); + getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), "2008-12-23T09:01:06.000000003")).isFalse(); assertThat(Values.areEqual( - getValue(null, Timestamp.valueOf("2007-12-23 00:00:00.000000000")), "2007-12-23T00:00:00.000000001")).isFalse(); + getValue(null, Timestamp.valueOf("2007-12-23 00:00:00.000000000")), "2007-12-23T00:00:00.000000001")).isFalse(); assertThat(Values.areEqual( - getValue(null, Timestamp.valueOf("2007-12-23 00:00:00.000000000")), "2007-12-23T00:00:01.000000000")).isFalse(); + getValue(null, Timestamp.valueOf("2007-12-23 00:00:00.000000000")), "2007-12-23T00:00:01.000000000")).isFalse(); assertThat(Values.areEqual( - getValue(null, Timestamp.valueOf("2007-12-23 00:00:00.000000000")), "2007-12-23T00:01:00.000000000")).isFalse(); + getValue(null, Timestamp.valueOf("2007-12-23 00:00:00.000000000")), "2007-12-23T00:01:00.000000000")).isFalse(); assertThat(Values.areEqual( - getValue(null, Timestamp.valueOf("2007-12-23 00:00:00.000000000")), "2007-12-23T01:00:00.000000000")).isFalse(); + getValue(null, Timestamp.valueOf("2007-12-23 00:00:00.000000000")), "2007-12-23T01:00:00.000000000")).isFalse(); assertThat(Values.areEqual( - getValue(null, Timestamp.valueOf("2007-12-23 00:00:00.000000000")), "2007-12-24T00:00:00.000000000")).isFalse(); + getValue(null, Timestamp.valueOf("2007-12-23 00:00:00.000000000")), "2007-12-24T00:00:00.000000000")).isFalse(); assertThat(Values.areEqual( - getValue(null, Timestamp.valueOf("2007-12-23 00:00:00.000000000")), "2007-01-23T00:00:00.000000000")).isFalse(); + getValue(null, Timestamp.valueOf("2007-12-23 00:00:00.000000000")), "2007-01-23T00:00:00.000000000")).isFalse(); assertThat(Values.areEqual( - getValue(null, Timestamp.valueOf("2007-12-23 00:00:00.000000000")), "2008-12-23T00:00:00.000000000")).isFalse(); + getValue(null, Timestamp.valueOf("2007-12-23 00:00:00.000000000")), "2008-12-23T00:00:00.000000000")).isFalse(); assertThat(Values.areEqual(getValue(null, Timestamp.valueOf("2007-12-23 00:00:00")), "2007-12-23T00:00:00.000000001")) - .isFalse(); + .isFalse(); assertThat(Values.areEqual(getValue(null, Timestamp.valueOf("2007-12-23 00:00:00")), "2007-12-23T00:00:01.000000000")) - .isFalse(); + .isFalse(); assertThat(Values.areEqual(getValue(null, Timestamp.valueOf("2007-12-23 00:00:00")), "2007-12-23T00:01:00.000000000")) - .isFalse(); + .isFalse(); assertThat(Values.areEqual(getValue(null, Timestamp.valueOf("2007-12-23 00:00:00")), "2007-12-23T01:00:00.000000000")) - .isFalse(); + .isFalse(); assertThat(Values.areEqual(getValue(null, Timestamp.valueOf("2007-12-23 00:00:00")), "2007-12-24T00:00:00.000000000")) - .isFalse(); + .isFalse(); assertThat(Values.areEqual(getValue(null, Timestamp.valueOf("2007-12-23 00:00:00")), "2007-01-23T00:00:00.000000000")) - .isFalse(); + .isFalse(); assertThat(Values.areEqual(getValue(null, Timestamp.valueOf("2007-12-23 00:00:00")), "2008-12-23T00:00:00.000000000")) - .isFalse(); + .isFalse(); assertThat(Values.areEqual(getValue(null, Timestamp.valueOf("2007-12-23 00:00:00")), (String) null)).isFalse(); } diff --git a/src/test/java/org/assertj/db/util/Values_AreEqual_Date_And_String_Test.java b/src/test/java/org/assertj/db/util/Values_AreEqual_Date_And_String_Test.java index 9fea5784..d749b632 100644 --- a/src/test/java/org/assertj/db/util/Values_AreEqual_Date_And_String_Test.java +++ b/src/test/java/org/assertj/db/util/Values_AreEqual_Date_And_String_Test.java @@ -8,23 +8,22 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.util; -import org.assertj.db.common.AbstractTest; -import org.assertj.db.exception.AssertJDBException; -import org.junit.Test; +import static org.assertj.core.api.Assertions.assertThat; import java.sql.Date; -import static org.assertj.core.api.Assertions.assertThat; +import org.assertj.db.common.AbstractTest; +import org.assertj.db.exception.AssertJDBException; +import org.junit.Test; /** * Tests on {@code areEqual} method for {@code DateValue}s and {@code String}s. * * @author Régis Pouiller - * */ public class Values_AreEqual_Date_And_String_Test extends AbstractTest { diff --git a/src/test/java/org/assertj/db/util/Values_AreEqual_Number_And_String_Test.java b/src/test/java/org/assertj/db/util/Values_AreEqual_Number_And_String_Test.java index 15e2298f..96c7ca05 100644 --- a/src/test/java/org/assertj/db/util/Values_AreEqual_Number_And_String_Test.java +++ b/src/test/java/org/assertj/db/util/Values_AreEqual_Number_And_String_Test.java @@ -8,25 +8,24 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.util; -import org.assertj.db.common.AbstractTest; -import org.assertj.db.exception.AssertJDBException; -import org.junit.Test; +import static org.assertj.core.api.Assertions.assertThat; import java.math.BigDecimal; import java.math.BigInteger; import java.util.concurrent.atomic.AtomicLong; -import static org.assertj.core.api.Assertions.assertThat; +import org.assertj.db.common.AbstractTest; +import org.assertj.db.exception.AssertJDBException; +import org.junit.Test; /** * Tests on {@code areEqual} method for {@code Number}s and {@code String}s. - * + * * @author Régis Pouiller - * */ public class Values_AreEqual_Number_And_String_Test extends AbstractTest { diff --git a/src/test/java/org/assertj/db/util/Values_AreEqual_Time_And_String_Test.java b/src/test/java/org/assertj/db/util/Values_AreEqual_Time_And_String_Test.java index d150911c..1efc0bf3 100644 --- a/src/test/java/org/assertj/db/util/Values_AreEqual_Time_And_String_Test.java +++ b/src/test/java/org/assertj/db/util/Values_AreEqual_Time_And_String_Test.java @@ -8,23 +8,22 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.util; -import org.assertj.db.common.AbstractTest; -import org.assertj.db.exception.AssertJDBException; -import org.junit.Test; +import static org.assertj.core.api.Assertions.assertThat; import java.sql.Time; -import static org.assertj.core.api.Assertions.assertThat; +import org.assertj.db.common.AbstractTest; +import org.assertj.db.exception.AssertJDBException; +import org.junit.Test; /** * Tests on {@code areEqual} method for {@code Time}s and {@code String}s. - * + * * @author Régis Pouiller - * */ public class Values_AreEqual_Time_And_String_Test extends AbstractTest { diff --git a/src/test/java/org/assertj/db/util/Values_AreEqual_UUID_And_String_Test.java b/src/test/java/org/assertj/db/util/Values_AreEqual_UUID_And_String_Test.java index 492fecf9..747256f8 100644 --- a/src/test/java/org/assertj/db/util/Values_AreEqual_UUID_And_String_Test.java +++ b/src/test/java/org/assertj/db/util/Values_AreEqual_UUID_And_String_Test.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.util; @@ -33,13 +33,13 @@ public class Values_AreEqual_UUID_And_String_Test { @Test public void test_are_equal_for_UUIDs() { assertTrue(Values.areEqual(UUID.fromString("88838129-291E-40A9-A94C-A15BE36CF7C3"), - "88838129-291E-40A9-A94C-A15BE36CF7C3")); + "88838129-291E-40A9-A94C-A15BE36CF7C3")); assertFalse(Values.areEqual(UUID.fromString("88838129-291E-40A9-A94C-A15BE36CF7C3"), - null)); + null)); assertTrue(Values.areEqual((UUID) null, - (String) null)); + (String) null)); assertFalse(Values.areEqual((UUID) null, - "88838129-291E-40A9-A94C-A15BE36CF7C3")); + "88838129-291E-40A9-A94C-A15BE36CF7C3")); } /** diff --git a/src/test/java/org/assertj/db/util/Values_AreEqual_Value_And_Boolean_Test.java b/src/test/java/org/assertj/db/util/Values_AreEqual_Value_And_Boolean_Test.java index d40ca097..a04b8953 100644 --- a/src/test/java/org/assertj/db/util/Values_AreEqual_Value_And_Boolean_Test.java +++ b/src/test/java/org/assertj/db/util/Values_AreEqual_Value_And_Boolean_Test.java @@ -8,20 +8,19 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.util; +import static org.assertj.core.api.Assertions.assertThat; + import org.assertj.db.common.AbstractTest; import org.junit.Test; -import static org.assertj.core.api.Assertions.assertThat; - /** * Tests on {@code areEqual} method for {@code Boolean}s. - * + * * @author Régis Pouiller - * */ public class Values_AreEqual_Value_And_Boolean_Test extends AbstractTest { diff --git a/src/test/java/org/assertj/db/util/Values_AreEqual_Value_And_Bytes_Test.java b/src/test/java/org/assertj/db/util/Values_AreEqual_Value_And_Bytes_Test.java index 9cd5aafe..fc7d365e 100644 --- a/src/test/java/org/assertj/db/util/Values_AreEqual_Value_And_Bytes_Test.java +++ b/src/test/java/org/assertj/db/util/Values_AreEqual_Value_And_Bytes_Test.java @@ -8,21 +8,20 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.util; -import org.assertj.db.common.AbstractTest; -import org.junit.Test; - import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.db.api.Assertions.bytesContentFromClassPathOf; +import org.assertj.db.common.AbstractTest; +import org.junit.Test; + /** * Tests on {@code areEqual} method for arrays of {@code byte}s. - * + * * @author Régis Pouiller - * */ public class Values_AreEqual_Value_And_Bytes_Test extends AbstractTest { @@ -32,8 +31,8 @@ public class Values_AreEqual_Value_And_Bytes_Test extends AbstractTest { @Test public void test_are_equal_for_bytes() throws Exception { byte[] bytes = bytesContentFromClassPathOf("test.txt"); - byte[] goodBytes = new byte[] { 'T', 'e', 'x', 't', ' ', 'f', 'o', 'r', ' ', 't', 'e', 's', 't', 's' }; - byte[] badBytes = new byte[] { 'T', 'e', 'x', 't', ' ', 'f', 'o', 'r', ' ', ' ', 'e', 's', 't', 's' }; + byte[] goodBytes = new byte[]{'T', 'e', 'x', 't', ' ', 'f', 'o', 'r', ' ', 't', 'e', 's', 't', 's'}; + byte[] badBytes = new byte[]{'T', 'e', 'x', 't', ' ', 'f', 'o', 'r', ' ', ' ', 'e', 's', 't', 's'}; assertThat(Values.areEqual(getValue(null, bytes), goodBytes)).isTrue(); assertThat(Values.areEqual(getValue(null, bytes), badBytes)).isFalse(); assertThat(Values.areEqual(getValue(null, ""), goodBytes)).isFalse(); diff --git a/src/test/java/org/assertj/db/util/Values_AreEqual_Value_And_Character_Test.java b/src/test/java/org/assertj/db/util/Values_AreEqual_Value_And_Character_Test.java index 850c403c..c243f19e 100644 --- a/src/test/java/org/assertj/db/util/Values_AreEqual_Value_And_Character_Test.java +++ b/src/test/java/org/assertj/db/util/Values_AreEqual_Value_And_Character_Test.java @@ -8,7 +8,7 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.util; @@ -19,9 +19,8 @@ /** * Tests on {@code areEqual} method for {@code Character}s. - * + * * @author Régis Pouiller - * */ public class Values_AreEqual_Value_And_Character_Test extends AbstractTest { diff --git a/src/test/java/org/assertj/db/util/Values_AreEqual_Value_And_DateTimeValue_Test.java b/src/test/java/org/assertj/db/util/Values_AreEqual_Value_And_DateTimeValue_Test.java index c5c6b2ad..28e1b036 100644 --- a/src/test/java/org/assertj/db/util/Values_AreEqual_Value_And_DateTimeValue_Test.java +++ b/src/test/java/org/assertj/db/util/Values_AreEqual_Value_And_DateTimeValue_Test.java @@ -8,26 +8,25 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.util; +import static org.assertj.core.api.Assertions.assertThat; + +import java.sql.Date; +import java.sql.Timestamp; + import org.assertj.db.common.AbstractTest; import org.assertj.db.type.DateTimeValue; import org.assertj.db.type.DateValue; import org.assertj.db.type.TimeValue; import org.junit.Test; -import java.sql.Date; -import java.sql.Timestamp; - -import static org.assertj.core.api.Assertions.assertThat; - /** * Tests on {@code areEqual} method for {@code DateTimeValue}s. - * + * * @author Régis Pouiller - * */ public class Values_AreEqual_Value_And_DateTimeValue_Test extends AbstractTest { @@ -37,68 +36,68 @@ public class Values_AreEqual_Value_And_DateTimeValue_Test extends AbstractTest { @Test public void test_are_equal_for_timestamps() throws Exception { assertThat( - Values.areEqual(getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)))).isTrue(); + Values.areEqual(getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)))).isTrue(); assertThat( - Values.areEqual(getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 5, 3)))).isFalse(); + Values.areEqual(getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 5, 3)))).isFalse(); assertThat(Values.areEqual(getValue(null, ""), DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)))) - .isFalse(); + .isFalse(); assertThat(Values.areEqual(getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), (DateTimeValue) null)) - .isFalse(); + .isFalse(); assertThat( - Values.areEqual(getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 2)))).isFalse(); + Values.areEqual(getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 2)))).isFalse(); assertThat( - Values.areEqual(getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 5, 3)))).isFalse(); + Values.areEqual(getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 5, 3)))).isFalse(); assertThat( - Values.areEqual(getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 2, 6, 3)))).isFalse(); + Values.areEqual(getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 2, 6, 3)))).isFalse(); assertThat( - Values.areEqual(getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(10, 1, 6, 3)))).isFalse(); + Values.areEqual(getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(10, 1, 6, 3)))).isFalse(); assertThat( - Values.areEqual(getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), - DateTimeValue.of(DateValue.of(2007, 12, 3), TimeValue.of(9, 1, 6, 3)))).isFalse(); + Values.areEqual(getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), + DateTimeValue.of(DateValue.of(2007, 12, 3), TimeValue.of(9, 1, 6, 3)))).isFalse(); assertThat( - Values.areEqual(getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), - DateTimeValue.of(DateValue.of(2007, 2, 23), TimeValue.of(9, 1, 6, 3)))).isFalse(); + Values.areEqual(getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), + DateTimeValue.of(DateValue.of(2007, 2, 23), TimeValue.of(9, 1, 6, 3)))).isFalse(); assertThat( - Values.areEqual(getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), - DateTimeValue.of(DateValue.of(2008, 12, 23), TimeValue.of(9, 1, 6, 3)))).isFalse(); + Values.areEqual(getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), + DateTimeValue.of(DateValue.of(2008, 12, 23), TimeValue.of(9, 1, 6, 3)))).isFalse(); assertThat( - Values.areEqual(getValue(null, Date.valueOf("2007-12-23")), - DateTimeValue.of(DateValue.of(2007, 12, 23)))).isTrue(); + Values.areEqual(getValue(null, Date.valueOf("2007-12-23")), + DateTimeValue.of(DateValue.of(2007, 12, 23)))).isTrue(); assertThat( - Values.areEqual(getValue(null, Date.valueOf("2007-12-23")), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 5, 3)))).isFalse(); + Values.areEqual(getValue(null, Date.valueOf("2007-12-23")), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 5, 3)))).isFalse(); assertThat(Values.areEqual(getValue(null, ""), DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)))).isFalse(); - assertThat(Values.areEqual(getValue(null, Date.valueOf("2007-12-23")),(DateTimeValue) null)).isFalse(); + assertThat(Values.areEqual(getValue(null, Date.valueOf("2007-12-23")), (DateTimeValue) null)).isFalse(); assertThat( - Values.areEqual(getValue(null, Date.valueOf("2007-12-23")), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 2)))).isFalse(); + Values.areEqual(getValue(null, Date.valueOf("2007-12-23")), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 2)))).isFalse(); assertThat( - Values.areEqual(getValue(null, Date.valueOf("2007-12-23")), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 5, 3)))).isFalse(); + Values.areEqual(getValue(null, Date.valueOf("2007-12-23")), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 5, 3)))).isFalse(); assertThat( - Values.areEqual(getValue(null, Date.valueOf("2007-12-23")), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 2, 6, 3)))).isFalse(); + Values.areEqual(getValue(null, Date.valueOf("2007-12-23")), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 2, 6, 3)))).isFalse(); assertThat( - Values.areEqual(getValue(null, Date.valueOf("2007-12-23")), - DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(10, 1, 6, 3)))).isFalse(); + Values.areEqual(getValue(null, Date.valueOf("2007-12-23")), + DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(10, 1, 6, 3)))).isFalse(); assertThat( - Values.areEqual(getValue(null, Date.valueOf("2007-12-23")), - DateTimeValue.of(DateValue.of(2007, 12, 3), TimeValue.of(9, 1, 6, 3)))).isFalse(); + Values.areEqual(getValue(null, Date.valueOf("2007-12-23")), + DateTimeValue.of(DateValue.of(2007, 12, 3), TimeValue.of(9, 1, 6, 3)))).isFalse(); assertThat( - Values.areEqual(getValue(null, Date.valueOf("2007-12-23")), - DateTimeValue.of(DateValue.of(2007, 2, 23), TimeValue.of(9, 1, 6, 3)))).isFalse(); + Values.areEqual(getValue(null, Date.valueOf("2007-12-23")), + DateTimeValue.of(DateValue.of(2007, 2, 23), TimeValue.of(9, 1, 6, 3)))).isFalse(); assertThat( - Values.areEqual(getValue(null, Date.valueOf("2007-12-23")), - DateTimeValue.of(DateValue.of(2008, 12, 23), TimeValue.of(9, 1, 6, 3)))).isFalse(); + Values.areEqual(getValue(null, Date.valueOf("2007-12-23")), + DateTimeValue.of(DateValue.of(2008, 12, 23), TimeValue.of(9, 1, 6, 3)))).isFalse(); } } diff --git a/src/test/java/org/assertj/db/util/Values_AreEqual_Value_And_DateValue_Test.java b/src/test/java/org/assertj/db/util/Values_AreEqual_Value_And_DateValue_Test.java index 6ba1295c..80d0466e 100644 --- a/src/test/java/org/assertj/db/util/Values_AreEqual_Value_And_DateValue_Test.java +++ b/src/test/java/org/assertj/db/util/Values_AreEqual_Value_And_DateValue_Test.java @@ -8,24 +8,23 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.util; -import org.assertj.db.common.AbstractTest; -import org.assertj.db.type.DateValue; -import org.junit.Test; +import static org.assertj.core.api.Assertions.assertThat; import java.sql.Date; import java.sql.Timestamp; -import static org.assertj.core.api.Assertions.assertThat; +import org.assertj.db.common.AbstractTest; +import org.assertj.db.type.DateValue; +import org.junit.Test; /** * Tests on {@code areEqual} method for {@code DateValue}s. - * + * * @author Régis Pouiller - * */ public class Values_AreEqual_Value_And_DateValue_Test extends AbstractTest { diff --git a/src/test/java/org/assertj/db/util/Values_AreEqual_Value_And_Number_Test.java b/src/test/java/org/assertj/db/util/Values_AreEqual_Value_And_Number_Test.java index 8ab2c2e6..0e7a399b 100644 --- a/src/test/java/org/assertj/db/util/Values_AreEqual_Value_And_Number_Test.java +++ b/src/test/java/org/assertj/db/util/Values_AreEqual_Value_And_Number_Test.java @@ -8,24 +8,23 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.util; -import org.assertj.db.common.AbstractTest; -import org.assertj.db.exception.AssertJDBException; -import org.junit.Test; +import static org.assertj.core.api.Assertions.assertThat; import java.math.BigDecimal; import java.math.BigInteger; -import static org.assertj.core.api.Assertions.assertThat; +import org.assertj.db.common.AbstractTest; +import org.assertj.db.exception.AssertJDBException; +import org.junit.Test; /** * Tests on {@code areEqual} method for {@code Number}s. - * + * * @author Régis Pouiller - * */ public class Values_AreEqual_Value_And_Number_Test extends AbstractTest { diff --git a/src/test/java/org/assertj/db/util/Values_AreEqual_Value_And_Object_Test.java b/src/test/java/org/assertj/db/util/Values_AreEqual_Value_And_Object_Test.java index dedd03b9..3e35ee46 100644 --- a/src/test/java/org/assertj/db/util/Values_AreEqual_Value_And_Object_Test.java +++ b/src/test/java/org/assertj/db/util/Values_AreEqual_Value_And_Object_Test.java @@ -8,16 +8,12 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.util; -import org.assertj.db.common.AbstractTest; -import org.assertj.db.exception.AssertJDBException; -import org.assertj.db.type.DateTimeValue; -import org.assertj.db.type.DateValue; -import org.assertj.db.type.TimeValue; -import org.junit.Test; +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.db.api.Assertions.bytesContentFromClassPathOf; import java.math.BigDecimal; import java.math.BigInteger; @@ -30,8 +26,12 @@ import java.util.UUID; import java.util.concurrent.atomic.AtomicLong; -import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.db.api.Assertions.bytesContentFromClassPathOf; +import org.assertj.db.common.AbstractTest; +import org.assertj.db.exception.AssertJDBException; +import org.assertj.db.type.DateTimeValue; +import org.assertj.db.type.DateValue; +import org.assertj.db.type.TimeValue; +import org.junit.Test; /** * Tests on {@code areEqual} method for {@code Object}s. @@ -208,8 +208,8 @@ public void test_are_equal_for_other_and_long() throws Exception { @Test public void test_are_equal_for_bytes() throws Exception { byte[] bytes = bytesContentFromClassPathOf("test.txt"); - Object goodBytes = new byte[] { 'T', 'e', 'x', 't', ' ', 'f', 'o', 'r', ' ', 't', 'e', 's', 't', 's' }; - Object badBytes = new byte[] { 'T', 'e', 'x', 't', ' ', 'f', 'o', 'r', ' ', ' ', 'e', 's', 't', 's' }; + Object goodBytes = new byte[]{'T', 'e', 'x', 't', ' ', 'f', 'o', 'r', ' ', 't', 'e', 's', 't', 's'}; + Object badBytes = new byte[]{'T', 'e', 'x', 't', ' ', 'f', 'o', 'r', ' ', ' ', 'e', 's', 't', 's'}; assertThat(Values.areEqual(getValue(null, bytes), goodBytes)).isTrue(); assertThat(Values.areEqual(getValue(null, bytes), badBytes)).isFalse(); assertThat(Values.areEqual(getValue(null, bytes), (Object) "")).isFalse(); @@ -231,17 +231,17 @@ public void test_are_equal_for_string() throws Exception { @Test public void test_are_equal_for_UUID() throws Exception { assertThat(Values.areEqual(getValue(null, UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")), - (Object) UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435"))).isTrue(); + (Object) UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435"))).isTrue(); assertThat(Values.areEqual(getValue(null, UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")), - (Object) UUID.fromString("16319617-AE95-4087-9264-D3D21BF611B6"))).isFalse(); + (Object) UUID.fromString("16319617-AE95-4087-9264-D3D21BF611B6"))).isFalse(); assertThat(Values.areEqual(getValue(null, UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")), - (Object) 1)).isFalse(); + (Object) 1)).isFalse(); assertThat(Values.areEqual(getValue(null, UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")), - (Object) null)).isFalse(); + (Object) null)).isFalse(); assertThat(Values.areEqual(getValue(null, UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")), - (Object) "30B443AE-C0C9-4790-9BEC-CE1380808435")).isTrue(); + (Object) "30B443AE-C0C9-4790-9BEC-CE1380808435")).isTrue(); assertThat(Values.areEqual(getValue(null, UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")), - (Object) "30B443AE-C0C9-4790-9BED-CE1380808435")).isFalse(); + (Object) "30B443AE-C0C9-4790-9BED-CE1380808435")).isFalse(); } /** @@ -267,22 +267,22 @@ public void test_are_equal_for_dates() throws Exception { @Test public void test_are_equal_for_timestamp_and_dates() throws Exception { assertThat(Values.areEqual(getValue(null, Timestamp.valueOf("2007-12-23 00:00:00.000000000")), (Object) DateValue.of(2007, 12, 23))) - .isTrue(); + .isTrue(); assertThat(Values.areEqual(getValue(null, Timestamp.valueOf("2007-12-23 00:00:00.000000000")), LocalDate.of(2007, 12, 23))) - .isTrue(); + .isTrue(); assertThat(Values.areEqual(getValue(null, Timestamp.valueOf("2007-12-23 00:00:00.000000000")), (Object) DateValue.of(2007, 1, 2))) - .isFalse(); + .isFalse(); assertThat(Values.areEqual(getValue(null, Timestamp.valueOf("2007-12-23 00:00:00.000000000")), LocalDate.of(2007, 1, 2))) - .isFalse(); + .isFalse(); assertThat(Values.areEqual(getValue(null, ""), (Object) DateValue.of(2007, 12, 23))).isFalse(); assertThat(Values.areEqual(getValue(null, Timestamp.valueOf("2007-12-23 00:00:00.000000000")), (Object) null)).isFalse(); assertThat(Values.areEqual(getValue(null, Timestamp.valueOf("2007-12-23 00:00:00.000000000")), (Object) DateValue.of(2007, 12, 2))) - .isFalse(); + .isFalse(); assertThat(Values.areEqual(getValue(null, Timestamp.valueOf("2007-12-23 00:00:00.000000000")), (Object) DateValue.of(2007, 1, 23))) - .isFalse(); + .isFalse(); assertThat(Values.areEqual(getValue(null, Timestamp.valueOf("2007-12-23 00:00:00.000000000")), (Object) DateValue.of(2006, 12, 23))) - .isFalse(); + .isFalse(); } /** @@ -306,18 +306,18 @@ public void test_are_equal_for_times() throws Exception { @Test public void test_are_equal_for_timestamps() throws Exception { assertThat(Values.areEqual(getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), - (Object) DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)))).isTrue(); + (Object) DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 6, 3)))).isTrue(); assertThat(Values.areEqual(getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), - (Object) DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 5, 3)))).isFalse(); + (Object) DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1, 5, 3)))).isFalse(); assertThat(Values.areEqual(getValue(null, ""), (Object) DateTimeValue.of(DateValue.of(2007, 12, 23), - TimeValue.of(9, 1, 6, 3)))).isFalse(); + TimeValue.of(9, 1, 6, 3)))).isFalse(); assertThat(Values.areEqual(getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), (Object) null)).isFalse(); assertThat(Values.areEqual(getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), - (Object) "2007-12-23T09:01:06.000000003")).isTrue(); + (Object) "2007-12-23T09:01:06.000000003")).isTrue(); assertThat(Values.areEqual(getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), - Timestamp.valueOf("2007-12-23 09:01:06.000000003"))).isTrue(); + Timestamp.valueOf("2007-12-23 09:01:06.000000003"))).isTrue(); assertThat(Values.areEqual(getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), - LocalDateTime.of(2007, 12, 23, 9, 1, 6, 3))).isTrue(); + LocalDateTime.of(2007, 12, 23, 9, 1, 6, 3))).isTrue(); } /** @@ -485,57 +485,57 @@ public void should_fail_because_string_is_not_parseable_in_date() throws Excepti @Test public void test_are_equal_for_datestimes() throws Exception { assertThat(Values.areEqual(getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), - (Object) "2007-12-23T09:01:06.000000003")).isTrue(); + (Object) "2007-12-23T09:01:06.000000003")).isTrue(); assertThat(Values.areEqual(getValue(null, Timestamp.valueOf("2007-12-23 00:00:00.000000000")), - (Object) "2007-12-23T00:00:00.000000000")).isTrue(); + (Object) "2007-12-23T00:00:00.000000000")).isTrue(); assertThat(Values.areEqual(getValue(null, Timestamp.valueOf("2007-12-23 00:00:00")), (Object) "2007-12-23T00:00:00")).isTrue(); assertThat(Values.areEqual(getValue(null, Timestamp.valueOf("2007-12-23 00:00:00")), (Object) "2007-12-23T00:00")).isTrue(); assertThat(Values.areEqual(getValue(null, Timestamp.valueOf("2007-12-23 00:00:00")), (Object) "2007-12-23")).isTrue(); assertThat(Values.areEqual(getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), - (Object) "2007-12-23T09:01:06.000000004")).isFalse(); + (Object) "2007-12-23T09:01:06.000000004")).isFalse(); assertThat(Values.areEqual(getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), - (Object) "2007-12-23T09:01:07.000000003")).isFalse(); + (Object) "2007-12-23T09:01:07.000000003")).isFalse(); assertThat(Values.areEqual(getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), - (Object) "2007-12-23T09:02:06.000000003")).isFalse(); + (Object) "2007-12-23T09:02:06.000000003")).isFalse(); assertThat(Values.areEqual(getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), - (Object) "2007-12-23T10:01:06.000000003")).isFalse(); + (Object) "2007-12-23T10:01:06.000000003")).isFalse(); assertThat(Values.areEqual(getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), - (Object) "2007-12-24T09:01:06.000000003")).isFalse(); + (Object) "2007-12-24T09:01:06.000000003")).isFalse(); assertThat(Values.areEqual(getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), - (Object) "2007-01-23T09:01:06.000000003")).isFalse(); + (Object) "2007-01-23T09:01:06.000000003")).isFalse(); assertThat(Values.areEqual(getValue(null, Timestamp.valueOf("2007-12-23 09:01:06.000000003")), - (Object) "2008-12-23T09:01:06.000000003")).isFalse(); + (Object) "2008-12-23T09:01:06.000000003")).isFalse(); assertThat(Values.areEqual(getValue(null, Timestamp.valueOf("2007-12-23 00:00:00.000000000")), - (Object) "2007-12-23T00:00:00.000000001")).isFalse(); + (Object) "2007-12-23T00:00:00.000000001")).isFalse(); assertThat(Values.areEqual(getValue(null, Timestamp.valueOf("2007-12-23 00:00:00.000000000")), - (Object) "2007-12-23T00:00:01.000000000")).isFalse(); + (Object) "2007-12-23T00:00:01.000000000")).isFalse(); assertThat(Values.areEqual(getValue(null, Timestamp.valueOf("2007-12-23 00:00:00.000000000")), - (Object) "2007-12-23T00:01:00.000000000")).isFalse(); + (Object) "2007-12-23T00:01:00.000000000")).isFalse(); assertThat(Values.areEqual(getValue(null, Timestamp.valueOf("2007-12-23 00:00:00.000000000")), - (Object) "2007-12-23T01:00:00.000000000")).isFalse(); + (Object) "2007-12-23T01:00:00.000000000")).isFalse(); assertThat(Values.areEqual(getValue(null, Timestamp.valueOf("2007-12-23 00:00:00.000000000")), - (Object) "2007-12-24T00:00:00.000000000")).isFalse(); + (Object) "2007-12-24T00:00:00.000000000")).isFalse(); assertThat(Values.areEqual(getValue(null, Timestamp.valueOf("2007-12-23 00:00:00.000000000")), - (Object) "2007-01-23T00:00:00.000000000")).isFalse(); + (Object) "2007-01-23T00:00:00.000000000")).isFalse(); assertThat(Values.areEqual(getValue(null, Timestamp.valueOf("2007-12-23 00:00:00.000000000")), - (Object) "2008-12-23T00:00:00.000000000")).isFalse(); + (Object) "2008-12-23T00:00:00.000000000")).isFalse(); assertThat(Values.areEqual(getValue(null, Timestamp.valueOf("2007-12-23 00:00:00")), (Object) "2007-12-23T00:00:00.000000001")) - .isFalse(); + .isFalse(); assertThat(Values.areEqual(getValue(null, Timestamp.valueOf("2007-12-23 00:00:00")), (Object) "2007-12-23T00:00:01.000000000")) - .isFalse(); + .isFalse(); assertThat(Values.areEqual(getValue(null, Timestamp.valueOf("2007-12-23 00:00:00")), (Object) "2007-12-23T00:01:00.000000000")) - .isFalse(); + .isFalse(); assertThat(Values.areEqual(getValue(null, Timestamp.valueOf("2007-12-23 00:00:00")), (Object) "2007-12-23T01:00:00.000000000")) - .isFalse(); + .isFalse(); assertThat(Values.areEqual(getValue(null, Timestamp.valueOf("2007-12-23 00:00:00")), (Object) "2007-12-24T00:00:00.000000000")) - .isFalse(); + .isFalse(); assertThat(Values.areEqual(getValue(null, Timestamp.valueOf("2007-12-23 00:00:00")), (Object) "2007-01-23T00:00:00.000000000")) - .isFalse(); + .isFalse(); assertThat(Values.areEqual(getValue(null, Timestamp.valueOf("2007-12-23 00:00:00")), (Object) "2008-12-23T00:00:00.000000000")) - .isFalse(); + .isFalse(); } /** diff --git a/src/test/java/org/assertj/db/util/Values_AreEqual_Value_And_String_Test.java b/src/test/java/org/assertj/db/util/Values_AreEqual_Value_And_String_Test.java index cfc707f6..297e4220 100644 --- a/src/test/java/org/assertj/db/util/Values_AreEqual_Value_And_String_Test.java +++ b/src/test/java/org/assertj/db/util/Values_AreEqual_Value_And_String_Test.java @@ -8,20 +8,19 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.util; +import static org.assertj.core.api.Assertions.assertThat; + import org.assertj.db.common.AbstractTest; import org.junit.Test; -import static org.assertj.core.api.Assertions.assertThat; - /** * Tests on {@code areEqual} method for {@code String}s. - * + * * @author Régis Pouiller - * */ public class Values_AreEqual_Value_And_String_Test extends AbstractTest { diff --git a/src/test/java/org/assertj/db/util/Values_AreEqual_Value_And_UUID_Test.java b/src/test/java/org/assertj/db/util/Values_AreEqual_Value_And_UUID_Test.java index 2e3da349..c303dcd1 100644 --- a/src/test/java/org/assertj/db/util/Values_AreEqual_Value_And_UUID_Test.java +++ b/src/test/java/org/assertj/db/util/Values_AreEqual_Value_And_UUID_Test.java @@ -8,16 +8,16 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.util; -import org.assertj.db.common.AbstractTest; -import org.junit.Test; +import static org.assertj.core.api.Assertions.assertThat; import java.util.UUID; -import static org.assertj.core.api.Assertions.assertThat; +import org.assertj.db.common.AbstractTest; +import org.junit.Test; /** * Tests on {@code areEqual} method for {@code UUID}s. @@ -32,9 +32,9 @@ public class Values_AreEqual_Value_And_UUID_Test extends AbstractTest { @Test public void test_are_equal_for_UUID() throws Exception { assertThat(Values.areEqual(getValue(null, UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")), - UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435"))).isTrue(); + UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435"))).isTrue(); assertThat(Values.areEqual(getValue(null, UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")), - UUID.fromString("16319617-AE95-4087-9264-D3D21BF611B6"))).isFalse(); + UUID.fromString("16319617-AE95-4087-9264-D3D21BF611B6"))).isFalse(); assertThat(Values.areEqual(getValue(null, null), (UUID) null)).isTrue(); assertThat(Values.areEqual(getValue(null, UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")), (UUID) null)).isFalse(); assertThat(Values.areEqual(getValue(null, null), UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435"))).isFalse(); diff --git a/src/test/java/org/assertj/db/util/Values_AreEqual_Value_TimeValue_Test.java b/src/test/java/org/assertj/db/util/Values_AreEqual_Value_TimeValue_Test.java index 4aa21663..70851de9 100644 --- a/src/test/java/org/assertj/db/util/Values_AreEqual_Value_TimeValue_Test.java +++ b/src/test/java/org/assertj/db/util/Values_AreEqual_Value_TimeValue_Test.java @@ -8,23 +8,22 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.util; -import org.assertj.db.common.AbstractTest; -import org.assertj.db.type.TimeValue; -import org.junit.Test; +import static org.assertj.core.api.Assertions.assertThat; import java.sql.Time; -import static org.assertj.core.api.Assertions.assertThat; +import org.assertj.db.common.AbstractTest; +import org.assertj.db.type.TimeValue; +import org.junit.Test; /** * Tests on {@code areEqual} method for {@code TimeValue}s. - * + * * @author Régis Pouiller - * */ public class Values_AreEqual_Value_TimeValue_Test extends AbstractTest { diff --git a/src/test/java/org/assertj/db/util/Values_Compare_Value_And_Number_Test.java b/src/test/java/org/assertj/db/util/Values_Compare_Value_And_Number_Test.java index 6bcd59fa..3d5dfa51 100644 --- a/src/test/java/org/assertj/db/util/Values_Compare_Value_And_Number_Test.java +++ b/src/test/java/org/assertj/db/util/Values_Compare_Value_And_Number_Test.java @@ -8,24 +8,23 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.util; -import org.assertj.db.common.AbstractTest; -import org.assertj.db.exception.AssertJDBException; -import org.junit.Test; +import static org.assertj.core.api.Assertions.assertThat; import java.math.BigDecimal; import java.math.BigInteger; -import static org.assertj.core.api.Assertions.assertThat; +import org.assertj.db.common.AbstractTest; +import org.assertj.db.exception.AssertJDBException; +import org.junit.Test; /** * Tests on {@code compare} method for {@code Number}s. - * + * * @author Régis Pouiller - * */ public class Values_Compare_Value_And_Number_Test extends AbstractTest { diff --git a/src/test/java/org/assertj/db/util/Values_Constructor_Test.java b/src/test/java/org/assertj/db/util/Values_Constructor_Test.java index b3a846aa..5b1b6476 100644 --- a/src/test/java/org/assertj/db/util/Values_Constructor_Test.java +++ b/src/test/java/org/assertj/db/util/Values_Constructor_Test.java @@ -8,35 +8,35 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.util; -import org.junit.Test; +import static org.assertj.core.api.Assertions.assertThat; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Modifier; -import static org.assertj.core.api.Assertions.assertThat; +import org.junit.Test; /** * Test on the utility class {@code Values} : the private constructor. - * + * * @author Régis Pouiller - * */ public class Values_Constructor_Test { /** * This method tests the private constructor of {@code Values} for the tests coverage.. - * @throws NoSuchMethodException - * @throws SecurityException - * @throws InvocationTargetException - * @throws IllegalAccessException - * @throws InstantiationException - * @throws IllegalArgumentException + * + * @throws NoSuchMethodException + * @throws SecurityException + * @throws InvocationTargetException + * @throws IllegalAccessException + * @throws InstantiationException + * @throws IllegalArgumentException */ @Test public void test_private_constructor_for_the_tests_coverage() throws SecurityException, NoSuchMethodException, IllegalArgumentException, InstantiationException, IllegalAccessException, InvocationTargetException { diff --git a/src/test/java/org/assertj/db/util/Values_GetOutputFromValueInFrontOfClass_Test.java b/src/test/java/org/assertj/db/util/Values_GetOutputFromValueInFrontOfClass_Test.java index 39b2f5d3..fa49a2a9 100644 --- a/src/test/java/org/assertj/db/util/Values_GetOutputFromValueInFrontOfClass_Test.java +++ b/src/test/java/org/assertj/db/util/Values_GetOutputFromValueInFrontOfClass_Test.java @@ -8,29 +8,28 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.util; -import org.assertj.db.common.AbstractTest; -import org.assertj.db.type.DateTimeValue; -import org.assertj.db.type.DateValue; -import org.assertj.db.type.TimeValue; -import org.junit.Test; +import static org.assertj.core.api.Assertions.assertThat; import java.sql.Date; import java.sql.Time; import java.sql.Timestamp; import java.util.UUID; -import static org.assertj.core.api.Assertions.assertThat; +import org.assertj.db.common.AbstractTest; +import org.assertj.db.type.DateTimeValue; +import org.assertj.db.type.DateValue; +import org.assertj.db.type.TimeValue; +import org.junit.Test; /** -* Tests on {@code getRepresentationFromValueInFrontOfClass} method from utility class {@code Values}. -* -* @author Régis Pouiller -* -*/ + * Tests on {@code getRepresentationFromValueInFrontOfClass} method from utility class {@code Values}. + * + * @author Régis Pouiller + */ public class Values_GetOutputFromValueInFrontOfClass_Test extends AbstractTest { /** @@ -40,13 +39,13 @@ public class Values_GetOutputFromValueInFrontOfClass_Test extends AbstractTest { public void test_getRepresentationFromValueInFrontOfClass_for_dates() throws Exception { Date date = Date.valueOf("2007-12-23"); assertThat(Values.getRepresentationFromValueInFrontOfClass(getValue(null, date), DateValue.class)) - .isEqualTo(DateValue.from(date)); + .isEqualTo(DateValue.from(date)); assertThat(Values.getRepresentationFromValueInFrontOfClass(getValue(null, date), DateTimeValue.class)) - .isEqualTo(DateTimeValue.of(DateValue.from(date))); + .isEqualTo(DateTimeValue.of(DateValue.from(date))); assertThat(Values.getRepresentationFromValueInFrontOfClass(getValue(null, date), String.class)) - .isEqualTo("2007-12-23T00:00:00.000000000"); + .isEqualTo("2007-12-23T00:00:00.000000000"); assertThat(Values.getRepresentationFromValueInFrontOfClass(getValue(null, date), null)) - .isEqualTo(date); + .isEqualTo(date); } /** @@ -57,7 +56,7 @@ public void test_getRepresentationFromValueInFrontOfClass_for_times() throws Exc Time time = Time.valueOf("09:01:06"); assertThat(Values.getRepresentationFromValueInFrontOfClass(getValue(null, time), null)).isEqualTo(TimeValue.from(time)); assertThat(Values.getRepresentationFromValueInFrontOfClass(getValue(null, time), String.class)).isEqualTo( - "09:01:06.000000000"); + "09:01:06.000000000"); } /** @@ -67,9 +66,9 @@ public void test_getRepresentationFromValueInFrontOfClass_for_times() throws Exc public void test_getRepresentationFromValueInFrontOfClass_for_datetime() throws Exception { Timestamp timestamp = Timestamp.valueOf("2007-12-23 09:01:06.000000003"); assertThat(Values.getRepresentationFromValueInFrontOfClass(getValue(null, timestamp), null)).isEqualTo( - DateTimeValue.from(timestamp)); + DateTimeValue.from(timestamp)); assertThat(Values.getRepresentationFromValueInFrontOfClass(getValue(null, timestamp), String.class)).isEqualTo( - "2007-12-23T09:01:06.000000003"); + "2007-12-23T09:01:06.000000003"); } /** @@ -78,9 +77,9 @@ public void test_getRepresentationFromValueInFrontOfClass_for_datetime() throws @Test public void test_getRepresentationFromValueInFrontOfClass_for_numbers() throws Exception { assertThat(Values.getRepresentationFromValueInFrontOfClass(getValue(null, 8), - String.class)).isEqualTo("8"); + String.class)).isEqualTo("8"); assertThat(Values.getRepresentationFromValueInFrontOfClass(getValue(null, 8), - null)).isEqualTo(8); + null)).isEqualTo(8); } /** @@ -89,11 +88,11 @@ public void test_getRepresentationFromValueInFrontOfClass_for_numbers() throws E @Test public void test_getRepresentationFromValueInFrontOfClass_for_UUID() throws Exception { assertThat(Values.getRepresentationFromValueInFrontOfClass(getValue(null, UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")), - String.class)).isEqualTo( - "30b443ae-c0c9-4790-9bec-ce1380808435"); + String.class)).isEqualTo( + "30b443ae-c0c9-4790-9bec-ce1380808435"); assertThat(Values.getRepresentationFromValueInFrontOfClass(getValue(null, UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")), - null)).isEqualTo( - UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")); + null)).isEqualTo( + UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")); } /** @@ -101,8 +100,8 @@ public void test_getRepresentationFromValueInFrontOfClass_for_UUID() throws Exce */ @Test public void test_getRepresentationFromValueInFrontOfClass_for_bytes() throws Exception { - assertThat(Values.getRepresentationFromValueInFrontOfClass(getValue(null, new byte[] { 1, 2 }), null)).isEqualTo( - new byte[] { 1, 2 }); + assertThat(Values.getRepresentationFromValueInFrontOfClass(getValue(null, new byte[]{1, 2}), null)).isEqualTo( + new byte[]{1, 2}); } /** diff --git a/src/test/java/org/assertj/db/util/Values_GetOutputFromValueInFrontOfExpected_Test.java b/src/test/java/org/assertj/db/util/Values_GetOutputFromValueInFrontOfExpected_Test.java index 1501e44e..e818cd7f 100644 --- a/src/test/java/org/assertj/db/util/Values_GetOutputFromValueInFrontOfExpected_Test.java +++ b/src/test/java/org/assertj/db/util/Values_GetOutputFromValueInFrontOfExpected_Test.java @@ -8,29 +8,28 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.util; -import org.assertj.db.common.AbstractTest; -import org.assertj.db.type.DateTimeValue; -import org.assertj.db.type.DateValue; -import org.assertj.db.type.TimeValue; -import org.junit.Test; +import static org.assertj.core.api.Assertions.assertThat; import java.sql.Date; import java.sql.Time; import java.sql.Timestamp; import java.util.UUID; -import static org.assertj.core.api.Assertions.assertThat; +import org.assertj.db.common.AbstractTest; +import org.assertj.db.type.DateTimeValue; +import org.assertj.db.type.DateValue; +import org.assertj.db.type.TimeValue; +import org.junit.Test; /** -* Tests on {@code getRepresentationFromValueInFrontOfExpected} method from utility class {@code Values}. -* -* @author Régis Pouiller -* -*/ + * Tests on {@code getRepresentationFromValueInFrontOfExpected} method from utility class {@code Values}. + * + * @author Régis Pouiller + */ public class Values_GetOutputFromValueInFrontOfExpected_Test extends AbstractTest { /** @@ -40,12 +39,12 @@ public class Values_GetOutputFromValueInFrontOfExpected_Test extends AbstractTes public void test_getRepresentationFromValueInFrontOfExpected_for_dates() throws Exception { Date date = Date.valueOf("2007-12-23"); assertThat(Values.getRepresentationFromValueInFrontOfExpected(getValue(null, date), DateValue.of(2007, 12, 23))).isEqualTo( - DateValue.from(date)); + DateValue.from(date)); assertThat(Values.getRepresentationFromValueInFrontOfExpected(getValue(null, date), DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)))).isEqualTo( - DateTimeValue.of(DateValue.from(date))); + DateTimeValue.of(DateValue.from(date))); assertThat(Values.getRepresentationFromValueInFrontOfExpected(getValue(null, date), "")).isEqualTo("2007-12-23"); assertThat(Values.getRepresentationFromValueInFrontOfExpected(getValue(null, date), "T")).isEqualTo( - "2007-12-23T00:00:00.000000000"); + "2007-12-23T00:00:00.000000000"); assertThat(Values.getRepresentationFromValueInFrontOfExpected(getValue(null, date), null)).isEqualTo(date); } @@ -66,9 +65,9 @@ public void test_getRepresentationFromValueInFrontOfExpected_for_times() throws public void test_getRepresentationFromValueInFrontOfExpected_for_datetime() throws Exception { Timestamp timestamp = Timestamp.valueOf("2007-12-23 09:01:06.000000003"); assertThat(Values.getRepresentationFromValueInFrontOfExpected(getValue(null, timestamp), null)).isEqualTo( - DateTimeValue.from(timestamp)); + DateTimeValue.from(timestamp)); assertThat(Values.getRepresentationFromValueInFrontOfExpected(getValue(null, timestamp), "")).isEqualTo( - "2007-12-23T09:01:06.000000003"); + "2007-12-23T09:01:06.000000003"); } /** @@ -76,8 +75,8 @@ public void test_getRepresentationFromValueInFrontOfExpected_for_datetime() thro */ @Test public void test_getRepresentationFromValueInFrontOfExpected_for_bytes() throws Exception { - assertThat(Values.getRepresentationFromValueInFrontOfExpected(getValue(null, new byte[] {1, 2}), null)).isEqualTo( - new byte[] { 1, 2 }); + assertThat(Values.getRepresentationFromValueInFrontOfExpected(getValue(null, new byte[]{1, 2}), null)).isEqualTo( + new byte[]{1, 2}); } /** @@ -94,9 +93,9 @@ public void test_getRepresentationFromValueInFrontOfExpected_for_text() throws E @Test public void test_getRepresentationFromValueInFrontOfExpected_for_UUID() throws Exception { assertThat(Values.getRepresentationFromValueInFrontOfExpected(getValue(null, UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")), "30B443AE-C0C9-4790-9BEC-CE1380808435")).isEqualTo( - "30b443ae-c0c9-4790-9bec-ce1380808435"); + "30b443ae-c0c9-4790-9bec-ce1380808435"); assertThat(Values.getRepresentationFromValueInFrontOfExpected(getValue(null, UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")), null)).isEqualTo( - UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")); + UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")); } /** diff --git a/src/test/java/org/assertj/db/util/Values_GetRepresentationsFromValuesInFrontOfExpected_Test.java b/src/test/java/org/assertj/db/util/Values_GetRepresentationsFromValuesInFrontOfExpected_Test.java index 295d95ab..63b7264b 100644 --- a/src/test/java/org/assertj/db/util/Values_GetRepresentationsFromValuesInFrontOfExpected_Test.java +++ b/src/test/java/org/assertj/db/util/Values_GetRepresentationsFromValuesInFrontOfExpected_Test.java @@ -8,30 +8,29 @@ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2024 the original author or authors. */ package org.assertj.db.util; -import org.assertj.db.common.AbstractTest; -import org.assertj.db.type.DateTimeValue; -import org.assertj.db.type.DateValue; -import org.assertj.db.type.TimeValue; -import org.assertj.db.type.Value; -import org.junit.Test; +import static org.assertj.core.api.Assertions.assertThat; import java.sql.Date; import java.sql.Time; import java.sql.Timestamp; import java.util.UUID; -import static org.assertj.core.api.Assertions.assertThat; +import org.assertj.db.common.AbstractTest; +import org.assertj.db.type.DateTimeValue; +import org.assertj.db.type.DateValue; +import org.assertj.db.type.TimeValue; +import org.assertj.db.type.Value; +import org.junit.Test; /** -* Tests on {@code getRepresentationsFromValuesInFrontOfExpected} method from utility class {@code Values}. -* -* @author Régis Pouiller -* -*/ + * Tests on {@code getRepresentationsFromValuesInFrontOfExpected} method from utility class {@code Values}. + * + * @author Régis Pouiller + */ public class Values_GetRepresentationsFromValuesInFrontOfExpected_Test extends AbstractTest { /** @@ -40,26 +39,26 @@ public class Values_GetRepresentationsFromValuesInFrontOfExpected_Test extends A @Test public void test_getRepresentationsFromValuesInFrontOfExpected_for_dates() throws Exception { Date date = Date.valueOf("2007-12-23"); - assertThat(Values.getRepresentationsFromValuesInFrontOfExpected(new Value[] { getValue(null, date), getValue(null, - date) }, - new DateValue[] { DateValue.of(2007, 12, 23) })) - .isEqualTo(new Object[] { DateValue.from(date), date }); - assertThat(Values.getRepresentationsFromValuesInFrontOfExpected(new Value[] { getValue(null, date), getValue(null, - date) }, - new DateTimeValue[] { DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1)) })) - .isEqualTo(new Object[] { DateTimeValue.of(DateValue.from(date)), date }); - assertThat(Values.getRepresentationsFromValuesInFrontOfExpected(new Value[] { getValue(null, date), getValue(null, - date) }, - new String[] { "" })) - .isEqualTo(new Object[] { "2007-12-23", date }); - assertThat(Values.getRepresentationsFromValuesInFrontOfExpected(new Value[] { getValue(null, date), getValue(null, - date) }, - new String[] { "T" })) - .isEqualTo(new Object[] { "2007-12-23T00:00:00.000000000", date }); - assertThat(Values.getRepresentationsFromValuesInFrontOfExpected(new Value[] { getValue(null, date), getValue(null, - date) }, - new Object[] { null })) - .isEqualTo(new Object[] { date, date }); + assertThat(Values.getRepresentationsFromValuesInFrontOfExpected(new Value[]{getValue(null, date), getValue(null, + date)}, + new DateValue[]{DateValue.of(2007, 12, 23)})) + .isEqualTo(new Object[]{DateValue.from(date), date}); + assertThat(Values.getRepresentationsFromValuesInFrontOfExpected(new Value[]{getValue(null, date), getValue(null, + date)}, + new DateTimeValue[]{DateTimeValue.of(DateValue.of(2007, 12, 23), TimeValue.of(9, 1))})) + .isEqualTo(new Object[]{DateTimeValue.of(DateValue.from(date)), date}); + assertThat(Values.getRepresentationsFromValuesInFrontOfExpected(new Value[]{getValue(null, date), getValue(null, + date)}, + new String[]{""})) + .isEqualTo(new Object[]{"2007-12-23", date}); + assertThat(Values.getRepresentationsFromValuesInFrontOfExpected(new Value[]{getValue(null, date), getValue(null, + date)}, + new String[]{"T"})) + .isEqualTo(new Object[]{"2007-12-23T00:00:00.000000000", date}); + assertThat(Values.getRepresentationsFromValuesInFrontOfExpected(new Value[]{getValue(null, date), getValue(null, + date)}, + new Object[]{null})) + .isEqualTo(new Object[]{date, date}); } /** @@ -68,14 +67,14 @@ public void test_getRepresentationsFromValuesInFrontOfExpected_for_dates() throw @Test public void test_getRepresentationsFromValuesInFrontOfExpected_for_times() throws Exception { Time time = Time.valueOf("09:01:06"); - assertThat(Values.getRepresentationsFromValuesInFrontOfExpected(new Value[] { getValue(null, time), getValue(null, - time) }, - new Object[] { null })) - .isEqualTo(new Object[] { TimeValue.from(time), time }); - assertThat(Values.getRepresentationsFromValuesInFrontOfExpected(new Value[] { getValue(null, time), getValue(null, - time) }, - new String[] { "" })) - .isEqualTo(new Object[] { "09:01:06.000000000", time }); + assertThat(Values.getRepresentationsFromValuesInFrontOfExpected(new Value[]{getValue(null, time), getValue(null, + time)}, + new Object[]{null})) + .isEqualTo(new Object[]{TimeValue.from(time), time}); + assertThat(Values.getRepresentationsFromValuesInFrontOfExpected(new Value[]{getValue(null, time), getValue(null, + time)}, + new String[]{""})) + .isEqualTo(new Object[]{"09:01:06.000000000", time}); } /** @@ -84,14 +83,14 @@ public void test_getRepresentationsFromValuesInFrontOfExpected_for_times() throw @Test public void test_getRepresentationsFromValuesInFrontOfExpected_for_datetime() throws Exception { Timestamp timestamp = Timestamp.valueOf("2007-12-23 09:01:06.000000003"); - assertThat(Values.getRepresentationsFromValuesInFrontOfExpected(new Value[] { getValue(null, timestamp), getValue( - null, timestamp) }, - new Object[] { null })) - .isEqualTo(new Object[] { DateTimeValue.from(timestamp), timestamp }); - assertThat(Values.getRepresentationsFromValuesInFrontOfExpected(new Value[] { getValue(null, timestamp), getValue( - null, timestamp) }, - new String[] { "" })) - .isEqualTo(new Object[] { "2007-12-23T09:01:06.000000003", timestamp }); + assertThat(Values.getRepresentationsFromValuesInFrontOfExpected(new Value[]{getValue(null, timestamp), getValue( + null, timestamp)}, + new Object[]{null})) + .isEqualTo(new Object[]{DateTimeValue.from(timestamp), timestamp}); + assertThat(Values.getRepresentationsFromValuesInFrontOfExpected(new Value[]{getValue(null, timestamp), getValue( + null, timestamp)}, + new String[]{""})) + .isEqualTo(new Object[]{"2007-12-23T09:01:06.000000003", timestamp}); } /** @@ -99,10 +98,10 @@ public void test_getRepresentationsFromValuesInFrontOfExpected_for_datetime() th */ @Test public void test_getRepresentationsFromValuesInFrontOfExpected_for_bytes() throws Exception { - assertThat(Values.getRepresentationsFromValuesInFrontOfExpected(new Value[] { getValue(null, new byte[] { 1, 2 }), getValue( - null, new byte[] { 1, 2 }) }, - new Object[] { null })) - .isEqualTo(new byte[][] { new byte[] { 1, 2 }, new byte[] { 1, 2 } }); + assertThat(Values.getRepresentationsFromValuesInFrontOfExpected(new Value[]{getValue(null, new byte[]{1, 2}), getValue( + null, new byte[]{1, 2})}, + new Object[]{null})) + .isEqualTo(new byte[][]{new byte[]{1, 2}, new byte[]{1, 2}}); } /** @@ -110,9 +109,9 @@ public void test_getRepresentationsFromValuesInFrontOfExpected_for_bytes() throw */ @Test public void test_getRepresentationsFromValuesInFrontOfExpected_for_text() throws Exception { - assertThat(Values.getRepresentationsFromValuesInFrontOfExpected(new Value[] { getValue(null, "text"), getValue(null, - "text1") }, new Object[] { null })) - .isEqualTo(new String[] {"text", "text1"}); + assertThat(Values.getRepresentationsFromValuesInFrontOfExpected(new Value[]{getValue(null, "text"), getValue(null, + "text1")}, new Object[]{null})) + .isEqualTo(new String[]{"text", "text1"}); } /** @@ -121,13 +120,13 @@ public void test_getRepresentationsFromValuesInFrontOfExpected_for_text() throws @Test public void test_getRepresentationsFromValuesInFrontOfExpected_for_UUID() throws Exception { assertThat(Values.getRepresentationsFromValuesInFrontOfExpected( - new Value[] { getValue(null, UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")), - getValue(null, UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")) }, new String[] {"30B443AE-C0C9-4790-9BEC-CE1380808435"})) - .isEqualTo(new Object[] {"30b443ae-c0c9-4790-9bec-ce1380808435", UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435") }); + new Value[]{getValue(null, UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")), + getValue(null, UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435"))}, new String[]{"30B443AE-C0C9-4790-9BEC-CE1380808435"})) + .isEqualTo(new Object[]{"30b443ae-c0c9-4790-9bec-ce1380808435", UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")}); assertThat(Values.getRepresentationsFromValuesInFrontOfExpected( - new Value[] { getValue(null, UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")), - getValue(null, UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")) }, new Object[] { null })) - .isEqualTo(new UUID[] { UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435"), UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435") }); + new Value[]{getValue(null, UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")), + getValue(null, UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435"))}, new Object[]{null})) + .isEqualTo(new UUID[]{UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435"), UUID.fromString("30B443AE-C0C9-4790-9BEC-CE1380808435")}); } /** @@ -135,9 +134,9 @@ public void test_getRepresentationsFromValuesInFrontOfExpected_for_UUID() throws */ @Test public void test_getRepresentationsFromValuesInFrontOfExpected_for_boolean() throws Exception { - assertThat(Values.getRepresentationsFromValuesInFrontOfExpected(new Value[]{ getValue(null, true), getValue(null, - false) }, new Object[] { null })) - .isEqualTo(new Boolean[] { true, false }); + assertThat(Values.getRepresentationsFromValuesInFrontOfExpected(new Value[]{getValue(null, true), getValue(null, + false)}, new Object[]{null})) + .isEqualTo(new Boolean[]{true, false}); } /** @@ -145,9 +144,9 @@ public void test_getRepresentationsFromValuesInFrontOfExpected_for_boolean() thr */ @Test public void test_getRepresentationsFromValuesInFrontOfExpected_for_null() throws Exception { - assertThat(Values.getRepresentationsFromValuesInFrontOfExpected(new Value[] { getValue(null, null), getValue(null, - null) }, new Object[] { null })) - .isEqualTo(new Boolean[] { null, null }); + assertThat(Values.getRepresentationsFromValuesInFrontOfExpected(new Value[]{getValue(null, null), getValue(null, + null)}, new Object[]{null})) + .isEqualTo(new Boolean[]{null, null}); } }

    - * The navigation methods are defined in navigation package.
    - * The assertion methods are defined in assertions package. + * The navigation methods are defined in navigation package.
    + * The assertion methods are defined in assertions package. *