public void Add_WhenPostingWarningIsNotNull_AddsPostingWarningToCollection() { IPostingWarningCollection sut = CreateSut(); IPostingWarning postingWarning = _fixture.BuildPostingWarningMock().Object; sut.Add(postingWarning); Assert.That(sut.Contains(postingWarning), Is.True); }
public void Ordered_WhenPostingWarningCollectionHasPostingWarnings_ReturnsPostingWarningCollectionWithSamePostingWarnings() { IPostingWarningCollection sut = CreateSut(); IPostingWarning[] postingWarnings = _fixture.CreateMany <IPostingWarning>(_random.Next(10, 25)).ToArray(); sut.Add(postingWarnings); IPostingWarningCollection result = sut.Ordered(); foreach (IPostingWarning postingWarning in postingWarnings) { Assert.That(result.Contains(postingWarning), Is.True); } }
public void Add_WhenPostingWarningIsNotNull_AddsEachPostingWarningToCollection() { IPostingWarningCollection sut = CreateSut(); IEnumerable <IPostingWarning> postingWarningCollection = new List <IPostingWarning> { _fixture.BuildPostingWarningMock().Object, _fixture.BuildPostingWarningMock().Object, _fixture.BuildPostingWarningMock().Object, _fixture.BuildPostingWarningMock().Object, _fixture.BuildPostingWarningMock().Object, _fixture.BuildPostingWarningMock().Object, _fixture.BuildPostingWarningMock().Object }; sut.Add(postingWarningCollection); Assert.That(postingWarningCollection.All(account => sut.Contains(account)), Is.True); }