public void TestAtGetByIdKasterIntranetRepositoryExceptionHvisSystemIkkeFindes()
        {
            var fixture           = new Fixture();
            var systemer          = fixture.CreateMany <OSIntranet.Domain.Fælles.System>(3).ToList();
            var systemlisteHelper = new SystemlisteHelper(systemer);

            Assert.That(systemlisteHelper, Is.Not.Null);

            Assert.Throws <IntranetRepositoryException>(() => systemlisteHelper.GetById(-1));
        }
        public void TestAtGetByIdHenterSystem()
        {
            var fixture           = new Fixture();
            var systemer          = fixture.CreateMany <OSIntranet.Domain.Fælles.System>(3).ToList();
            var systemlisteHelper = new SystemlisteHelper(systemer);

            Assert.That(systemlisteHelper, Is.Not.Null);

            var system = systemlisteHelper.GetById(systemer.ElementAt(1).Nummer);

            Assert.That(system, Is.Not.Null);
            Assert.That(system.Nummer, Is.EqualTo(systemer.ElementAt(1).Nummer));
            Assert.That(system.Titel, Is.Not.Null);
            Assert.That(system.Titel, Is.EqualTo(systemer.ElementAt(1).Titel));
        }
        /// <summary>
        /// Henter og returnerer et givent system under OSWEBDB.
        /// </summary>
        /// <param name="nummer">Unik identifikation af systemet.</param>
        /// <returns>System under OSWEBDB.</returns>
        public virtual ISystem SystemGetByNummer(int nummer)
        {
            var systemlisteHelper = new SystemlisteHelper(FællesRepository.SystemGetAll());

            return(systemlisteHelper.GetById(nummer));
        }