@Test public void testCmdLineLoaderMissingRequiredParamShouldThrowAConfigException() { try { AndHowConfiguration config = AndHowCoreTestConfig.instance() .groups(configPtGroups) .group(RequiredParams.class) .setCmdLineArgs(cmdLineArgsWFullClassName); AndHow.instance(config); fail(); } catch (AppFatalException ce) { assertEquals(1, ce.getProblems().filter(RequirementProblem.class).size()); assertEquals(RequiredParams.STR_NULL_R, ce.getProblems().filter(RequirementProblem.class).get(0).getPropertyCoord().getProperty()); } }
public static AndHow instance() throws AppFatalException { if (singleInstance != null && singleInstance.core != null) { return singleInstance; } else { synchronized (LOCK) { if (singleInstance == null || singleInstance.core == null) { return instance(AndHowUtil.findConfiguration(StdConfig.instance())); } else { return singleInstance; } } } }
AndHow implements StaticPropertyConfiguration, ValidatedValues { public static AndHow instance() throws AppFatalException { if (singleInstance != null && singleInstance.core != null) { return singleInstance; } else { synchronized (LOCK) { if (singleInstance == null || singleInstance.core == null) { return instance(AndHowUtil.findConfiguration(StdConfig.instance())); } else { return singleInstance; } } } } }
AndHow implements StaticPropertyConfiguration, ValidatedValues { public static AndHow instance() throws AppFatalException { if (singleInstance != null && singleInstance.core != null) { return singleInstance; } else { synchronized (LOCK) { if (singleInstance == null || singleInstance.core == null) { return instance(AndHowUtil.findConfiguration(StdConfig.instance())); } else { return singleInstance; } } } } private  AndHow(AndHowConfiguration config); }
AndHow implements StaticPropertyConfiguration, ValidatedValues { public static AndHow instance() throws AppFatalException { if (singleInstance != null && singleInstance.core != null) { return singleInstance; } else { synchronized (LOCK) { if (singleInstance == null || singleInstance.core == null) { return instance(AndHowUtil.findConfiguration(StdConfig.instance())); } else { return singleInstance; } } } } private  AndHow(AndHowConfiguration config); static AndHowConfiguration<? extends AndHowConfiguration> findConfig(); static AndHow instance(); static AndHow instance(AndHowConfiguration config); static boolean isInitialize(); static StackTraceElement[] getInitializationTrace(); @Override boolean isExplicitlySet(Property<?> prop); @Override T getExplicitValue(Property<T> prop); @Override T getValue(Property<T> prop); @Override List<EffectiveName> getAliases(Property<?> property); @Override String getCanonicalName(Property<?> prop); @Override GroupProxy getGroupForProperty(Property<?> prop); @Override NamingStrategy getNamingStrategy(); }
AndHow implements StaticPropertyConfiguration, ValidatedValues { public static AndHow instance() throws AppFatalException { if (singleInstance != null && singleInstance.core != null) { return singleInstance; } else { synchronized (LOCK) { if (singleInstance == null || singleInstance.core == null) { return instance(AndHowUtil.findConfiguration(StdConfig.instance())); } else { return singleInstance; } } } } private  AndHow(AndHowConfiguration config); static AndHowConfiguration<? extends AndHowConfiguration> findConfig(); static AndHow instance(); static AndHow instance(AndHowConfiguration config); static boolean isInitialize(); static StackTraceElement[] getInitializationTrace(); @Override boolean isExplicitlySet(Property<?> prop); @Override T getExplicitValue(Property<T> prop); @Override T getValue(Property<T> prop); @Override List<EffectiveName> getAliases(Property<?> property); @Override String getCanonicalName(Property<?> prop); @Override GroupProxy getGroupForProperty(Property<?> prop); @Override NamingStrategy getNamingStrategy(); static final String ANDHOW_INLINE_NAME; static final String ANDHOW_NAME; static final String ANDHOW_URL; static final String ANDHOW_TAG_LINE; }