FakePublicContentSource class
In-memory PublicContentSource for tests and showcase apps.
Enforces the public projection — only documents added via seed are returned by reads. seedDraft entries simulate unpublished documents and are filtered from every read method, matching the real backend.
- Implemented types
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
getAllContents(
) → Future< Map< String, List< >PublicDeskDocument> > -
override
-
getContentBySlug(
String documentType, String slug) → Future< PublicDeskDocument> -
override
-
getContentsByDataContains(
String documentType, String dataContainsJson) → Future< List< PublicDeskDocument> > -
override
-
getContentsByType(
String documentType) → Future< List< PublicDeskDocument> > -
override
-
getDefaultContent(
String documentType) → Future< PublicDeskDocument> -
override
-
getDefaultContents(
) → Future< Map< String, PublicDeskDocument> > -
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
seed(
Iterable< PublicDeskDocument> docs) → void -
seedDraft(
Iterable< PublicDeskDocument> docs) → void - Records draft documents that exist conceptually but should be invisible to readers. Drafts are intentionally not stored — the assertion is "they don't show up." Holding them in a separate list would invite tests that read the draft set, which the real public endpoint cannot do.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited