public void ShouldSaveTagsIntoDatabase() { //Arrange List <string> linksCollection = new List <string>() { "https://en.wikipedia.org/wiki/The_Mummy_(1999_film)", "https://en.wikipedia.org/wiki/The_Terminal", }; int iteration = 1; //Act dataBaseManager.AddLinksToDB(linksCollection, iteration); //Assert this.linkTableRepository.Received(2).Contains(Arg.Any <string>()); this.linkTableRepository.Received(1).Add(Arg.Is <LinkEntity>( w => w.Link == linksCollection[0] && w.Iteration == iteration)); this.linkTableRepository.Received(1).Add(Arg.Is <LinkEntity>( w => w.Link == linksCollection[1] && w.Iteration == iteration)); this.linkTableRepository.Received(2).SaveChanges(); }