Exemplo n.º 1
0
        public StudentServicesTests()
        {
            _nhs = new NHibernateService2();


            var userRep      = new UserRepository(_nhs);
            var userServices = new UserServices(userRep);
            var student      = new Student()
            {
                Id      = 1,
                Name    = "Zlatko",
                Surname = "Hrastić",
                Email   = "*****@*****.**",
                NationalIdentificationNumber = "343999999",
                StudentIdentificationNumber  = "0036476522",
                CoursesEnrolledIn            = null,
                PasswordHash = "xxx"
            };

            var administrator = new Administrator()
            {
                Id           = 2,
                Email        = "*****@*****.**",
                PasswordHash = EncryptionService.EncryptSHA1("123abc"),
                Name         = "Željko",
                Surname      = "Baranek",
                NationalIdentificationNumber = "123456"
            };

            userServices.CreateUser(student);
            userServices.CreateUser(administrator);
        }
Exemplo n.º 2
0
 public void Setup()
 {
     _nHibernateService = Substitute.For <INHibernateService>();
     _session           = Substitute.For <ISession>();
     _nHibernateService.OpenSession().Returns(_session);
     _sut = new TransactionService(_nHibernateService);
 }
Exemplo n.º 3
0
 public HoldingsService(INHibernateService nHibernateService,
                        IIexCloudService iexCloudService)
 {
     _nHibernateService = nHibernateService;
     _session           = _nHibernateService.OpenSession();
     _iexCloudService   = iexCloudService;
     _path = Path.GetFullPath(ToString());
 }
Exemplo n.º 4
0
 public void Setup()
 {
     _nHibernateService = Substitute.For <INHibernateService>();
     _iexCloudService   = Substitute.For <IIexCloudService>();
     _session           = Substitute.For <ISession>();
     _nHibernateService.OpenSession().Returns(_session);
     _sut = new HoldingsService(_nHibernateService, _iexCloudService);
 }
Exemplo n.º 5
0
 public UserRepositoryTests()
 {
     _nhs    = new NHibernateService2();
     _usrRep = new UserRepository(_nhs);
 }
Exemplo n.º 6
0
 public TransactionService(INHibernateService nHibernateService)
 {
     _nHibernateService = nHibernateService;
     _session           = _nHibernateService.OpenSession();
     _path = Path.GetFullPath(ToString());
 }
Exemplo n.º 7
0
 public ComponentRepository(INHibernateService nhs)
 {
     _session = nhs.OpenSession();
 }
Exemplo n.º 8
0
 public UserServicesTests()
 {
     _nhs = new NHibernateService2();
 }
 public NHibernateBuilder(INHibernateService service, IPlugin plugin)
 {
     _service = service;
     _plugin  = plugin;
 }
Exemplo n.º 10
0
 public ScoreRepository(INHibernateService nhs)
 {
     _session = nhs.OpenSession();
 }
Exemplo n.º 11
0
 public ComponentRepositoryTests()
 {
     _nhs    = new NHibernateService2();
     _corRep = new CourseRepository(_nhs);
     _comRep = new ComponentRepository(_nhs);
 }
Exemplo n.º 12
0
 public void TestCaseInit()
 {
     m_CoreFactory       = new CoreFactory();
     m_NHibernateService = m_CoreFactory.GetNHibernateService();
 }
 public void TestCaseInit()
 {
     m_CoreFactory = new CoreFactory();
     m_NHibernateService = m_CoreFactory.GetNHibernateService();
 }