public void CreateWithFailingProvider() { var context = new Context(TestGlobal.Logger); var errorMessage = "error"; var failingProvider = CreateFailingProvider(errorMessage); Func <Task <IConnectionMultiplexer> > createFunc = () => RedisConnectionMultiplexer.CreateAsync(context, failingProvider, logSeverity: BuildXL.Cache.ContentStore.Interfaces.Logging.Severity.Unknown, usePreventThreadTheft: false); createFunc.Should().Throw <ArgumentException>().Where(e => e.Message.Contains( $"Failed to get connection string from provider {failingProvider.GetType().Name}. {errorMessage}.")); }
public void CreateWithFailingProvider() { var context = new Context(TestGlobal.Logger); var errorMessage = "error"; var failingProvider = CreateFailingProvider(errorMessage); Func <Task <IConnectionMultiplexer> > createFunc = () => RedisConnectionMultiplexer.CreateAsync(context, failingProvider); createFunc.Should().Throw <ArgumentException>().Where(e => e.Message.Contains( $"Failed to get connection string from provider {failingProvider.GetType().Name}. {errorMessage}.")); }