@Test public void niceMessageWhenProviderNotFound() { thrown.expect(IllegalArgumentException.class); thrown.expectMessage("provider foo not in set of configured providers: [mock]"); Denominator.create("foo"); }
public static DNSApiManager create(Provider in, Object... modules) { Object[] modulesForGraph = modulesForGraph(in, modules).toArray(); try { return ObjectGraph.create(modulesForGraph).get(DNSApiManager.class); } catch (IllegalStateException e) { if (e.getMessage().contains("denominator.Credentials could not be bound") && !in.credentialTypeToParameterNames().isEmpty()) { throw new IllegalArgumentException(CredentialsConfiguration.exceptionMessage(null, in)); } throw e; } }
Denominator { public static DNSApiManager create(Provider in, Object... modules) { Object[] modulesForGraph = modulesForGraph(in, modules).toArray(); try { return ObjectGraph.create(modulesForGraph).get(DNSApiManager.class); } catch (IllegalStateException e) { if (e.getMessage().contains("denominator.Credentials could not be bound") && !in.credentialTypeToParameterNames().isEmpty()) { throw new IllegalArgumentException(CredentialsConfiguration.exceptionMessage(null, in)); } throw e; } } }
Denominator { public static DNSApiManager create(Provider in, Object... modules) { Object[] modulesForGraph = modulesForGraph(in, modules).toArray(); try { return ObjectGraph.create(modulesForGraph).get(DNSApiManager.class); } catch (IllegalStateException e) { if (e.getMessage().contains("denominator.Credentials could not be bound") && !in.credentialTypeToParameterNames().isEmpty()) { throw new IllegalArgumentException(CredentialsConfiguration.exceptionMessage(null, in)); } throw e; } }  }
Denominator { public static DNSApiManager create(Provider in, Object... modules) { Object[] modulesForGraph = modulesForGraph(in, modules).toArray(); try { return ObjectGraph.create(modulesForGraph).get(DNSApiManager.class); } catch (IllegalStateException e) { if (e.getMessage().contains("denominator.Credentials could not be bound") && !in.credentialTypeToParameterNames().isEmpty()) { throw new IllegalArgumentException(CredentialsConfiguration.exceptionMessage(null, in)); } throw e; } }  @Deprecated static Iterable<Provider> providers(); static DNSApiManager create(Provider in, Object... modules); static DNSApiManager create(String providerName, Object... modules); static Object provider(denominator.Provider provider); }
Denominator { public static DNSApiManager create(Provider in, Object... modules) { Object[] modulesForGraph = modulesForGraph(in, modules).toArray(); try { return ObjectGraph.create(modulesForGraph).get(DNSApiManager.class); } catch (IllegalStateException e) { if (e.getMessage().contains("denominator.Credentials could not be bound") && !in.credentialTypeToParameterNames().isEmpty()) { throw new IllegalArgumentException(CredentialsConfiguration.exceptionMessage(null, in)); } throw e; } }  @Deprecated static Iterable<Provider> providers(); static DNSApiManager create(Provider in, Object... modules); static DNSApiManager create(String providerName, Object... modules); static Object provider(denominator.Provider provider);  }