File tree Expand file tree Collapse file tree
TOFileSystemObserverTests/Changes Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ - (void)setUp
2929 self.url = [NSURL fileURLWithPath: @" /Documents" ];
3030 self.uuid = @" 0256d425-f081-4bc3-8db5-bcb158568abb" ;
3131
32+ // Create test objects
3233 self.observer = [[TOFileSystemObserver alloc ] init ];
3334 self.changes = [[TOFileSystemChanges alloc ] initWithFileSystemObserver: self .observer];
3435}
@@ -48,24 +49,28 @@ - (void)testObserverInChanges
4849
4950- (void )testDiscoveries
5051{
52+ // Test we can properly retrieve discovered items that were added
5153 [self .changes addDiscoveredItemWithUUID: self .uuid fileURL: self .url];
5254 XCTAssert (self.changes .discoveredItems [self .uuid] == self.url );
5355}
5456
5557- (void )testModifications
5658{
59+ // Test we can properly retrieve modified items that were added
5760 [self .changes addModifiedItemWithUUID: self .uuid fileURL: self .url];
5861 XCTAssert (self.changes .modifiedItems [self .uuid] == self.url );
5962}
6063
6164- (void )testDeletions
6265{
66+ // Test we can properly retrieve deleted items that were added
6367 [self .changes addDeletedItemWithUUID: self .uuid fileURL: self .url];
6468 XCTAssert (self.changes .deletedItems [self .uuid] == self.url );
6569}
6670
6771- (void )testMovedItems
6872{
73+ // Test we can properly retrieve moved items that were added
6974 NSURL *newURL = [NSURL fileURLWithPath: @" /Documents/Folder" ];
7075 [self .changes addMovedItemWithUUID: self .uuid oldFileURL: self .url newFileURL: newURL];
7176 XCTAssert (self.changes .movedItems [self .uuid].firstObject == self.url );
You can’t perform that action at this time.
0 commit comments