private static QuoteRepository CreateQuoteRepository(IQBMSDbContext iQBMSDbContext = null) { if (iQBMSDbContext == null) { iQBMSDbContext = Substitute.For <IQBMSDbContext>(); } return(new QuoteRepository(iQBMSDbContext)); }
private void SetupClients(IQBMSDbContext iQBMSDbContext) { if (_clients != null) { var set = GetSubstituteDbSet <Client>().SetupData(_clients); iQBMSDbContext.Clients.Returns(set); } }
private void SetupTitles(IQBMSDbContext iQBMSDbContext) { if (_title != null) { var set = GetSubstituteDbSet <Title>().SetupData(_title); iQBMSDbContext.Titles.Returns(set); } }
private void SetUpClientsQuoteItems(IQBMSDbContext iQBMSDbContext) { if (_clientsQuoteItem != null) { var set = GetSubstituteDbSet <ClientsQuoteItem>().SetupData(_clientsQuoteItem); iQBMSDbContext.ClientsQuoteItems.Returns(set); } }
private void SetUpRoles(IQBMSDbContext iQBMSDbContext) { if (_roles != null) { var set = GetSubstituteDbSet <Roles>().SetupData(_roles); iQBMSDbContext.Roles.Returns(set); } }
private void SetUpQuotes(IQBMSDbContext iQBMSDbContext) { if (_quotes != null) { var set = GetSubstituteDbSet <Quote>().SetupData(_quotes); iQBMSDbContext.Quotes.Returns(set); } }
public QuoteRepository(IQBMSDbContext iQBMSDbContext) { _iQBMSDbContext = iQBMSDbContext ?? throw new ArgumentNullException(nameof(iQBMSDbContext)); }
public RoleRepository(IQBMSDbContext qBMSDbContext) { _qBMSDbContext = qBMSDbContext ?? throw new ArgumentNullException(nameof(qBMSDbContext)); }