Esempio n. 1
0
        public void GetCursussenInstantiesShouldReturnAQueryableOfCursusInstanties()
        {
            var cursusInstantiesQueryable = new List <CursusInstantie>
            {
                CursusInstantieBuilder.New().WithStartDate(new DateTime(2020, 02, 02)).Build(),
                CursusInstantieBuilder.New().WithStartDate(new DateTime(2020, 03, 03)).Build(),
                CursusInstantieBuilder.New().WithStartDate(new DateTime(2020, 04, 04)).Build(),
                CursusInstantieBuilder.New().WithStartDate(new DateTime(2020, 04, 04)).Build(),
                CursusInstantieBuilder.New().WithStartDate(new DateTime(2020, 04, 04)).Build()
            };

            _cursusInstantieRepositoryMock.Setup(x => x.GetCursusInstanties()).Returns(cursusInstantiesQueryable);

            var cursusInstanties = _sut.GetCursussen();

            Assert.IsNotNull(cursusInstanties);
            Assert.IsTrue(cursusInstanties.Count() == 5);
        }