Commit 6b84a83 Yong Bakos
committed
1 parent b0fa87f commit 6b84a83 Copy full SHA for 6b84a83
File tree 2 files changed +19
-0
lines changed
2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -30,4 +30,11 @@ class Rhizome {
30
30
_repertory.register (thing);
31
31
return thing;
32
32
}
33
+
34
+ /// WIP: Retrieve a list of [Thing] s meeting provided criteria.
35
+ /// WIP: Right now, omit the criteria and just return everything.
36
+ List <Thing > query () {
37
+ return _continuum.things.values.toList ();
38
+ }
39
+
33
40
}
Original file line number Diff line number Diff line change @@ -51,5 +51,17 @@ void main() {
51
51
repertory: Repertory (index: {information: uri}));
52
52
expect (rhizome.store (information), equals (thing));
53
53
});
54
+
55
+ test ('WIP: #query of an empty Rhizome returns an empty list' , () {
56
+ expect (rhizome.query ().length, equals (0 ));
57
+ });
58
+
59
+ test ('WIP: #query returns a list of every Thing' , () {
60
+ final first = rhizome.store ('Fake 1' );
61
+ final second = rhizome.store ('Fake 2' );
62
+ expect (rhizome.query ().length, equals (2 ));
63
+ expect (rhizome.query ().contains (first), isTrue);
64
+ expect (rhizome.query ().contains (second), isTrue);
65
+ });
54
66
});
55
67
}
You can’t perform that action at this time.
0 commit comments