|
1 | 1 | import { Any, createFunctionSpy, Expect, Test, TestCase, TestFixture } from 'alsatian'; |
2 | 2 | import { Customiser, Filter } from './'; |
3 | | -import { Collection, Dictionary, Finder, Replacer } from './collection'; |
| 3 | +import { Collection, Dictionary, Finder, Remover, Replacer } from './collection'; |
4 | 4 |
|
5 | 5 | function createTestingCollection<T>(definition: Dictionary<T>, firstIndex?: number, lastIndex?: number) { |
6 | 6 | const collection = new Collection(); |
@@ -76,11 +76,11 @@ export class CollectionTests { |
76 | 76 | createTestingCollection({ '1': 'b', '2': 'c', '3': 'd', '4': 'e' }), |
77 | 77 | (item: string) => item === 'a' |
78 | 78 | ) |
79 | | - @Test('remove(filter: Filter<TItem>) should remove items that the filter returns true to from a collection') |
80 | | - public remove2<T>(items: T[], expected: Collection<T>, filter: Filter<T>) { |
| 79 | + @Test('removeBy(remover: Remover<TItem>) should remove items that the filter returns true to from a collection') |
| 80 | + public removeBy1<T>(items: T[], expected: Collection<T>, remover: Remover<T>) { |
81 | 81 | const collection = new Collection<T>(items); |
82 | 82 |
|
83 | | - collection.remove(filter); |
| 83 | + collection.removeBy(remover); |
84 | 84 |
|
85 | 85 | Expect(collection).toEqual(expected); |
86 | 86 | } |
|
0 commit comments