aboutsummaryrefslogtreecommitdiff
path: root/test/content/repositories
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2019-05-11 11:37:18 +0900
committerShin'ya Ueoka <ueokande@i-beam.org>2019-05-11 11:37:18 +0900
commit1ba1660269b24446e9df7df0016de8c3e5596c8f (patch)
tree545e801e2039e1a49f86c6337a7110a8ed62cad8 /test/content/repositories
parentbacf83a32083c5a4c4a45c061288081423bbf18a (diff)
Make find as a clean architecture
Diffstat (limited to 'test/content/repositories')
-rw-r--r--test/content/repositories/FindRepository.test.ts15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/content/repositories/FindRepository.test.ts b/test/content/repositories/FindRepository.test.ts
new file mode 100644
index 0000000..dcb2dff
--- /dev/null
+++ b/test/content/repositories/FindRepository.test.ts
@@ -0,0 +1,15 @@
+import { FindRepositoryImpl } from '../../../src/content/repositories/FindRepository';
+import { expect } from 'chai';
+
+describe('FindRepositoryImpl', () => {
+ it('updates and gets last keyword', () => {
+ let sut = new FindRepositoryImpl();
+
+ expect(sut.getLastKeyword()).to.be.null;
+
+ sut.setLastKeyword('monkey');
+
+ expect(sut.getLastKeyword()).to.equal('monkey');
+ });
+});
+