public void TestingCanAnalyze() { var options = new DbContextOptionsBuilder <ImagesContext>() .UseInMemoryDatabase(databaseName: "testDb") .Options; var builder = new ConfigurationBuilder().AddEnvironmentVariables(); builder.AddUserSecrets <Startup>(); var configuration = builder.Build(); using (var context = new ImagesContext(options)) { var controller = new AnalyticsController(configuration); //Act var results = controller.Analyze("hello from the past this is me"); //Assert Assert.IsType <Analytics>(results); } }