263.24. Camel 테스트 키트에서 속성 재정의

Camel 2.10에서 사용 가능

Camel로 테스트하고 Properties 구성 요소를 사용할 때 단위 테스트 소스 코드에서 직접 사용할 속성을 제공할 수 있습니다.
Camel 2.10 이상에서는 Camel 테스트 키트(예: CamelTestSupport ) 클래스가 다음과 같은 방법을 제공합니다.

  • useOverridePropertiesWithPropertiesComponent
  • ignoreMissingLocationWithPropertiesComponent

예를 들어 단위 테스트 클래스의 경우 useOverridePropertiesWithPropertiesComponent 메서드를 재정의하고 사용할 속성을 포함하는 java.util.Properties 를 반환할 수 있습니다.

263.24.1. 단위 테스트 소스에서 속성 제공

이는 camel-test, camel-test-spring, camel-test-blueprint와 같은 Camel 테스트 키트 중 어느 곳에서나 수행 할 수 있습니다.

ignoreMisingLocationWithPropertiesComponent 를 사용하여 Camel에 검색할 수 없는 위치(예: 속성 위치에 대한 액세스 권한이 없는 환경에서 단위 테스트를 실행하는 경우)를 무시하도록 지시할 수 있습니다.