BaseNamer class abstract

Base class for file name generation in approval tests.

This class centralizes the common logic used by Namer and IndexedNamer.

Implemented types

Constructors

BaseNamer.new({String? filePath, FileNamerOptions? options, bool addTestName = true, String? description, bool useSubfolder = false})
Constructor for the base namer.
const

Properties

addTestName bool
Determines whether the test name should be included in the generated file name.
final
approved String
The full path of the approved file.
no setterinherited
approvedFileName String
The generated file name for the approved file.
no setterinherited
currentTestName String
Retrieves the current test name formatted for file naming.
no setteroverride
description String?
An optional description to append to the file name for clarity.
final
filePath String?
The base file path where the approval and received files will be stored. Can be null if not explicitly set.
final
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.
final
received String
The full path of the received file.
no setterinherited
receivedFileName String
The generated file name for the received file.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
useSubfolder bool
Determines whether files should be placed inside a subfolder.
final

Methods

copyWith({String? filePath, FileNamerOptions? options, bool? addTestName, String? description, bool? useSubfolder}) ApprovalNamer
Creates a copy of the current ApprovalNamer instance with overridden properties.
inherited
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

Constants

approvedExtension → const String
Constants defining file extensions used for approval testing.
receivedExtension → const String