private void MockDapper() { var connectionFactory = Substitute.For <IConnectionFactory>(); var connection = Substitute.For <IDbConnection>(); connectionFactory.Get().Returns(connection); _registry.AddSingleton(connectionFactory); }
public void Setup() { _configuration = new ConfigurationBuilder() .SetBasePath(Directory.GetCurrentDirectory()) .AddJsonFile("appsettings.json", optional: false, reloadOnChange: true) .Build(); var registry = new WorkerRegistry(); registry.AddSingleton(_configuration); _container = new Container(registry); }