Created
September 8, 2018 23:49
-
-
Save wkorando/26ac24fe0994411026558da865ec0c03 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class TestAssertJSoftAssertions { | |
@Test | |
public void testSoftAssertions() { | |
Person person = new Person("John", "Doe"); | |
SoftAssertions softly = new SoftAssertions(); | |
softly.assertThat(person.getFName()).isEqualTo("Anonymous"); | |
softly.assertThat(person.getLName()).isEqualTo("Person"); | |
softly.assertAll(); | |
} | |
public class Person { | |
private String fName; | |
private String lName; | |
public Person(String fName, String lName) { | |
this.fName = fName; | |
this.lName = lName; | |
} | |
public String getFName() { | |
return fName; | |
} | |
public String getLName() { | |
return lName; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment