public void ShouldTotalChangeCards() { //Arrange var hashSet = new HashSet <ChanceCard>(); var changeRepository = new ChangeRepository( new List <Player>()); //Act for (var i = 0; i < TotalCards * 3; i++) { var result = changeRepository.Next(); if (!hashSet.Contains(result)) { hashSet.Add(result); } } //Assert hashSet.Count.Should().Be(TotalCards); var groups = hashSet. GroupBy(_ => _.GetType()). ToList(); groups.Count.Should().Be(5); Assert(groups, typeof(EarnChangeCard), EarnTotalCards); Assert(groups, typeof(SpendChangeCard), SpendTotalCards); Assert(groups, typeof(PrisonExitCard), PrisonExitCards); Assert(groups, typeof(Earn50FromEveryOne), Earn50FromEveryOneCards); Assert(groups, typeof(GoToPrisonChangeCard), GoToPrisonChangeCards); }