Package org.assertj.core.test

Examples of org.assertj.core.test.Employee


      }
    };
  }

  private Employee employeeWithOverridenName(final String overridenName) {
    return new Employee(1L, new Name("Name"), 0) {

      @Override
      public Name getName() {
        return new Name(overridenName);
      }
View Full Code Here


      }
    };
  }

  private Employee brokenEmployee() {
    return new Employee() {

      @Override
      public boolean isAdult() {
        throw new IllegalStateException();
      }
View Full Code Here

  @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.assertIsLenientEqualsToIgnoringNullFields(info, actual, other);
    } catch (AssertionError err) {
      verify(failures).failure(info, shouldBeInstance(other, actual.getClass()));
      return;
View Full Code Here

  @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.assertIsEqualToComparingOnlyGivenFields(info, actual, other, "name");
  } catch (AssertionError err) {
    verify(failures).failure(info, shouldBeInstance(other, actual.getClass()));
    return;
View Full Code Here

  @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;
View Full Code Here

    }
  };
 
  @Before
  public void setUp() {
    yoda = new Employee(1L, new Name("Yoda"), 800);
    luke = new Employee(2L, new Name("Luke", "Skywalker"), 26);
    employees = newArrayList(yoda, luke);
  }
View Full Code Here

  @Rule
  public ExpectedException thrown = none();

  @BeforeClass
  public static void setUpOnce() {
    yoda = new Employee(1L, new Name("Yoda"), 800);
    luke = new Employee(2L, new Name("Luke", "Skywalker"), 26);
    employees = array(yoda, luke);
  }
View Full Code Here

TOP

Related Classes of org.assertj.core.test.Employee

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