Reality Check is an open source Fluent Assertion framework for Java.
Reality.checkThatSystemResource(csvResource.getName()).exists();
Reality.checkThatSystemResource(csvResource1).hasSameContentAs(resource1);
Reality.checkThatCsvResource(csvResource.getName()).exists();
Reality.checkThatCsvResource(csvResource).doesNotExist();
Reality.checkThat(file).isNull();
Reality.checkThat(file).hasSameContentAs(file);
Reality.checkThatFile(filePath).exists();
Reality.checkThatCsvFile(file1).hasSameContentAs(file1);
Reality.checkThatCsvFile(file1).hasNotSameContentAs(file2);
Reality.checkThatCsvFile(filename).headerHasNoDigits();
Reality.checkThatCsv(csvString1).hasSameContentAs(csvString1);
Reality.checkThatCsv(csvString1).hasNotSameContentAs(csvString2);
Reality.checkThat(string).isNotNull();
Reality.checkThat(string).hasLength(12);
Reality.checkThat(1).isEqualTo(1);
Reality.checkThat(1).isNotEqualTo(2);
Reality.checkThat(true).isTrue();
Reality.checkThat(false).isFalse();
Reality.checkThat(new ByteArrayInputStream(byteArray1)).hasSameContentAs(new ByteArrayInputStream(byteArray1));
Reality.checkThat(new ByteArrayInputStream(byteArray1)).hasNotSameContentAs(new ByteArrayInputStream(byteArray2));
Reality.checkWithMessage("File is NULL").that(file).isNotNull();
Reality.checkWithMessage("String has wrong length").that(string).hasLength(6);
Reality.checkWithMessage("InputStream is NULL").that(new ByteArrayInputStream(byteArray)).isNotNull();
Reality.checkWithMessage("Files have different content").thatCsvFile(file).hasSameContentAs(file);
Reality.checkWithMessage("Boolean is false").that(true).isTrue();
Reality.checkThat(string).isNotNull().hasLength(12);
Reality.checkThat(file1).hasSameContentAs(file1).hasNotSameContentAs(file2);
- Collections
- Deep & Shallow copies
- Dates
- Iterables
- POJO
- JSON
- Optionals
- Futures
- REST
If you would like to help making this project better, see the CONTRIBUTING.md.
Send any other comments and suggestions to Yani Metaxas.
This project is distributed under the Apache-2.0 License.