コード例 #1
0
ファイル: PredictionService.cs プロジェクト: stevewhit/SANNET
 public PredictionService(IEfRepository <P> predictionRepository, IQuoteService <Q> quoteService, ICompanyService <C> companyService, IDatasetService datasetService, INetworkConfigurationService <N> networkConfigurationService)
 {
     _predictionRepository        = predictionRepository ?? throw new ArgumentNullException("predictionRepository");
     _quoteService                = quoteService ?? throw new ArgumentNullException("quoteService");
     _companyService              = companyService ?? throw new ArgumentNullException("companyService");
     _datasetService              = datasetService ?? throw new ArgumentNullException("datasetService");
     _networkConfigurationService = networkConfigurationService ?? throw new ArgumentNullException("networkConfigurationService");
 }
コード例 #2
0
 public void NetworkConfigurationService_WithNullRepository_ThrowsException()
 {
     // Act
     _service = new NetworkConfigurationService <TestNetworkConfiguration>(null);
     // -- Add  ?? throw new ArgumentNullException("repository") to constructor.
 }
コード例 #3
0
 public void Initialize()
 {
     _mockContext = new MockEfContext(typeof(TestNetworkConfiguration));
     _repository  = new EfRepository <TestNetworkConfiguration>(_mockContext.Object);
     _service     = new NetworkConfigurationService <TestNetworkConfiguration>(_repository);
 }