Пример #1
0
 public DocumentsRepositoryTests()
 {
     dbConfiguration     = new DatabaseConfiguration();
     session             = dbConfiguration.GetSession();
     documentsRepository = new NHibernateUniversalRepository <XXX_R55_Documents>(session);
     fakeDocument        = CreateFakeDocument();
 }
 //todo rozbic na osobne klasy dla osobnych encji
 public NHibernateUniversalRepositoryTests()
 {
     dbConfiguration = new DatabaseConfiguration();
     session         = dbConfiguration.GetSession();
     nHibernateUniversalRepositoryQuotation  = new NHibernateUniversalRepository <XXX_R55_Quotations>(session);
     nHibernateUniversalRepositoryPriceLists = new NHibernateUniversalRepository <XXX_R55_PriceLists>(session);
     nHibernateUniversalRepositoryUnits      = new NHibernateUniversalRepository <UnitsDb>(session);
 }
Пример #3
0
 public QuotationsCommandHandlerTests()
 {
     dbConfiguration = new DatabaseConfiguration();
     _session        = dbConfiguration.GetSession();
     _nhibernateUniversalRepository           = new NHibernateUniversalRepository <XXX_R55_Documents>(_session);
     _nhibernateQuotationsUniversalRepository = new NHibernateUniversalRepository <XXX_R55_Quotations>(_session);
     _diskDocumentsHelper      = new DiskDocumentsHelper();
     _dbDocumentsHelper        = new DbDocumentsHelper(_nhibernateUniversalRepository, new DocumentToDocumentDbMapper());
     _documentsDomainService   = new DocumentsDomainService(_dbDocumentsHelper, _diskDocumentsHelper);
     _quotationsDomainService  = new QuotationDomainService(_nhibernateQuotationsUniversalRepository, _nhibernateUniversalRepository, new QuotationToQuotationDbMapper());
     _quotationsCommandHandler = new QuotationsCommandHandler(_quotationsDomainService, _documentsDomainService);
 }