public void CallNotifyProgress_Twice() { //setup ProgressListener mock = Substitute.For <ProgressListener>(); sut = new AlbumDictionaryCreatorImpl(mock); string path1 = "path1"; string path2 = "path2"; string[] files = new string[2]; files[0] = path1; files[1] = path2; MusicTagStub.pathAlbumDictionary[path1] = "album1"; MusicTagStub.pathDiscDictionary[path1] = 1; MusicTagStub.pathDiscCountDictionary[path1] = 1; MusicTagStub.pathTrackDictionary[path1] = 1; MusicTagStub.pathTrackCountDictionary[path1] = 2; MusicTagStub.pathTitleDictionary[path1] = "title1"; MusicTagStub.pathAlbumDictionary[path2] = "album1"; MusicTagStub.pathDiscDictionary[path2] = 1; MusicTagStub.pathDiscCountDictionary[path2] = 1; MusicTagStub.pathTrackDictionary[path2] = 2; MusicTagStub.pathTrackCountDictionary[path2] = 2; MusicTagStub.pathTitleDictionary[path2] = "title2"; //exercise Dictionary <string, Album> dict = sut.create(files); //verify mock.Received().notifyProgress(2, 1); mock.Received().notifyProgress(2, 2); }