public void Add_WhenAccountIsNotNullAndDoesNotExistWithinCollection_AddsAccountToCollection() { IAccountCollectionBase <IAccount, Sut> sut = CreateSut(); IAccount account = _fixture.BuildAccountMock().Object; sut.Add(account); Assert.That(sut.Contains(account), Is.True); }
public void Add_WhenAccountCollectionIsNotNullAndEachAccountDoesNotExistWithinCollection_AddsEachAccountToCollection() { IAccountCollectionBase <IAccount, Sut> sut = CreateSut(); IEnumerable <IAccount> accountCollection = new List <IAccount> { _fixture.BuildAccountMock().Object, _fixture.BuildAccountMock().Object, _fixture.BuildAccountMock().Object, _fixture.BuildAccountMock().Object, _fixture.BuildAccountMock().Object, _fixture.BuildAccountMock().Object, _fixture.BuildAccountMock().Object }; sut.Add(accountCollection); Assert.That(accountCollection.All(account => sut.Contains(account)), Is.True); }