IndexedNamer class final
A file namer that automatically increments an index for unique file names.
The IndexedNamer class extends BaseNamer and ensures that each test generates unique approved and received file names by maintaining an auto-incrementing counter.
Constructors
- IndexedNamer.new({String? filePath, FileNamerOptions? options, bool addTestName = true, String? description, bool useSubfolder = false, int? counter})
- Creates an IndexedNamer instance with an incremented counter.
Properties
- addTestName → bool
-
Determines whether the test name should be included in the generated file name.
finalinherited
- approved → String
-
Returns the fully qualified approved file path with an index.
no setteroverride
- approvedFileName → String
-
Returns the generated approved file name with an index.
no setteroverride
- counter → int
-
Auto-incrementing counter for ensuring unique file names.
final
- currentTestName → String
-
Retrieves the current test name formatted for file naming.
no setterinherited
- description → String?
-
An optional description to append to the file name for clarity.
finalinherited
- filePath → String?
-
The base file path where the approval and received files will be stored.
Can be
null
if not explicitly set.finalinherited - hashCode → int
-
The hash code for this object.
no setterinherited
- options → FileNamerOptions?
-
Configuration options that influence how file names are generated.
Can be
null
if default behavior is used.finalinherited - received → String
-
Returns the fully qualified received file path with an index.
no setteroverride
- receivedFileName → String
-
Returns the generated received file name with an index.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- useSubfolder → bool
-
Determines whether files should be placed inside a subfolder.
finalinherited
Methods
-
copyWith(
{String? filePath, FileNamerOptions? options, bool? addTestName, String? description, bool? useSubfolder, int? counter}) → IndexedNamer -
Creates a modified copy of the current IndexedNamer instance with updated values.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited