Beispiel #1
0
        public void GetAll_ThreeItemsInCollection_ShouldReturnAllThree()
        {
            _gigRepository.Add(_testGigOne);
            _gigRepository.Add(_testGigTwo);
            _gigRepository.Add(_testGigThree);

            var retrivedGigs = _gigRepository.GetAll();

            Assert.AreEqual(3, retrivedGigs.Count);

            GigAssertor.New()
            .Expected(_testGigOne)
            .Actual(retrivedGigs.Find(g => g.Id == _testGigOne.Id))
            .DoAssert();

            GigAssertor.New()
            .Expected(_testGigTwo)
            .Actual(retrivedGigs.Find(g => g.Id == _testGigTwo.Id))
            .DoAssert();

            GigAssertor.New()
            .Expected(_testGigThree)
            .Actual(retrivedGigs.Find(g => g.Id == _testGigThree.Id))
            .DoAssert();
        }