Spring Framework DescriptiveResource - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Spring Framework DescriptiveResource class.

This code example shows how to use the following methods:
public final class FailFastProblemReporterTests { 
 
	@Test(expected=BeanDefinitionParsingException.class)
	public void testError() throws Exception {
		FailFastProblemReporter reporter = new FailFastProblemReporter();
		reporter.error(new Problem("VGER", new Location(new DescriptiveResource("here")),
				null, new IllegalArgumentException()));
	} 
 
	@Test
	public void testWarn() throws Exception {
		Problem problem = new Problem("VGER", new Location(new DescriptiveResource("here")),
				null, new IllegalArgumentException());
 
		Log log = mock(Log.class);
 
		FailFastProblemReporter reporter = new FailFastProblemReporter();
		reporter.setLogger(log);
		reporter.warning(problem);
 
7
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
	 * @throws BeanDefinitionStoreException in case of loading or parsing errors 
	 */ 
	public int loadBeanDefinitions(InputSource inputSource, String resourceDescription)
			throws BeanDefinitionStoreException {
 
		return doLoadBeanDefinitions(inputSource, new DescriptiveResource(resourceDescription));
	} 
 
 
	/** 
	 * Actually load bean definitions from the specified XML file. 
	 * @param inputSource the SAX InputSource to read from 
	 * @param resource the resource descriptor for the XML file 
	 * @return the number of bean definitions found 
	 * @throws BeanDefinitionStoreException in case of loading or parsing errors 
	 * @see #doLoadDocument 
	 * @see #registerBeanDefinitions 
	 */ 
	protected int doLoadBeanDefinitions(InputSource inputSource, Resource resource)
			throws BeanDefinitionStoreException {
4
CodeRank
Experience pair programming with AI  Get Codota for Java