We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2fbcb9b commit d01ed5cCopy full SHA for d01ed5c
src/test/java/demo/assertJ/AssertJ.java
@@ -1,5 +1,6 @@
1
package demo.assertJ;
2
3
+import org.assertj.core.api.SoftAssertions;
4
import org.assertj.core.data.Offset;
5
import org.assertj.core.data.Percentage;
6
import org.assertj.jodatime.api.Assertions;
@@ -139,6 +140,14 @@ public static void main(String[] args) throws IOException {
139
140
assertThat(val.length()).isGreaterThan(4);
141
});
142
143
+ //Soft Assertions
144
+ SoftAssertions softAssertions=new SoftAssertions();
145
+ softAssertions.assertThat(s1)
146
+ .isInstanceOf(Student.class)
147
+ .extracting(s -> s.getName())
148
+ .isEqualTo("James");
149
+ softAssertions.assertAll();
150
+
151
}
152
public static void getException(){
153
throw new RuntimeException();
0 commit comments