Code example for Method

Methods: getName

0
	} 
 
	@Test 
	public void returnsCorrectName() { 
 
		JpaQueryMethod method = new JpaQueryMethod(repositoryMethod, metadata, extractor);
		assertEquals(repositoryMethod.getName(), method.getName());
	} 
 
	@Test 
	public void returnsQueryIfAvailable() throws Exception { 
 
		JpaQueryMethod method = new JpaQueryMethod(repositoryMethod, metadata, extractor);
 
		assertNull(method.getAnnotatedQuery());
 
		Method repositoryMethod = UserRepository.class.getMethod("findByAnnotatedQuery", String.class);
 
		assertNotNull(new JpaQueryMethod(repositoryMethod, metadata, extractor).getAnnotatedQuery());
	}