Package org.assertj.core.extractor

Source Code of org.assertj.core.extractor.ToStringExtractorTest

package org.assertj.core.extractor;

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

import org.assertj.core.test.Employee;
import org.assertj.core.test.Name;
import org.junit.Test;


public class ToStringExtractorTest {

  private ToStringExtractor toStringExtractor = new ToStringExtractor();
 
  @Test
  public void should_extract_toString() throws Exception {
    Employee someEmloyee = new Employee(1, new Name("John Doe"), 28);
   
    String result = toStringExtractor.extract(someEmloyee);
   
    assertThat(result).isEqualTo("Employee[id=1, name=Name[first='John Doe', last='null'], age=28]");
  }
}
TOP

Related Classes of org.assertj.core.extractor.ToStringExtractorTest

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.