public TranslationControllerTests() { var translationHelper = new Mock <ITranslationHelper>(); translationHelper.Setup(x => x.GetTranslation(It.IsAny <LanguageCode>(), It.IsAny <string>())).Returns("NOTFOUND"); translationHelper.Setup(x => x.GetTranslation(LanguageCode.ENG, "ENGtest")).Returns("English testing"); translationHelper.Setup(x => x.GetTranslation(LanguageCode.PL, "PLtest")).Returns("Polskie testowanie"); _translationHelper = translationHelper.Object; _dbContext = new Mock <WebNeuralNetDbContext>().Object; }
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env, WebNeuralNetDbContext dbContext) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } else { app.UseHsts(); } app.UseSwagger(); app.UseSwaggerUI(c => { c.SwaggerEndpoint("/swagger/v1/swagger.json", "My API V1"); }); app.UseHttpsRedirection(); app.UseAuthentication(); app.UseCors(); app.UseMvc(); }
public TranslationController(ITranslationHelper translationHelper, WebNeuralNetDbContext dbContext) { _translationHelper = translationHelper; _dbContext = dbContext; }
public NeuralNetController(WebNeuralNetDbContext dbContext, INeuralNetCreator neuralNetCreator, INeuralNetTrainer neuralNetTrainer) { _dbcontext = dbContext; _neuralNetCreator = neuralNetCreator; _neuralNetTrainer = neuralNetTrainer; }
public ExportController(WebNeuralNetDbContext dbContext) { _dbcontext = dbContext; }
public LayerController(WebNeuralNetDbContext dbContext, INeuralNetCreator neuralNetCreator) { _dbContext = dbContext; _neuralNetCreator = neuralNetCreator; }