내용으로 건너뛰기
LinDol's 실험실
사용자 도구
로그인
사이트 도구
검색
도구
문서 보기
이전 판
역링크
최근 바뀜
미디어 관리자
사이트맵
로그인
>
최근 바뀜
미디어 관리자
사이트맵
추적:
powermockito
이 문서는 읽기 전용입니다. 원본을 볼 수는 있지만 바꿀 수는 없습니다. 문제가 있다고 생각하면 관리자에게 문의하세요.
====== Troubleshooting ====== 'Properties file org/powermock/default.properties is found in 2 places:' Example <code> Properties file org/powermock/default.properties is found in 2 places: ConfigurationSource{location='file:/Users/lindolsang/.gradle/caches/modules-2/files-2.1/org.powermock/powermock-core/2.0.0/c34a6706f810172e210d218627abf0541b9d66d2/powermock-core-2.0.0.jar!/org/powermock/default.properties} ConfigurationSource{location='file:/Users/lindolsang/.gradle/caches/modules-2/files-2.1/org.powermock/powermock-core/2.0.0/c34a6706f810172e210d218627abf0541b9d66d2/powermock-core-2.0.0.jar!/org/powermock/default.properties}. Which one will be used is undefined. Please, remove duplicated configuration file (or second PowerMock jar file) from class path to have stable tests.Properties file org/powermock/default.properties is found in 2 places: </code> 'can not find test method' When you want to test single method, some times if test method has @PrepareForTest annotation TestRunner could not find test method. You can move it to class level ((Ref: How do you run a single method?)) Add "org.powermock.*" to @PowerMockIgnore ((Ref: Powermock complains about default.properties file found in 2 places)) Example: <code> @PowerMockIgnore({"org.mockito.*", "org.robolectric.*", "android.*", "org.json.*", "androidx.*", "org.powermock.*"}) </code> ====== References ====== * [[https://www.baeldung.com/intro-to-powermock|Introduction to PowerMockito]] * [[https://github.com/robolectric/robolectric/wiki/Using-PowerMock|How to use PowerMock with Robolectric]] * [[https://stackoverflow.com/questions/50939258/powermock-complains-about-default-properties-file-found-in-2-places|Powermock complains about default.properties file found in 2 places]] * [[https://github.com/powermock/powermock/wiki/mockito|Mockito - Using PowerMock with Mockito]] * [[https://github.com/powermock/powermock/wiki/Suppress-Unwanted-Behavior|Suppress Unwanted Behavior]] * [[https://github.com/powermock/powermock/wiki/Mock-System - Mock System - Mocking system classes]] * [[https://github.com/powermock/powermock/issues/794|How do you run a single method?]]
powermockito.txt
· 마지막으로 수정됨: 2019/08/30 00:27 저자
lindol
문서 도구
문서 보기
이전 판
역링크
맨 위로