test_descriptor library
Classes
- Descriptor
- A declarative description of a filesystem entry.
- DirectoryDescriptor
- A descriptor describing a directory that may contain nested descriptors.
- FileDescriptor
- A descriptor describing a single file.
- NothingDescriptor
- A descriptor that validates that no file exists with the given name.
- PatternDescriptor
- A descriptor that matches filesystem entity names by Pattern rather than by exact String.
Properties
Functions
-
dir(
String name, [Iterable< Descriptor> ? contents]) → DirectoryDescriptor -
Creates a new DirectoryDescriptor descriptor with
name
andcontents
. -
dirPattern(
Pattern name, [Iterable< Descriptor> ? contents]) → PatternDescriptor - A convenience method for creating a PatternDescriptor descriptor that constructs a DirectoryDescriptor descriptor.
-
file(
String name, [Object? contents]) → FileDescriptor -
Creates a new FileDescriptor with
name
andcontents
. -
filePattern(
Pattern name, [Object? contents]) → PatternDescriptor - A convenience method for creating a PatternDescriptor descriptor that constructs a FileDescriptor descriptor.
-
nothing(
String name) → NothingDescriptor -
Creates a new NothingDescriptor descriptor that asserts that no entry
named
name
exists. -
path(
String path) → String -
Returns
path
within the sandbox directory. -
pattern(
Pattern name, Descriptor child(String basename)) → PatternDescriptor -
Creates a new PatternDescriptor descriptor that asserts than an entry with
a name matching pattern exists, and matches the Descriptor returned
by
child
.