Пример #1
0
 private static QuoteRepository CreateQuoteRepository(IQBMSDbContext iQBMSDbContext = null)
 {
     if (iQBMSDbContext == null)
     {
         iQBMSDbContext = Substitute.For <IQBMSDbContext>();
     }
     return(new QuoteRepository(iQBMSDbContext));
 }
Пример #2
0
 private void SetupClients(IQBMSDbContext iQBMSDbContext)
 {
     if (_clients != null)
     {
         var set = GetSubstituteDbSet <Client>().SetupData(_clients);
         iQBMSDbContext.Clients.Returns(set);
     }
 }
Пример #3
0
 private void SetupTitles(IQBMSDbContext iQBMSDbContext)
 {
     if (_title != null)
     {
         var set = GetSubstituteDbSet <Title>().SetupData(_title);
         iQBMSDbContext.Titles.Returns(set);
     }
 }
Пример #4
0
 private void SetUpClientsQuoteItems(IQBMSDbContext iQBMSDbContext)
 {
     if (_clientsQuoteItem != null)
     {
         var set = GetSubstituteDbSet <ClientsQuoteItem>().SetupData(_clientsQuoteItem);
         iQBMSDbContext.ClientsQuoteItems.Returns(set);
     }
 }
Пример #5
0
 private void SetUpRoles(IQBMSDbContext iQBMSDbContext)
 {
     if (_roles != null)
     {
         var set = GetSubstituteDbSet <Roles>().SetupData(_roles);
         iQBMSDbContext.Roles.Returns(set);
     }
 }
Пример #6
0
 private void SetUpQuotes(IQBMSDbContext iQBMSDbContext)
 {
     if (_quotes != null)
     {
         var set = GetSubstituteDbSet <Quote>().SetupData(_quotes);
         iQBMSDbContext.Quotes.Returns(set);
     }
 }
Пример #7
0
 public QuoteRepository(IQBMSDbContext iQBMSDbContext)
 {
     _iQBMSDbContext = iQBMSDbContext ?? throw new ArgumentNullException(nameof(iQBMSDbContext));
 }
Пример #8
0
 public RoleRepository(IQBMSDbContext qBMSDbContext)
 {
     _qBMSDbContext = qBMSDbContext ?? throw new ArgumentNullException(nameof(qBMSDbContext));
 }