public void CheckIfInitializedCardsRepositoryIsRandom() { ICardRepository repositoryOne = new CardRepository(); this._initializer.Init((IEditableRepository<ICard>)repositoryOne); ICardRepository repositoryTwo = new CardRepository(); this._initializer.Init((IEditableRepository<ICard>)repositoryTwo); Assert.That(repositoryOne, Has.Count.EqualTo(repositoryTwo.Count)); bool areDifferent = false; for (int i = 0; i < repositoryOne.Count; i++) { var cardOne = repositoryOne.NextCard(); var cardTwo = repositoryTwo.NextCard(); if (string.Equals(cardOne.Name, cardTwo.Name)) continue; areDifferent = true; break; } Assert.That(areDifferent, Is.True); }