Examples of Jedi


Examples of org.assertj.core.test.Jedi

    objects.assertIsEqualToIgnoringGivenFields(someInfo(), actual, other);
  }

  @Test
  public void should_pass_when_not_ignored_fields_are_equal() {
    Jedi actual = new Jedi("Yoda", "Green");
    Jedi other = new Jedi("Yoda", "Blue");
    objects.assertIsEqualToIgnoringGivenFields(someInfo(), actual, other, "lightSaberColor");
  }
View Full Code Here

Examples of org.assertj.core.test.Jedi

    objects.assertIsEqualToIgnoringGivenFields(someInfo(), actual, other, "lightSaberColor");
  }

  @Test
  public void should_pass_when_not_ignored_inherited_fields_are_equal() {
    Jedi actual = new Jedi("Yoda", "Green");
    Jedi other = new Jedi("Luke", "Green");
    objects.assertIsEqualToIgnoringGivenFields(someInfo(), actual, other, "name");
  }
View Full Code Here

Examples of org.assertj.core.test.Jedi

    objects.assertIsEqualToIgnoringGivenFields(someInfo(), actual, other, "name");
  }

  @Test
  public void should_pass_when_field_values_are_null() {
    Jedi actual = new Jedi("Yoda", null);
    Jedi other = new Jedi("Yoda", null);
    objects.assertIsEqualToIgnoringGivenFields(someInfo(), actual, other, "name");
  }
View Full Code Here

Examples of org.assertj.core.test.Jedi

  }

  @Test
  public void should_fail_if_actual_is_null() {
    thrown.expectAssertionError(actualIsNull());
    Jedi other = new Jedi("Yoda", "Green");
    objects.assertIsEqualToIgnoringGivenFields(someInfo(), null, other, "name");
  }
View Full Code Here

Examples of org.assertj.core.test.Jedi

  }

  @Test
  public void should_fail_when_some_field_values_differ() {
    AssertionInfo info = someInfo();
    Jedi actual = new Jedi("Yoda", "Green");
    Jedi other = new Jedi("Yoda", "Blue");
    try {
      objects.assertIsEqualToIgnoringGivenFields(info, actual, other, "name");
    } catch (AssertionError err) {
      verify(failures).failure(
          info,
View Full Code Here

Examples of org.assertj.core.test.Jedi

  }

  @Test
  public void should_fail_when_some_field_values_differ_and_no_fields_are_ignored() {
    AssertionInfo info = someInfo();
    Jedi actual = new Jedi("Yoda", "Green");
    Jedi other = new Jedi("Yoda", "Blue");
    try {
      objects.assertIsEqualToIgnoringGivenFields(info, actual, other);
    } catch (AssertionError err) {
      verify(failures).failure(
          info,
View Full Code Here

Examples of org.assertj.core.test.Jedi

  }

  @Test
  public void should_fail_when_some_inherited_field_values_differ() {
    AssertionInfo info = someInfo();
    Jedi actual = new Jedi("Yoda", "Green");
    Jedi other = new Jedi("Luke", "Green");
    try {
      objects.assertIsEqualToIgnoringGivenFields(info, actual, other, "lightSaberColor");
    } catch (AssertionError err) {
      verify(failures).failure(
          info,
View Full Code Here

Examples of org.assertj.core.test.Jedi

  }

  @Test
  public void should_fail_when_objects_to_compare_are_of_different_types() {
    AssertionInfo info = someInfo();
    Jedi actual = new Jedi("Yoda", "Green");
    Employee other = new Employee();
    try {
      objects.assertIsEqualToIgnoringGivenFields(info, actual, other, "name");
    } catch (AssertionError err) {
      verify(failures).failure(info, shouldBeInstance(other, actual.getClass()));
      return;
    }
    failBecauseExpectedAssertionErrorWasNotThrown();
  }
View Full Code Here

Examples of org.assertj.core.test.Jedi

  }

  @Test
  public void should_fail_when_some_field_value_is_null_on_one_object_only() {
    AssertionInfo info = someInfo();
    Jedi actual = new Jedi("Yoda", null);
    Jedi other = new Jedi("Yoda", "Green");
    try {
      objects.assertIsEqualToIgnoringGivenFields(info, actual, other, "name");
    } catch (AssertionError err) {
      List<Object> expected = newArrayList((Object) "Green");
      verify(failures).failure(info,
View Full Code Here

Examples of org.assertj.core.test.Jedi

  @Test
  public void should_fail_when_selected_field_does_not_exist() {
  thrown.expect(IntrospectionError.class,
                "Unable to obtain the value of <'age'> field/property from <Yoda the Jedi>, expecting a public field or getter");
  Jedi actual = new Jedi("Yoda", "Green");
  Jedi other = new Jedi("Yoda", "Blue");
  objects.assertIsEqualToComparingOnlyGivenFields(someInfo(), actual, other, "age");
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.