コード例 #1
0
ファイル: EntityService.cs プロジェクト: feozkefe/SinemaMVC
 public EntityService()
 {
     _biletService   = new BiletRepository();
     _calisanService = new CalisanRepository();
     _filmService    = new FilmRepository();
     _filmturService = new FilmTurRepository();
     _musteriService = new MusteriRepository();
     _salonService   = new SalonRepository();
     _seansService   = new SeansRepository();
 }
コード例 #2
0
ファイル: Tests.cs プロジェクト: udrescu/PSSC-2017
        public void CautaSalonInexistent()
        {
            //Arrange
            var repository = new SalonRepository();

            //Act
            var salon = repository.CautaSalon("Non-existing salon");

            //Assert
            Assert.IsNull(salon);
        }
コード例 #3
0
ファイル: Tests.cs プロジェクト: udrescu/PSSC-2017
        public void CautaSalon()
        {
            //Arrange
            var repository = new SalonRepository();

            //Act
            var salon = repository.CautaSalon("Beauty");

            //Assert
            Assert.IsNotNull(salon);
        }
コード例 #4
0
ファイル: Tests.cs プロジェクト: udrescu/PSSC-2017
        public void AdaugaSalon()
        {
            //Arrange
            var salon      = SalonFactory.Instance.CreazaSalon("Beauty Zone Salon", TipStareSalon.Inchis, null, "RO231293");
            var repository = new SalonRepository();

            //Act
            repository.AdaugaSalon(salon);

            //Assert
            Assert.IsTrue(repository.NumarSaloane() == 1);
        }
コード例 #5
0
ファイル: Tests.cs プロジェクト: udrescu/PSSC-2017
        public void AdaugaClient()
        {
            //Arrange
            var client     = PersoanaFactory.Instance.CreazaClient("Popescu", "Ion", "1901225201354", TipClient.Fidel);
            var repository = new SalonRepository();
            var salon      = repository.CautaSalon("Beauty");

            //Act
            repository.AdaugaClient(salon, client);

            //Assert
            Assert.IsTrue(repository.CautaSalon("Beauty").Clienti.Contains(client));
        }
コード例 #6
0
ファイル: SalonRepositoryTests.cs プロジェクト: sawyert/Salon
 public void Setup()
 {
     salonRepository = new SalonRepository(base._DbContext);
 }
コード例 #7
0
 public SalonService(SalonRepository salonRepository)
 {
     this.salonRepository = salonRepository;
 }