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
Fields Modifier and Type Field Description static java.lang.StringDEFAULT_RELATIVE_RECORDING_DIRECTORYDefault relative recording directory in extensions.org.junit.rules.TestNamenameThis is the name of the current test-method.JCoRecJUnitTestWatcherwatcherRule notifying about failed and succeeded tests.-
Fields inherited from class de.hybris.platform.sap.core.test.SapcoreSpringJUnitTest
genericFactory, sapHybrisSessionProvider
-
-
Constructor Summary
Constructors Constructor Description SapcoreJCoRecJUnitTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected JCoRecordinggetRecordingAnnotation()Returns JCoRecording of the unit test.java.lang.StringgetRecordingExtensionName()JCoRecModegetRecordingMode()Returns recording mode.java.lang.StringgetRelativeRecordingDirectory()Getter for relative recording directory.voidsetUp()Standard test setUp method.voidtestFailed()Executed if the test fails.voidtestSucceeded()Executed if the test succeeded.-
Methods inherited from class de.hybris.platform.sap.core.test.SapcoreSpringJUnitTest
getGenericFactory, tearDown
-
Methods inherited from class de.hybris.platform.sap.core.test.SapcoretestSpringJUnitTest
getApplicationContext
-
-
-
-
Field Detail
-
name
public org.junit.rules.TestName name
This is the name of the current test-method. It is used for the key of the repository.
-
watcher
public final JCoRecJUnitTestWatcher 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
public static final java.lang.String DEFAULT_RELATIVE_RECORDING_DIRECTORY
Default relative recording directory in extensions.
-
-
Method Detail
-
setUp
public void setUp()
Description copied from class:SapcoretestSpringJUnitTestStandard test setUp method.- Overrides:
setUpin classSapcoreSpringJUnitTest
-
getRecordingMode
public JCoRecMode getRecordingMode()
Returns recording mode.- Returns:
- the recordingMode
-
getRecordingExtensionName
public java.lang.String 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
public java.lang.String getRelativeRecordingDirectory()
Getter for relative recording directory.- Returns:
- the relativeRecordingDirectory
-
getRecordingAnnotation
protected JCoRecording getRecordingAnnotation()
Returns JCoRecording of the unit test.- Returns:
- Annotation if set, null otherwise
-
-