organizationForTest function
- @visibleForTesting
- int id = 42,
- String name = 'Test Organization',
- OrganizationType organizationType = OrganizationType.personal,
- DateTime? createdAt,
- DateTime? updatedAt,
Constructs an Organization with arbitrary default values for testing.
Replaces the old Organization.forTest factory — since Organization is
now generated from the OpenAPI spec, test-only defaults live here
instead of on the generated class.
Implementation
@visibleForTesting
Organization organizationForTest({
int id = 42,
String name = 'Test Organization',
OrganizationType organizationType = OrganizationType.personal,
DateTime? createdAt,
DateTime? updatedAt,
}) => Organization(
id: id,
name: name,
organizationType: organizationType,
createdAt: createdAt ?? DateTime.now(),
updatedAt: updatedAt ?? DateTime.now(),
);