Class SapcoreJCoRecJUnitTest
java.lang.Object
de.hybris.platform.sap.core.test.SapcoretestSpringJUnitTest
de.hybris.platform.sap.core.test.SapcoreSpringJUnitTest
de.hybris.platform.sap.core.jco.test.SapcoreJCoJUnitTest
de.hybris.platform.sap.core.jco.rec.SapcoreJCoRecJUnitTest
- Direct Known Subclasses:
DefaultJCoMockRepositoryFactoryTest,SapcorebolSpringJUnitTest,SapcoreJCoRecorderTestPlaybackMode
@ContextConfiguration(locations="jcorec-test-spring.xml")
public class SapcoreJCoRecJUnitTest
extends SapcoreJCoJUnitTest
Base class for testing with the help of the JCoRecorder.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringDefault relative recording directory in extensions.org.junit.rules.TestNameThis is the name of the current test-method.final JCoRecJUnitTestWatcherRule notifying about failed and succeeded tests.Fields inherited from class de.hybris.platform.sap.core.test.SapcoreSpringJUnitTest
genericFactory, sapHybrisSessionProvider -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected JCoRecordingReturns JCoRecording of the unit test.Returns recording mode.Getter for relative recording directory.voidsetUp()Standard test setUp method.voidExecuted if the test fails.voidExecuted if the test succeeded.Methods inherited from class de.hybris.platform.sap.core.test.SapcoreSpringJUnitTest
getGenericFactory, tearDownMethods inherited from class de.hybris.platform.sap.core.test.SapcoretestSpringJUnitTest
getApplicationContext
-
Field Details
-
name
public org.junit.rules.TestName nameThis is the name of the current test-method. It is used for the key of the repository. -
watcher
Rule notifying about failed and succeeded tests. In case of a failed test the recording will not be saved in order saving only successful tests and leaving existing files untouched. -
DEFAULT_RELATIVE_RECORDING_DIRECTORY
Default relative recording directory in extensions.
-
-
Constructor Details
-
SapcoreJCoRecJUnitTest
public SapcoreJCoRecJUnitTest()
-
-
Method Details
-
setUp
public void setUp()Description copied from class:SapcoretestSpringJUnitTestStandard test setUp method.- Overrides:
setUpin classSapcoreSpringJUnitTest
-
getRecordingMode
Returns recording mode.- Returns:
- the recordingMode
-
getRecordingExtensionName
- Returns:
- the recordingExtensionName
-
testFailed
public void testFailed()Executed if the test fails. Recording is not saved. -
testSucceeded
public void testSucceeded()Executed if the test succeeded. Recording is saved. -
getRelativeRecordingDirectory
Getter for relative recording directory.- Returns:
- the relativeRecordingDirectory
-
getRecordingAnnotation
Returns JCoRecording of the unit test.- Returns:
- Annotation if set, null otherwise
-