package org.assertj.db.util;

import static org.assertj.core.api.Assertions.assertThat;

import java.sql.Time;

import org.assertj.db.error.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 {

  /**
   * This method tests the {@code areEqual} method for {@code TimeValue}s.
   */
  @Test
  public void test_are_equal_for_times() {
    assertThat(Values.areEqual(Time.valueOf("09:01:06"), "09:01:06")).isTrue();
    assertThat(Values.areEqual(Time.valueOf("09:01:00"), "09:01:00")).isTrue();
    assertThat(Values.areEqual(Time.valueOf("09:01:00"), "09:01")).isTrue();
    assertThat(Values.areEqual((Time) null, (String) null)).isTrue();

    assertThat(Values.areEqual(Time.valueOf("09:01:06"), "09:01:05")).isFalse();
    assertThat(Values.areEqual(Time.valueOf("09:01:06"), "09:02:06")).isFalse();
    assertThat(Values.areEqual(Time.valueOf("09:01:06"), "10:01:06")).isFalse();
    assertThat(Values.areEqual(Time.valueOf("09:01:06"), "09:01:06.000000003")).isFalse();
    assertThat(Values.areEqual(Time.valueOf("09:01:06"), (String) null)).isFalse();
  }

  /**
   * This method should fail because the expected value ("***") is not parsable to do the comparison.
   */
  @Test(expected = AssertJDBException.class)
  public void should_fail_because_string_is_not_parseable() {
    Values.areEqual(Time.valueOf("09:01:06"), "***");
  }

  /**
   * This method should fail because the expected value is null.
   */
  @Test
  public void should_fail_because_string_is_null_with_time() {
    assertThat(Values.areEqual(Time.valueOf("09:01:06"), (String) null)).isFalse();
  }

}

@@ -1500,243 +1500,6 @@
  %7D%0A%0A
-  /**%0A   * This method should fail because the expected value is null.%0A   */%0A  @Test%0A  public void should_fail_because_string_is_null_with_time() %7B%0A    assertThat(Values.areEqual(Time.valueOf(%2209:01:06%22), (String) null)).isFalse();%0A  %7D%0A%0A
 %7D%0A

Remove unusual test