Skip to content

Commit

Permalink
Add samples for CharSequence.toContain...elementsOf robstoll#1522
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikos-Tsiougranas committed Aug 29, 2023
1 parent 8e5a976 commit b91a0a7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1574,10 +1574,8 @@ expect(Paths.get("/root/.ssh/config")).toBeWritable()
```text
I expected subject: /root/.ssh/config (sun.nio.fs.UnixPath <1234789>)
◆ to be: writable
» failure at parent path: /root (sun.nio.fs.UnixPath <1234789>)
» access was denied
» the owner is root, the group is root
» the permissions are u=rwx g= o=
» no file system entry exists at this location
» the closest existing parent directory is none
```
</ex-path-writable>

Expand All @@ -1595,10 +1593,12 @@ expect(filePointer.resolve("subfolder/file")).toBeARegularFile()
↑ <sub>[Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/PathSpec.kt#L46)</sub> ↓ <sub>[Output](#ex-path-symlink-and-parent-not-folder)</sub>
<a name="ex-path-symlink-and-parent-not-folder"></a>
```text
I expected subject: /tmp/atrium-path/directory/subfolder/file (sun.nio.fs.UnixPath <1234789>)
I expected subject: /var/folders/c5/5kr7wdxx22gd4qchbj2hm1yc0000gn/T/atrium-path/directory/subfolder/file (sun.nio.fs.UnixPath <1234789>)
◆ to be: a file
» followed the symbolic link /tmp/atrium-path/directory to /tmp/atrium-path/file
» failure at parent path: /tmp/atrium-path/file (sun.nio.fs.UnixPath <1234789>)
» followed the symbolic link /var to /private/var
» followed the symbolic link /private/var/folders/c5/5kr7wdxx22gd4qchbj2hm1yc0000gn/T/atrium-path/directory to /var/folders/c5/5kr7wdxx22gd4qchbj2hm1yc0000gn/T/atrium-path/file
» followed the symbolic link /var to /private/var
» failure at parent path: /private/var/folders/c5/5kr7wdxx22gd4qchbj2hm1yc0000gn/T/atrium-path/file (sun.nio.fs.UnixPath <1234789>)
» was a file instead of a directory
```
</ex-path-symlink-and-parent-not-folder>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,10 @@ fun <T : CharSequence> CheckerStep<T, NoOpSearchBehaviour>.elementsOf(
* @throws IllegalArgumentException in case [expectedIterableLike] is not an [Iterable], [Sequence] or one of the [Array] types or the given
* [expectedIterableLike] does not have elements (is empty).
*
* @sample ch.tutteli.atrium.api.fluent.en_GB.samples.CharSequenceToContainCreatorSamples.elementsOf
* @sample ch.tutteli.atrium.api.fluent.en_GB.samples.CharSequenceToContainCreatorSamples.elementsOfIgnoreCase
* @sample ch.tutteli.atrium.api.fluent.en_GB.samples.CharSequenceToContainCreatorSamples.elementsOfIgnoringCaseWithChecker
*
* @since 0.13.0
*/
@JvmName("elementsOfIgnoringCase")
Expand Down

0 comments on commit b91a0a7

Please sign in to comment.