मैं है निम्न परीक्षण ...PowerMockito ClassNotPreparedException फेंकने भी @PrepareForTest साथ स्काला टेस्ट
import org.scalatest.junit.JUnitRunner
...
@PowerMockRunnerDelegate(classOf[JUnitRunner])
@PrepareForTest(Array(classOf[AuditLog]))
class ConnectorAPITest extends path.FreeSpec with ShouldMatchers {
"Mocked Tests" - {
println("This got called in the mocked tests.")
PowerMockito.mockStatic(classOf[AuditLog]);
...
}
}
लेकिन मैं मिलता है जब मैं चलाने ...
An exception or error caused a run to abort: The class com.paxata.services.log.AuditLog not prepared for test.
To prepare this class, add class to the '@PrepareForTest' annotation.
In case if you don't use this annotation, add the annotation on class or method level.
org.powermock.api.mockito.ClassNotPreparedException:
The class com.paxata.services.log.AuditLog not prepared for test.
To prepare this class, add class to the '@PrepareForTest' annotation.
कौन सा मतलब नहीं है का उपयोग करते हुए एनोटेशन दिया गया है पहले से ही वहाँ है? क्या यह स्कैला परीक्षण की मूर्खता है?
अगर आप टिप्पणी में पूर्ण classpath इस्तेमाल करने की कोशिश क्या होता है? – Yawar
मैं अगर मैं – Jackie