Advertisement
Guest User

Untitled

a guest
May 13th, 2016
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Dart 0.86 KB | None | 0 0
  1.   Future createDatabase() async {
  2.     final invokeResult =
  3.         requester.invoke('$linkPath/addDb', {'Name': 'myDB', 'Path': dbPath});
  4.  
  5.     var updates = await invokeResult.toList();
  6.  
  7.     assertThatNoErrorHappened(updates);
  8.   }
  9.  
  10.   test('should create db file when invoking the action', () async {
  11.     await createDatabase();
  12.  
  13.     final dbDirectory = new Directory(fullDbDirectoryPath());
  14.     final directoryExists = dbDirectory.existsSync();
  15.     expect(directoryExists, isTrue);
  16.   });
  17.  
  18.   test('create watch group should create child wg node', () async {
  19.     await createDatabase();
  20.     final watchGroupName = 'myWatchGroup';
  21.     await createWatchGroup(requester, linkPath, dbPath, watchGroupName);
  22.  
  23.     final nodeValue =
  24.         await requester.getRemoteNode('$linkPath/$dbPath/$watchGroupName');
  25.     expect(nodeValue.configs[r'$$wg'], isTrue);
  26.   });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement